\documentclass[table]{bmcart}


\usepackage{booktabs} % for e.g. \toprule
\usepackage{tabularx}

\renewcommand{\topfraction}{.85}
\renewcommand{\bottomfraction}{.7}
\renewcommand{\textfraction}{.15}
\renewcommand{\floatpagefraction}{.66}
\renewcommand{\dbltopfraction}{.66}
\renewcommand{\dblfloatpagefraction}{.66}

\definecolor{tableShade}{gray}{0.9}

\newcommand{\chprefix}{A}
\renewcommand\thetable{\chprefix.\arabic{table}}

\begin{document}


\begin{table}[ht!]
    \caption{\textbf{Variables for all three data sets.}}
    \centering
    \scriptsize
    \rowcolors{1}{white}{tableShade}
    \begin{tabularx}{\textwidth}{l c c c}
    \toprule
 \textbf{Type} & \textbf{Variable name} & \textbf{Description} & \textbf{Data set(s)}  \\
      Demographics  &  Nationality                    &    &  COPD, HA, S     \\
                    &  Gender                         & 	   & COPD, HA, S \\
                    &  Age                            & 	   & COPD, HA, S	 \\
 Admission from     &  From home                      &    &   COPD, HA, S      \\
                    &  From home w SPITEX               &   &  S    \\
                    &  From different facility             & 	From care home or nursing home &  COPD, HA, S   \\
                    &  From hospital                       & 	Different / same hospital & COPD, HA, S \\
                    &  From rehab                     & 	 Rehab clinic  & S   \\
 Admission type     &  Emergency                      & 	    & COPD, HA, S	 \\
                    &  Planned admission              & 	Registered / planned admission   & COPD, HA, S	 \\
                    &  Internal transfer              & 	 & S 	 \\
                    &  Transfer 24h                   & 	 Transfer within 24 h  & HA, S  \\
 Admission authority& Self adm                        &         & COPD, HA, S \\
                    & Ambulance                       &  Ambulance  & COPD, HA, S \\
                    & Doctor                          & Doctor  & COPD, HA, S \\
  Partition of case &  Part surgical                  & 	  & 	COPD, HA, S \\
                    &  Part medical                   & 	  & 	COPD, HA, S \\
                    &  Part other                     & 	 & HA \\
MDC                 &  Pre-MDC                        & \begin{tabular}{@{}c@{}}All diagnoses/procedures \\ that are related to transplants \end{tabular}  & 	COPD, HA, S\\
                    &   MDC1                          & 	\begin{tabular}{@{}c@{}}Diseases and Disorders \\ of the Nervous System \end{tabular}   & S \\
                    &  MDC4                           & 	\begin{tabular}{@{}c@{}}Diseases and Disorders \\ of the Respiratory System \end{tabular} & COPD \\
                    &   MDC 5                         & 	\begin{tabular}{@{}c@{}}Diseases and Disorders \\ of the Circulatory System \end{tabular} & HA \\
MDRG                &  MDRG A                      & 	\begin{tabular}{@{}c@{}} All diagnosis related groups  \\ belonging to Pre-MDC \\ A11: HA, S; A95: S; A97: COPD, S \end{tabular}       & COPD, HA, S  \\
  %                  &  MDRG A95                       &     & S  \\
 %                   &  MDRG A97                       & 	  & COPD, S 	 \\

                    &   MDRG B                        & \begin{tabular}{@{}c@{}} All diagnosis related groups  \\ belonging to MDC1 \end{tabular}    & S \\
                    &   MDRG E                         & 	\begin{tabular}{@{}c@{}} All diagnosis related groups  \\ belonging to MDC4 \end{tabular}     & 	COPD \\
                    &   MDRG F                         & 	\begin{tabular}{@{}c@{}} All diagnosis related groups  \\ belonging to MDC5 \end{tabular}& HA\\
 Elixhauser Groups  & elix 1, 2                       & 	Congestive heart failure, Cardiac arrhythmias      & 	COPD, HA, S	 \\
                    &   elix 3                        & 	Valvular disease   & HA, S \\
                    &  elix 4 -- 6                    & 	\begin{tabular}{@{}c@{}} Pulmonary circulation disorders, \\
Peripheral vascular disorders,
Hypertension \end{tabular}   & COPD, HA, S	 \\
                    &   elix 7 -- 9                   & 	\begin{tabular}{@{}c@{}} Paralysis,
Other neurological disorders, \\
Chronic pulmonary disease \end{tabular}  & HA, S \\
                    &   elix 10                       &  Diabetes (uncomplicated)  & COPD, HA, S \\
                    &  elix 11                        & 	Diabetes (complicated)   & HA, S  \\
                    &   elix 12, 13                       &  Hypothyroidism, Renal failure  & COPD, HA, S	 \\
                    &  elix 14                        &   Liver disease   &  HA, S   \\
                    &  elix 18                        &   Metastatic cancer  &  COPD, S   \\
                    &  elix 19                        &  Solid tumour without metastasis   &  COPD, HA, S   \\
                    &  elix 20                        &   Rheumatoid arthritis/collagen vascular diseases   &  S       \\
                    & elix 21                         &  Coagulopathy   & HA, S     \\
                    & elix 23 -- 24                   &  \begin{tabular}{@{}c@{}} Weight loss, \\ Fluid and electrolyte disorders \end{tabular}  &   COPD, HA, S      \\
                    &   elix 26                 &   Deficiency anaemia   &   HA, S   \\
                    &   elix 27, 30                    &  Alcohol abuse, Depression   &  COPD, HA, S   \\

\bottomrule
    \end{tabularx}
    \begin{footnotesize} 
    \flushleft
    \emph{Note. HA: heart attack data set; S: Stroke data set; MDC: major diagnostic category; MDRG: main diagnosis-related group; 
    MDRG B: B02, B04, B20, B36, B70; MDRG E: E36, E65, E90; MDRG F: F24, F35, F36, F41, F60} 
    \end{footnotesize}
  %  \label{tab:preds}
\end{table}


\end{document}
