Identifying clusters of coexisting conditions and outcomes among adults admitted to hospital with community-acquired pneumonia: a multicentre cohort study ========================================================================================================================================================== * Sarah L. Malecki * Hae Young Jung * Anne Loffler * Mark A. Green * Samir Gupta * Derek MacFadden * Nick Daneman * Ross Upshur * Michael Fralick * Lauren Lapointe-Shaw * Terence Tang * Adina Weinerman * Janice L. Kwan * Jessica J. Liu * Fahad Razak * Amol A. Verma ## Abstract **Background:** Little is known about patterns of coexisting conditions and their influence on clinical care or outcomes in adults admitted to hospital for community-acquired pneumonia (CAP). We sought to evaluate how coexisting conditions cluster in this population to advance understanding of how multimorbidity affects CAP. **Methods:** We studied 11 085 adults admitted to hospital with CAP at 7 hospitals in Ontario, Canada. Using cluster analysis, we identified patient subgroups based on clustering of comorbidities in the Charlson Comorbidity Index. We derived and replicated cluster analyses in independent cohorts (derivation sample 2010–2015, replication sample 2015–2017), then combined these into a total cohort for final cluster analyses. We described differences in medications, imaging and outcomes. **Results:** Patients clustered into 7 subgroups. The low comorbidity subgroup (*n* = 3052, 27.5%) had no comorbidities. The DM-HF-Pulm subgroup had prevalent diabetes, heart failure and chronic lung disease (*n* = 1710, 15.4%). One disease category defined each remaining subgroup, as follows: pulmonary (*n* = 1621, 14.6%), diabetes (*n* = 1281, 11.6%), heart failure (*n* = 1370, 12.4%), dementia (*n* = 1038, 9.4%) and cancer (*n* = 1013, 9.1%). Corticosteroid use ranged from 11.5% to 64.9% in the dementia and pulmonary subgroups, respectively. Piperacillin–tazobactam use ranged from 9.1% to 28.0% in the pulmonary and cancer subgroups, respectively. The use of thoracic computed tomography ranged from 5.7% to 36.3% in the dementia and cancer subgroups, respectively. Adjusting for patient factors, the risk of in-hospital death was greater in the cancer (adjusted odds ratio [OR] 3.12, 95% confidence interval [CI] 2.44–3.99), dementia (adjusted OR 1.57, 95% CI 1.05–2.35), heart failure (adjusted OR 1.66, 95% CI 1.35–2.03) and DM-HF-Pulm subgroups (adjusted OR 1.35, 95% CI 1.12–1.61), and lower in the diabetes subgroup (adjusted OR 0.67, 95% CI 0.50–0.89), compared with the low comorbidity group. **Interpretation:** Patients admitted to hospital with CAP cluster into clinically recognizable subgroups based on coexisting conditions. Clinical care and outcomes vary among these subgroups with little evidence to guide decision-making, highlighting opportunities for research to personalize care. Pneumonia is one of the most common reasons for hospital admission1 and patients with pneumonia have a wide range of clinical outcomes.2,3 The clinical care of patients with pneumonia is known to vary with respect to choice of antibiotics,2 type of imaging used4 and adjunctive therapies.5 It is not known whether patterns of coexisting conditions are associated with differences in clinical care or outcomes among patients admitted to hospital with pneumonia. As populations age, more people are living with multiple chronic conditions.6 Although single coexisting diseases, such as dementia,7 and greater comorbidity levels in general8–12 are known to affect clinical outcomes in patients with pneumonia, less is understood about patterns of coexisting illnesses among patients admitted to hospital for pneumonia. Clinical practice guidelines for pneumonia offer little guidance for how coexisting conditions should affect care.2,13 Host phenotyping has been identified as a crucial next step in advancing the treatment of pneumonia, including calling for a focus on improving our understanding of comorbid illnesses.14 The objective of this study was to examine how coexisting conditions cluster in patients admitted to hospital with community-acquired pneumonia (CAP). We hypothesized that clinically recognizable subgroups could be identified based on patterns of coexisting conditions, and that subgroups would differ in use of diagnostic imaging and medication, and in clinical outcomes. Our overall aim was to advance understanding of how multimorbidity affects CAP and to inform future research toward more personalized treatment strategies for patients admitted to hospital with CAP. ## Methods ### Design and setting This was a retrospective cohort study using data from 7 large hospitals in Toronto and Mississauga, Ontario, Canada that were participating in the General Medicine Inpatient Initiative (GEMINI), which collects administrative and clinical data from all admissions to general internal medicine.1 Clinical data are extracted from hospital information systems and administrative data are collected from hospitals as reported to the Canadian Institute for Health Information (CIHI) National Ambulatory Care Reporting System and Discharge Abstract Database.15,16 To ensure data quality, GEMINI implements numerous computational checks, followed by manual validation of samples of data, with each round of data collection from hospitals. This approach has been described in detail and resulted in 98%–100% congruence of data samples with manual review.17 The participating hospitals serve diverse, multiethnic urban and suburban populations and hospital services are publicly insured. ### Study sample We included all patients discharged from general internal medicine between Apr. 1, 2010, and Oct. 31, 2017. At all participating hospitals, nearly all patients with CAP who are not admitted to the intensive care unit (ICU) are admitted to general internal medicine rather than specialized respirology services. To identify patients with CAP, we included patients for whom the most responsible discharge diagnosis as reported to CIHI was “pneumonia,” defined by the Canadian version of the *International Statistical Classification of Diseases and Related Health Problems, 10th Revision* (ICD-10-CA), codes J10–J18.1,18,19 We also included patients for whom pneumonia was a comorbid diagnosis with a most responsible discharge diagnosis of chronic obstructive pulmonary disease (COPD, defined by ICD-10-CA codes J41–J44).20 These patients were included because coding convention dictates that COPD be coded as the primary diagnosis for patients with coexisting pneumonia.16 Previous chart abstraction studies have shown that the ICD-10 code J18 alone had a sensitivity of 80% for pneumonia,21 whereas the group of ICD-10 codes J10–J18 were found to be 98% sensitive and 97% specific for pneumonia among patients aged 65 years and older.18 To enhance the specificity of case identification and to separate CAP from hospital-acquired pneumonia, we included only patients who received an antibiotic with activity against respiratory pathogens13,22,23 every day for the first 4 days of admission or until death or hospital discharge, in accordance with a standard 5-day treatment regimen for CAP13,23 (assuming up to 1 day of antimicrobial administration in the emergency department before admission). We excluded patients who were not admitted from the emergency department, or who were admitted to hospital in the previous 30 days, given the possibility that their pneumonia may have been related to the previous admission. For patients with multiple admissions, we included only 1 randomly selected admission during the study period. ### Measures and outcomes #### Patient characteristics Baseline patient characteristics included age, sex, residence in a long-term care facility, transport to hospital by ambulance, overall level of comorbidity as estimated using the Charlson Comorbidity Index score (range 0–24, with higher scores indicating greater comorbidity)24–26 and severity of illness, estimated using the Laboratory-based Acute Physiology Score (LAPS) (range 0–256, with higher values indicating greater illness severity),27 which is a validated predictor of in-hospital mortality based on 14 laboratory tests.28,29 #### Coexisting conditions We selected comorbid conditions of interest based on one of the most widely used comorbidity indices, the Charlson Comorbidity Index.24 We measured conditions that are included in this index using patient discharge diagnoses, categorized with ICD-10 codes.25 Sensitivity and specificity for most of these ICD-10 codes have been reported previously and all were more than 95% specific, while sensitivity ranged from 25% for HIV/AIDS to 83% for metastatic cancer.30 The Charlson Comorbidity Index defines chronic lung disease as all obstructive and restrictive diseases.25 It also separates diabetes, liver disease and malignant disease into subcategories based on disease severity and complications,25 which we collapsed into single categories for each disease. #### Processes of clinical care We described the use of respiratory-acting antibiotics, other medications intended to improve respiration (i.e., glucocorticoids, inhalers and furosemide) and the use of computed tomography (CT) of the thorax. Medication data come from physician medication orders documented in pharmacy information systems. Given the lack of medication standardization across hospitals, we manually reviewed medication lists to identify medications of interest. #### Clinical outcomes The study outcomes were in-hospital death, ICU admission after admission to general internal medicine, total hospital length of stay and readmission to general internal medicine at any participating hospital, within 30 days of discharge. ### Statistical analysis We performed cluster analysis to identify subgroups of patients with CAP based on the presence of coexisting medical conditions that form the Charlson Comorbidity Index, namely diabetes, chronic lung disease (including both obstructive and restrictive lung disease), congestive heart failure, cancer, dementia, renal disease, myocardial infarction, stroke, liver disease, peripheral vascular disease, rheumatic disease, paralysis, peptic ulcer disease and HIV. Full methodological details are in Appendix 1, eMethods, available at [www.cmajopen.ca/content/11/5/E799/suppl/DC1](http://www.cmajopen.ca/content/11/5/E799/suppl/DC1). In brief, we used 3 unsupervised machine learning (clustering) techniques (K-modes,31 partitioning around medoids [PAM]32 and hierarchical agglomerative clustering [HAC]).32 Each method derives data-driven clusters or subgroupings by either iteratively optimizing group selections through a top-down approach (i.e., K-modes and PAM) or through bottom-up groupings of observations into a number of clusters (i.e., HAC). This allowed a comparison of how different approaches performed, since there is no agreed best method for cluster analysis. To assess the stability and reproducibility of the identified patient subgroups, we performed the same cluster analysis in a derivation cohort (Apr. 1, 2010, to Mar. 31, 2015) and replication cohort (Apr. 1, 2015, to Oct. 31, 2017), similar to Seymour and colleagues33 (Appendix 1, eFigure 1). We excluded patients who had an admission in both the derivation and replication period from the latter cohort so that they were only captured once. We reported demographics, baseline characteristics and the prevalence of coexisting conditions for the 2 cohorts. We used standardized mean differences greater than 0.10 (10%) to identify any meaningful imbalance between the cohorts.34 After confirming a clinically relevant, stable and reproducible clustering approach in the 2 cohorts (Appendix 1, eMethods), we reran the cluster analysis using the entire study period (Apr. 1, 2010, to Oct. 31, 2017) (Appendix 1, eFigure 1). We performed all further analyses using the total cohort. We compared patient characteristics, clinical care and outcomes across subgroups using χ2 tests for categorical variables and Kruskal–Wallis tests for continuous variables. We used separate logistic regression models to evaluate the effect of coexisting condition subgroups on each of in-hospital death, 30-day readmission and ICU admission. We used quantile regression to model median length of hospital stay as a reflection of the nonbinary outcome of total length of stay. We adjusted models for age, sex, hospital, arrival to hospital from a long-term care facility, arrival to hospital by ambulance and LAPS. To capture potential nonlinear effects of age and LAPS, we used natural cubic splines with 5 degrees of freedom. 35 Since patients were clustered within hospitals, we obtained cluster-robust standard errors using a clustered sandwich estimator for binary outcomes36,37 and cluster-robust bootstrapping for quantile regression.38 As a sensitivity analysis, we included all coexisting conditions that were not the drivers of the clusters (including renal disease, myocardial infarction, stroke, liver disease, peripheral vascular disease) as additional covariates. We performed all analyses in R version 4.0.0 (R Foundation for Statistical Computing). ### Ethics approval This study received Research Ethics Board (REB) approval with a waiver of informed patient consent from all participating hospitals (St. Michael’s Hospital, Sunnybrook Health Sciences Centre and University Health Network Clinical Trials Ontario no. 1394, Trillium Health Partners REB no. 742 and Mount Sinai Hospital REB no. 15-0075-C). ## Results Overall, we included 11 085 patients in the study cohort (Appendix 1, eFigure 1). The median age was 79 (interquartile range [IQR] 65–87) years and 5832 (52.6%) were male. The mean Charlson Index score was 1.7 (standard deviation [SD] 1.7). The 5 most common coexisting conditions were chronic lung disease (*n* = 3178, 28.7%), diabetes (*n* = 2978, 26.9%), heart failure (*n* = 1892, 17.1%), dementia (*n* = 1401, 12.6%) and cancer (*n* = 1194, 10.8%). Appendix 1, eTable 1 and eTable 2 summarize demographics, baseline characteristics and prevalence of coexisting conditions in the derivation, replication and total cohorts, and across the 7 hospital sites. There were 7066 patients in the derivation cohort and 4019 patients in the replication cohort, and the 2 cohorts were generally similar (Appendix 1, eTable 1). There were some differences in the prevalence of coexisting conditions among different hospital sites, most notably a higher proportion of cancer in hospital A (Appendix 1, eTable 2). ### Cluster analysis Subgroups were driven primarily by the 5 most common comorbidities in the cohort (i.e., pulmonary disease, diabetes, heart failure, dementia and cancer), and 72.5% of patients had at least 1 of these 5 conditions (Figure 1). We selected a 7-cluster solution, derived by the PAM algorithm, as the optimal set of subgroups from our cluster analysis (Figure 1 and Appendix 1, eResults and eAppendix). We identified these as the low comorbidity subgroup (*n* = 3052, 27.5%), which had none of the coexisting conditions in the Charlson Index; the diabetes–heart failure–pulmonary (DM-HF-Pulm) subgroup (*n* = 1710, 15.4%), which was a multimorbid subgroup with high prevalence of all 3 of those conditions; the pulmonary subgroup (*n* = 1621, 14.6%), which included patients with either chronic obstructive or restrictive lung diseases; the diabetes subgroup (*n* = 1281, 11.6%); the heart failure subgroup (*n* = 1370, 12.4%), a group that also had a relatively high prevalence of renal disease; the dementia subgroup (*n* = 1038, 9.4%); and the cancer subgroup (*n* = 1013, 9.1%). ![Figure 1:](http://www.cmajopen.ca/https://www.cmajopen.ca/content/cmajo/11/5/E799/F1.medium.gif) [Figure 1:](http://www.cmajopen.ca/content/11/5/E799/F1) Figure 1: Subgroups of patients with community-acquired pneumonia admitted to general internal medicine (Apr. 1, 2010, to Oct. 31, 2017) identified by cluster analysis according to coexisting conditions. Note: CHF = congestive heart failure; DM = diabetes mellitus; DM-HF-Pulm = patients with diabetes, congestive heart failure and chronic lung disease; liver = liver disease; MI = myocardial infarction; pulmonary = chronic lung disease, including both obstructive and restrictive; PUD = peptic ulcer disease; PVD = peripheral vascular disease; renal = renal disease; rheumatic = rheumatic disease. See text for details regarding cluster analysis. Subgroups were named by the condition(s) present in all or most patients within a subgroup. ### Patient characteristics Subgroups differed significantly in age, sex and other baseline characteristics (Table 1). The cancer subgroup was the youngest of all the subgroups (median age 72 yr), while the dementia subgroup was the oldest (median age 86 yr). The cancer subgroup had the highest proportion of males (60.7%), while the dementia subgroup had the lowest proportion (45.9%). The dementia subgroup had the highest proportion of patients from a long-term care facility (37.6%) and arriving to hospital by ambulance (89.5%). The DM-HF-Pulm group had the highest presenting LAPS (mean 27.1, SD 18.8), whereas the low comorbidity subgroup had the lowest LAPS (mean 20.7, SD 15.3). The cancer subgroup had the highest Charlson Index score (mean 3.8, SD 2.0) whereas the low comorbidity subgroup had the lowest score (mean 0, SD 0), by definition. View this table: [Table 1:](http://www.cmajopen.ca/content/11/5/E799/T1) Table 1: Baseline characteristics for subgroups of patients with community-acquired pneumonia admitted to general internal medicine (Apr. 1, 2010, to Oct. 31, 2017), identified by cluster analysis according to coexisting conditions ### Clinical care The use of respiratory-acting antibiotic classes, glucocorticoids, inhalers, furosemide and CT of the thorax differed significantly between subgroups (Table 2). The most notable differences were the high use of piperacillin–tazobactam (28.0%) and CT thorax (36.3%) in the cancer subgroup, compared with the overall population (13.3% and 18.3%, respectively). Use of fluoroquinolone antibiotics was highest in the pulmonary subgroup (48.2%) and use of CT thorax was lowest in the dementia subgroup (5.7%). Use of glucocorticoids was greatest in the pulmonary subgroup (64.9%), as was use of all inhaler types. Furosemide use was greatest in the DM-HF-Pulm subgroup (61.6%). View this table: [Table 2:](http://www.cmajopen.ca/content/11/5/E799/T2) Table 2: Antibiotic use, medication use and imaging use among subgroups of patients with community-acquired pneumonia admitted to general internal medicine (Apr. 1, 2010, to Oct. 31, 2017), identified by cluster analysis according to coexisting conditions* ### Clinical outcomes Subgroups differed significantly in the 4 clinical outcomes (Figure 2, Table 3). Compared with the overall study population, the low comorbidity subgroup had fewer deaths (4.2% v. 6.9%), ICU admissions (6.7% v. 8.9%) and 30-day readmissions (7.7% v. 10.0%), and shorter lengths of stay in hospital (median 3.7 [IQR 2.0–6.7] d v. 4.7 [IQR 2.6–8.5] d). Conversely, the DM-HF-Pulm subgroup had worse outcomes than the overall population on in-hospital deaths (8.4%), ICU admissions (14.4%), 30-day readmissions (13.2%) and median lengths of stay (6.2 [IQR 3.4–10.7] d). ![Figure 2:](http://www.cmajopen.ca/https://www.cmajopen.ca/content/cmajo/11/5/E799/F2.medium.gif) [Figure 2:](http://www.cmajopen.ca/content/11/5/E799/F2) Figure 2: Outcomes for subgroups of patients with community-acquired pneumonia admitted to general internal medicine (Apr. 1, 2010, to Oct. 31, 2017) identified by cluster analysis according to coexisting conditions. Coloured bars are the differences in outcome (percentage or median) between the overall cohort and each subgroup. Overall cohort includes patients not belonging to the subgroup being compared (e.g., ICU admissions among the dementia subgroup v. all other admissions except those in dementia subgroup). Error bars represent 95% confidence intervals (calculated as Wilson score–based interval for proportions and percentile bootstrap interval with 2000 replications for length of stay). In the table, the unadjusted outcomes are reported for each subgroup. Note: DM-HF-Pulm = patients with diabetes, congestive heart failure and chronic lung disease, ICU = intensive care unit, IQR = interquartile range, LOS = length-of-stay. View this table: [Table 3:](http://www.cmajopen.ca/content/11/5/E799/T3) Table 3: Association of patient subgroup based on coexisting conditions with clinical outcomes after multivariable adjustment* After adjusting for age, sex, hospital, arrival to hospital from a long-term care facility, arrival by ambulance and presenting LAPS, the risk of death was greater in the cancer (adjusted odds ratio [OR] 3.12, 95% confidence interval [CI] 2.44–3.99), dementia (adjusted OR 1.57, 95% CI 1.05–2.35), heart failure (adjusted OR 1.66, 95% CI 1.35–2.03) and DM-HF-Pulm (adjusted OR 1.35, 95% CI 1.12–1.61) subgroups compared with the low comorbidity subgroup. The heart failure and DM-HF-Pulm subgroups had worse outcomes on all 4 measures, compared with the low comorbidity subgroup. The diabetes subgroup had lower risk of death (adjusted OR 0.67, 95% CI 0.50–0.89) than the low comorbidity subgroup, longer median hospital stays (0.25 d longer, 95% CI 0.00–0.49 d), and no significant differences in ICU admission or readmission. The pulmonary subgroup had greater risk of ICU use (adjusted OR 1.42, 95% CI 1.16–1.74) and longer median hospital stays (0.41 d longer, 95% CI 0.02–0.80 d) than the low comorbidity subgroup but no significant difference in risk of death or readmission. The dementia subgroup had longer median hospital stays (1.23 d longer, 95% CI 0.74–1.72 d) but no significant difference in risk of ICU use or readmission. The cancer subgroup had higher risk of 30-day readmission (adjusted OR 1.41, 95% CI 1.16–1.70) and longer median hospital stays (1.18 d longer, 95% CI 0.82–1.54 d), but no difference in risk of ICU admission. After adjusting for the less common comorbidities, which were not the drivers of clustering, the results were generally consistent with our primary analysis (Appendix 1, eTable 7). ## Interpretation We used machine learning techniques to identify 7 reproducible and clinically recognizable subgroups of patients admitted to hospital with CAP based on patterns of coexisting conditions. We found that 5 disease categories were the most prevalent coexisting conditions and drove the pattern of clustering, namely chronic lung diseases, diabetes mellitus, heart failure, dementia and cancer. We characterized the pattern of disease clustering. Five subgroups were dominated by a single disease category (pulmonary, diabetes, heart failure, dementia and cancer). One subgroup represented a classically multimorbid phenotype with high prevalence of chronic lung disease, diabetes and heart failure and one subgroup reflected patients with little comorbidity. We found that use of diagnostic imaging, antibiotics and other medications differed among these subgroups. Clinical outcomes also differed by subgroup, even after controlling for age, sex and severity of illness at presentation. Examining patterns of coexisting conditions, rather than single comorbidities, offers novel insights that align with a proposed paradigm shift from single disease treatment toward cluster medicine for patients with multimorbidity39 and lays the groundwork for decision-support tools40 to incorporate patient preferences and other factors to personalize care. Our study extends the previous literature related to comorbidity and CAP, which has focused on describing the prevalence of coexisting conditions,41 associating single coexisting conditions with outcomes7,42–45 and measuring comorbidity in general rather than exploring patterns of disease.8–12 Diabetes mellitus has been associated with significantly increased mortality in patients admitted to hospital with pneumonia.43–45 We found that 42.7% of patients with diabetes were part of the subgroup with high rates of chronic lung disease and heart failure, 8.3% had coexisting dementia and 6.0% had coexisting cancer. All of these subgroups had significantly greater risk of death, and poorer outcomes in general, than patients with no comorbidities. However, another 43.0% of patients with diabetes were in a subgroup without other Charlson comorbidities and these patients had significantly lower risk of death than patients with no comorbidities. This reveals that the relationship between diabetes, pneumonia and death in hospital is not as simple as was previously understood. Given that ICD-10 codes are highly accurate in identifying patients with diabetes in our data set (sensitivity 97%, positive predictive value 96%),46 our findings are not likely to be explained by misclassification errors. We do not interpret our findings to suggest that diabetes has a protective effect on mortality but rather that diabetes may not have a uniformly negative effect on in-hospital outcomes and the association may be driven by complications associated with diabetes. Importantly, these findings do not pertain to the overall relationship between diabetes and CAP, because our sample includes only patients admitted to hospital and diabetes is a known risk factor for both the acquisition of CAP47 and for hospital admission for CAP.48 The DM-HF-Pulm subgroup had the most coexisting conditions and had poor outcomes overall, similar to previous studies of multimorbidity in pneumonia.8–10 The specific pattern of coexisting conditions illuminates opportunities for further research in this subgroup. For example, the use of macrolide (55.6%) and fluoroquinolone (45.8%) antibiotics was not lower in this subgroup, but these drugs cause cardiac complications. 49,50 Corticosteroids were prescribed in 51.1% of patients in this group, perhaps in part to treat concomitant exacerbations of COPD, but corticosteroids may also worsen heart failure and glycemic control.51,52 Corticosteroid use varied across subgroups, from 64.9% in the pulmonary subgroup to 11.5% of patients in the low comorbidity subgroup. There may be practice variation related to the controversial literature on the benefits of corticosteroids in nonsevere CAP.5,53,54 Further research could seek to quantify whether the risks and benefits of corticosteroids vary across subgroups, and differences in net benefits may provide opportunities for more personalized medicine. The pulmonary subgroup had greater ICU use and longer hospital stays but no increased risk of death, consistent with previous literature.9,55–57 These findings correspond with the COPD guideline from the Global Initiative for Chronic Obstructive Lung Disease,56 which cautions against therapeutic pessimism among patients admitted to hospital with acute exacerbations of COPD. Risk of death was greater in the dementia, cancer and heart failure subgroups than among patients with no comorbidities, which is similar to previous studies.7,58,59 The dementia subgroup had less use of the ICU and thoracic CT overall, suggesting that clinicians and patients may be opting for less intensive approaches. The cancer subgroup had the highest Charlson Index score with the greatest standard deviation, likely related to combining all malignant diseases and severities in 1 group, with weights varying between 2 and 6 based on their association with death.26 Given this heterogeneity, there may be utility in exploring further subgroups based on type and severity of cancer in future studies. The cancer subgroup also had a greater use of thoracic CT scans (36.3% v. 18.3% overall) and greater use of broad-spectrum antibiotics (e.g., piperacillin–tazobactam used in 28.0% of patients v. 13.3% overall), which may be related to neutropenia or risk factors for *Pseudomonas* infection. However, there remains limited evidence about when to select broader antibiotic therapy or advanced diagnostic imaging in patients with cancer and CAP. Further research should seek to clarify what patient factors are associated with differences in therapeutic and diagnostic choices, and determine whether there are opportunities to standardize, personalize and improve care. ### Limitations We used ICD-10-CA codes to identify medical conditions in our cohort, including CAP. Although some studies suggest these codes are highly specific, their sensitivity varies.18,30 We augmented ICD-10-CA codes with clinical data regarding antibiotic prescribing to increase the specificity of our definition of CAP, although we note that physician orders may not always reflect administered medications. We used the Charlson Comorbidity Index to define chronic conditions given its widespread use and simplicity, and because ICD-10 codes for its components have been validated,30 but this index is not exhaustive, leaving out some potentially important conditions, including psychiatric illness. Other indices, such as the Elixhauser Index,25 could be considered in future work to further validate our findings. We also used the same disease groupings as in the Charlson Index,25 which do not represent single diseases. Chronic lung disease, cancer, dementia, heart failure, and diabetes (type 1 and type 2) are all heterogeneous categories, to varying degrees. The index does not capture duration of disease or extent of end-organ involvement, and we did not capture number of admissions and readmissions, which could have been reflective of severe disease; all of these factors may also have affected outcomes. Our study was conducted in 7 large hospitals, and should be externally validated. The prevalence of the most common conditions in our cohort was generally similar to population-based studies of pneumonia in the United States,41 United Kingdom60 and Canada,61 including several with prospectively collected comorbidity data, suggesting that our findings are likely generalizable. Processes of care, such as advanced imaging use, may be less generalizable to smaller hospitals, depending on availability of resources. We measured coexisting conditions at discharge and these may not have been present on admission. However, most of these conditions are chronic diseases and it is unlikely that the admission for CAP would represent the first occurrence of this disease. For example, the incidence of cancer after admission for CAP has been reported as 1.1% within 90 days of discharge and the rate of discovery during the CAP admission is likely even lower.62 Our data set included only patients admitted to general internal medicine. Nearly all patients with CAP are admitted to general internal medicine at participating hospitals, with the exception of a small number of patients with complex lung diseases or acute coronary syndromes who may be cared for on dedicated respirology or cardiology units. Although participating sites included 7 of the largest hospitals in the Greater Toronto Area, one of Canada’s most ethnically diverse regions, patient-level data about ethnicity and other social determinants of health were not available in GEMINI, limiting our ability to examine the impact of these on the prevalence and pattern of coexisting conditions. We were also unable to include patient vital signs or other clinical markers of illness severity because much of that documentation occurred in paper charts during the study period. The stability of our clustering solution is strengthened by the reproducibility of results using different clustering approaches and temporally split data sets. However, other approaches have been commonly applied to binary clinical data such as latent class analysis, which may offer additional insights and could be explored in future work.63,64 ### Conclusion In this study, we used unsupervised machine learning methods to identify stable and clinically recognizable subgroups of patients admitted to hospital with CAP based on coexisting conditions. Clinical care and outcomes varied by subgroup, despite no strong evidence about how comorbid illnesses should inform treatment decisions. This highlights opportunities for future research about whether and how hospital care for patients with CAP can be more personalized. ## Footnotes * **Competing interests:** Mark Green reports funding from the Economic and Social Research Council, the Medical Research Council, the Biotechnology and Biological Sciences Research Council and the Natural Environment Research Council of the United Kingdom Research Institute, the National Institute for Health and Care Research and Seqirus. He sits on the advisory board of Understanding Society, UK. Samir Gupta reports funding from the Public Health Agency of Canada; he is chair of the respiratory guidelines committee with the Canadian Thoracic Society. Michael Fralick reports consulting fees from ProofDx. Amol Verma is the Temerty Professor of Artificial Intelligence Research and Education in Medicine and a part-time employee of Ontario Health. No other competing interests were declared. * This article has been peer reviewed. * **Contributors:** Sarah Malecki, Amol Verma and Fahad Razak conceived and designed the study, with substantial input from all authors. Sarah Malecki, Hae Jung, Michael Fralick, Lauren Lapointe-Shaw, Terence Tang, Adina Weinerman, Janice Kwan, Jessica Liu, Fahad Razak and Amol Verma contributed to data collection. Hae Jung and Anne Loffler performed data analysis. Mark Green provided methodological support regarding cluster analysis. All authors contributed to interpretation of the results. Sarah Malecki wrote the first manuscript draft. All of the authors revised it critically for important intellectual content, gave final approval of the version to be published and agreed to be accountable for all aspects of the work. Fahad Razak and Amol Verma are co–senior authors. * **Funding:** The development of the GEMINI data platform has been supported with funding from the Canadian Cancer Society, the Canadian Frailty Network, the Canadian Institutes of Health Research, the Canadian Medical Protective Agency, Green Shield Canada Foundation, the Natural Sciences and Engineering Research Council of Canada, Ontario Health, the St. Michael’s Hospital Association Innovation Fund and the University of Toronto Department of Medicine, and with in-kind support from partner hospitals and Vector Institute. * **Data sharing:** Data from this manuscript can be accessed upon request to the corresponding author, to the extent that is possible in compliance with local research ethics board requirements and data sharing agreements. * **Supplemental information:** For reviewer comments and the original submission of this manuscript, please see [www.cmajopen.ca/content/11/5/E799/suppl/DC1](http://www.cmajopen.ca/content/11/5/E799/suppl/DC1). This is an Open Access article distributed in accordance with the terms of the Creative Commons Attribution (CC BY-NC-ND 4.0) licence, which permits use, distribution and reproduction in any medium, provided that the original publication is properly cited, the use is noncommercial (i.e., research or educational use), and no modifications or adaptations are made. See: [https://creativecommons.org/licenses/by-nc-nd/4.0/](https://creativecommons.org/licenses/by-nc-nd/4.0/) ## References 1. Verma AA, Guo Y, Kwan JL, et al. (2017) Patient characteristics, resource use and outcomes associated with general internal medicine hospital care: the General Medicine Inpatient Initiative (GEMINI) retrospective cohort study. CMAJ Open 5:E842–9. [Abstract/FREE Full Text](http://www.cmajopen.ca/lookup/ijlink/YTozOntzOjQ6InBhdGgiO3M6MTQ6Ii9sb29rdXAvaWpsaW5rIjtzOjU6InF1ZXJ5IjthOjQ6e3M6ODoibGlua1R5cGUiO3M6NDoiQUJTVCI7czoxMToiam91cm5hbENvZGUiO3M6NToiY21ham8iO3M6NToicmVzaWQiO3M6ODoiNS80L0U4NDIiO3M6NDoiYXRvbSI7czoyMToiL2NtYWpvLzExLzUvRTc5OS5hdG9tIjt9czo4OiJmcmFnbWVudCI7czowOiIiO30=) 2. Lim WS, Baudouin SV, George RC, et al., Pneumonia Guidelines Committee of the BTS Standards of Care Committee (2009) BTS guidelines for the management of community acquired pneumonia in adults: update 2009. Thorax 64(Suppl 3):1–55. [FREE Full Text](http://www.cmajopen.ca/lookup/ijlink/YTozOntzOjQ6InBhdGgiO3M6MTQ6Ii9sb29rdXAvaWpsaW5rIjtzOjU6InF1ZXJ5IjthOjQ6e3M6ODoibGlua1R5cGUiO3M6NDoiRlVMTCI7czoxMToiam91cm5hbENvZGUiO3M6OToidGhvcmF4am5sIjtzOjU6InJlc2lkIjtzOjY6IjY0LzEvMSI7czo0OiJhdG9tIjtzOjIxOiIvY21ham8vMTEvNS9FNzk5LmF0b20iO31zOjg6ImZyYWdtZW50IjtzOjA6IiI7fQ==) 3. Aliberti S, Dela Cruz CS, Amati F, et al. (2021) Community-acquired pneumonia. Lancet 398:906–19. 4. Garg D, Johnson LB, Szpunar S, et al. (2014) Clinical value of chest computerized tomography scans in patients admitted with pneumonia. J Hosp Med 9:447–50. 5. Stern A, Skalsky K, Avni T, et al. (2017) Corticosteroids for pneumonia. Cochrane Database Syst Rev 12:CD007720. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1002/14651858.CD007720.pub3&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=http://www.n&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 6. Pefoyo AJK, Bronskill SE, Gruneir A, et al. (2015) The increasing burden and complexity of multimorbidity. BMC Public Health 15:415. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1186/s12889-015-1733-2&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=25903064&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 7. Foley NC, Affoo RH, Martin RE (2015) A systematic review and meta-analysis examining pneumonia-associated mortality in dementia. Dement Geriatr Cogn Disord 39:52–67. 8. Weir DL, Majumdar SR, McAlister FA, et al. (2015) The impact of multimorbidity on short-term events in patients with community-acquired pneumonia: prospective cohort study. Clin Microbiol Infect 21:264e7–13. 9. Luna CM, Palma I, Niederman MS, et al. (2016) The impact of age and comorbidities on the mortality of patients of different age groups admitted with community-acquired pneumonia. Ann Am Thorac Soc 13:1519–26. [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=http://www.n&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 10. Cillóniz C, Polverino E, Ewig S, et al. (2013) Impact of age and comorbidity on cause and outcome in community-acquired pneumonia. Chest 144:999–1007. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1378/chest.13-0062&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=23670047&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 11. Aujesky D, Fine MJ (2008) The pneumonia severity index: a decade after the initial derivation and validation. Clin Infect Dis 47(Suppl 3):S133–9. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1086/591394&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=18986279&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) [Web of Science](http://www.cmajopen.ca/lookup/external-ref?access_num=000260655900006&link_type=ISI) 12. Vrbova L, Mamdani M, Moineddin R, et al. (2005) Does socioeconomic status affect mortality subsequent to hospital admission for community acquired pneumonia among older persons? J Negat Results Biomed 4:4. [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=15819975&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 13. Metlay JP, Waterer GW, Long AC, et al. (2019) Diagnosis and treatment of adults with community-acquired pneumonia. An official clinical practice guideline of the American Thoracic Society and Infectious Diseases Society of America. Am J Respir Crit Care Med 200:e45–67. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1164/rccm.201908-1581ST&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=http://www.n&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 14. Dela Cruz CS, Evans SE, Restrepo MI, et al. (2021) Understanding the host in the management of pneumonia. An official American Thoracic Society workshop report. Ann Am Thorac Soc 18:1087–97. 15. National Ambulatory Care Reporting System metadata (NACRS) (Canadian Institute for Health Information, Ottawa) Available: [https://www.cihi.ca/en/national-ambulatory-care-reporting-system-metadata-nacrs](https://www.cihi.ca/en/national-ambulatory-care-reporting-system-metadata-nacrs). accessed 2023 Aug. 15. 16. Discharge Abstract Database metadata (DAD) (Canadian Institute for Health Information, Ottawa) Available: [https://www.cihi.ca/en/discharge-abstract-database-metadata-dad](https://www.cihi.ca/en/discharge-abstract-database-metadata-dad). accessed 2023 Aug. 15. 17. Verma AA, Pasricha SV, Jung HY, et al. (2021) Assessing the quality of clinical and administrative data extracted from hospitals: the General Medicine Inpatient Initiative (GEMINI) experience. J Am Med Inform Assoc 28:578–87. [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=http://www.n&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 18. Skull SA, Andrews RM, Byrnes GB, et al. (2008) ICD-10 codes are a valid tool for identification of pneumonia in hospitalized patients aged > or = 65 years. Epidemiol Infect 136:232–40. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1017/S0950268807008564&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=17445319&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) [Web of Science](http://www.cmajopen.ca/lookup/external-ref?access_num=000259337000011&link_type=ISI) 19. Henriksen DP, Nielsen SL, Laursen CB, et al. (2014) How well do discharge diagnoses identify hospitalised patients with community-acquired infections? A validation study. PLoS One 9:e92891. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1371/journal.pone.0092891&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=24663388&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 20. (2015) Quality-based procedures: clinical handbook for chronic obstructive pulmonary disease (acute and postacute) (Health Quality Ontario & Ministry of Health and Long-Term Care, Toronto), pp 1–88. 21. Juurlink D, Preyra C, Croxford R, et al. (2006) Canadian Institute for Health Information Discharge Abstract Database: a validation study (ICES, Toronto). 22. Dragan V, Wei Y, Elligsen M, et al. (2018) Prophylactic antimicrobial therapy for acute aspiration pneumonitis. Clin Infect Dis 67:513–8. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1093/cid/ciy120&link_type=DOI) 23. Mandell LA, Wunderink RG, Anzueto A, et al., Infectious Diseases Society of America. American Thoracic Society (2007) Infectious Diseases Society of America/American Thoracic Society consensus guidelines on the management of community-acquired pneumonia in adults. Clin Infect Dis 44(Suppl 2):S27–72. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1086/511159&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=17278083&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) [Web of Science](http://www.cmajopen.ca/lookup/external-ref?access_num=000243929000001&link_type=ISI) 24. Charlson ME, Pompei P, Ales KL, et al. (1987) A new method of classifying prognostic comorbidity in longitudinal studies: development and validation. J Chronic Dis 40:373–83. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1016/0021-9681(87)90171-8&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=3558716&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) [Web of Science](http://www.cmajopen.ca/lookup/external-ref?access_num=A1987G855900002&link_type=ISI) 25. Quan H, Sundararajan V, Halfon P, et al. (2005) Coding algorithms for defining comorbidities in ICD-9-CM and ICD-10 administrative data. Med Care 43:1130–9. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1097/01.mlr.0000182534.19832.83&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=16224307&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) [Web of Science](http://www.cmajopen.ca/lookup/external-ref?access_num=000233268500010&link_type=ISI) 26. Quan H, Li B, Couris CM, et al. (2011) Updating and validating the Charlson comorbidity index and score for risk adjustment in hospital discharge abstracts using data from 6 countries. Am J Epidemiol 173:676–82. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1093/aje/kwq433&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=21330339&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) [Web of Science](http://www.cmajopen.ca/lookup/external-ref?access_num=000288274800009&link_type=ISI) 27. Escobar GJ, Greene JD, Scheirer P, et al. (2008) Risk-adjusting hospital inpatient mortality using automated inpatient, outpatient, and laboratory databases. Med Care 46:232–9. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1097/MLR.0b013e3181589bb6&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=18388836&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) [Web of Science](http://www.cmajopen.ca/lookup/external-ref?access_num=000253665200002&link_type=ISI) 28. Wong J, Taljaard M, Forster AJ, et al. (2011) Derivation and validation of a model to predict daily risk of death in hospital. Med Care 49:734–43. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1097/MLR.0b013e318215d266&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=21478775&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 29. van Walraven C, Wong J, Bennett C, et al. (2011) The Procedural Index for Mortality Risk (PIMR): an index calculated using administrative data to quantify the independent influence of procedures on risk of hospital death. BMC Health Serv Res 11:258. [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=21982489&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 30. Quan H, Li B, Saunders LD, et al., IMECCHI Investigators (2008) Assessing validity of ICD-9-CM and ICD-10 administrative data in recording clinical conditions in a unique dually coded database. Health Serv Res 43:1424–41. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1111/j.1475-6773.2007.00822.x&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=18756617&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) [Web of Science](http://www.cmajopen.ca/lookup/external-ref?access_num=000257756000018&link_type=ISI) 31. Huang Z (1998) Extensions to the k-means algorithm for clustering large data sets with categorical values. Data Min Knowl Discov 2:283–304. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1023/A:1009769707641&link_type=DOI) [Web of Science](http://www.cmajopen.ca/lookup/external-ref?access_num=000077976300004&link_type=ISI) 32. Thrun MC (2018) Projection-Based Clustering through Self-Organization and Swarm Intelligence: Combining Cluster Analysis with the Visualization of High-Dimensional Data, Approaches to cluster analysis (Springer Vieweg Wiesbaden), pp 21–31. 33. Seymour CW, Kennedy JN, Wang S, et al. (2019) Derivation, validation, and potential treatment implications of novel clinical phenotypes for sepsis. JAMA 321:2003–17. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1001/jama.2019.5791&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=http://www.n&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 34. Austin PC (2009) Using the standardized difference to compare the prevalence of a binary variable between two groups in observational research. Commun Stat Simul Comput 38:1228–34. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1080/03610910902859574&link_type=DOI) 35. 1. Chambers JM, 2. Hastie TJ , eds (1992) Statistical models in S (Wadsworth & Brooks/Cole Advanced Books & Software, Pacific Grove (CA)). 36. Zeileis A (2006) Object-oriented computation of sandwich estimators. J Stat Softw 16:1–16. 37. Zeileis A, Köll S, Graham N (2020) Various versatile variances: an object-oriented implementation of clustered covariances in R. J Stat Softw 95:1–36. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.18637/jss.v095.i01&link_type=DOI) 38. Hagemann A (2017) Cluster-robust bootstrap inference in quantile regression models. J Am Stat Assoc 112:446–56. 39. Whitty CJM, MacEwen C, Goddard A, et al. (2020) Rising to the challenge of multimorbidity. BMJ 368:l6964. [FREE Full Text](http://www.cmajopen.ca/lookup/ijlink/YTozOntzOjQ6InBhdGgiO3M6MTQ6Ii9sb29rdXAvaWpsaW5rIjtzOjU6InF1ZXJ5IjthOjQ6e3M6ODoibGlua1R5cGUiO3M6NDoiRlVMTCI7czoxMToiam91cm5hbENvZGUiO3M6MzoiYm1qIjtzOjU6InJlc2lkIjtzOjE3OiIzNjgvamFuMDZfMi9sNjk2NCI7czo0OiJhdG9tIjtzOjIxOiIvY21ham8vMTEvNS9FNzk5LmF0b20iO31zOjg6ImZyYWdtZW50IjtzOjA6IiI7fQ==) 40. BMJ Best Practice: comorbidities — treat the whole patient (BMJ, London (UK)) Available: [https://bestpractice.bmj.com/info/comorbidities/](https://bestpractice.bmj.com/info/comorbidities/). accessed 2023 Aug. 15. 41. Ramirez JA, Wiemken TL, Peyrani P, et al., University of Louisville Pneumonia Study Group (2017) Adults hospitalized with pneumonia in the United States: incidence, epidemiology, and mortality. Clin Infect Dis 65:1806–12. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1093/cid/cix647&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=http://www.n&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 42. Di Yacovo S, Garcia-Vidal C, Viasus D, et al. (2013) Clinical features, etiology, and outcomes of community-acquired pneumonia in patients with diabetes mellitus. Medicine (Baltimore) 92:42–50. [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=http://www.n&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 43. Falguera M, Pifarre R, Martin A, et al. (2005) Etiology and outcome of community-acquired pneumonia in patients with diabetes mellitus. Chest 128:3233–9. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1378/chest.128.5.3233&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=16304267&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) [Web of Science](http://www.cmajopen.ca/lookup/external-ref?access_num=000233508400022&link_type=ISI) 44. Kornum JB, Thomsen RW, Riis A, et al. (2007) Type 2 diabetes and pneumonia outcomes: a population-based cohort study. Diabetes Care 30:2251–7. [Abstract/FREE Full Text](http://www.cmajopen.ca/lookup/ijlink/YTozOntzOjQ6InBhdGgiO3M6MTQ6Ii9sb29rdXAvaWpsaW5rIjtzOjU6InF1ZXJ5IjthOjQ6e3M6ODoibGlua1R5cGUiO3M6NDoiQUJTVCI7czoxMToiam91cm5hbENvZGUiO3M6NzoiZGlhY2FyZSI7czo1OiJyZXNpZCI7czo5OiIzMC85LzIyNTEiO3M6NDoiYXRvbSI7czoyMToiL2NtYWpvLzExLzUvRTc5OS5hdG9tIjt9czo4OiJmcmFnbWVudCI7czowOiIiO30=) 45. Martins M, Boavida JM, Raposo JF, et al. (2016) Diabetes hinders community-acquired pneumonia outcomes in hospitalized patients. BMJ Open Diabetes Res Care 4:e000181. [Abstract/FREE Full Text](http://www.cmajopen.ca/lookup/ijlink/YTozOntzOjQ6InBhdGgiO3M6MTQ6Ii9sb29rdXAvaWpsaW5rIjtzOjU6InF1ZXJ5IjthOjQ6e3M6ODoibGlua1R5cGUiO3M6NDoiQUJTVCI7czoxMToiam91cm5hbENvZGUiO3M6NjoiYm1qZHJjIjtzOjU6InJlc2lkIjtzOjExOiI0LzEvZTAwMDE4MSI7czo0OiJhdG9tIjtzOjIxOiIvY21ham8vMTEvNS9FNzk5LmF0b20iO31zOjg6ImZyYWdtZW50IjtzOjA6IiI7fQ==) 46. Manzoor S, Colacci M, Moggridge J, et al. (Jan 23, 2023) EMERGE: evaluating the value of measuring random plasma glucose values for managing hyperglycemia in the inpatient setting. J Gen Intern Med doi:10.1007/s11606-022-08004-3. [Epub ahead of print]. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1007/s11606-022-08004-3.&link_type=DOI) 47. Brunetti VC, Ayele HT, Yu OHY, et al. (2021) Type 2 diabetes mellitus and risk of community-acquired pneumonia: a systematic review and meta-analysis of observational studies. CMAJ Open 9:E62–70. [Abstract/FREE Full Text](http://www.cmajopen.ca/lookup/ijlink/YTozOntzOjQ6InBhdGgiO3M6MTQ6Ii9sb29rdXAvaWpsaW5rIjtzOjU6InF1ZXJ5IjthOjQ6e3M6ODoibGlua1R5cGUiO3M6NDoiQUJTVCI7czoxMToiam91cm5hbENvZGUiO3M6NToiY21ham8iO3M6NToicmVzaWQiO3M6NzoiOS8xL0U2MiI7czo0OiJhdG9tIjtzOjIxOiIvY21ham8vMTEvNS9FNzk5LmF0b20iO31zOjg6ImZyYWdtZW50IjtzOjA6IiI7fQ==) 48. Kornum JB, Thomsen RW, Riis A, et al. (2008) Diabetes, glycemic control, and risk of hospitalization with pneumonia: a population-based case-control study. Diabetes Care 31:1541–5. [Abstract/FREE Full Text](http://www.cmajopen.ca/lookup/ijlink/YTozOntzOjQ6InBhdGgiO3M6MTQ6Ii9sb29rdXAvaWpsaW5rIjtzOjU6InF1ZXJ5IjthOjQ6e3M6ODoibGlua1R5cGUiO3M6NDoiQUJTVCI7czoxMToiam91cm5hbENvZGUiO3M6NzoiZGlhY2FyZSI7czo1OiJyZXNpZCI7czo5OiIzMS84LzE1NDEiO3M6NDoiYXRvbSI7czoyMToiL2NtYWpvLzExLzUvRTc5OS5hdG9tIjt9czo4OiJmcmFnbWVudCI7czowOiIiO30=) 49. Juurlink DN (2014) The cardiovascular safety of azithromycin. CMAJ 186:1127–8. [FREE Full Text](http://www.cmajopen.ca/lookup/ijlink/YTozOntzOjQ6InBhdGgiO3M6MTQ6Ii9sb29rdXAvaWpsaW5rIjtzOjU6InF1ZXJ5IjthOjQ6e3M6ODoibGlua1R5cGUiO3M6NDoiRlVMTCI7czoxMToiam91cm5hbENvZGUiO3M6NDoiY21haiI7czo1OiJyZXNpZCI7czoxMToiMTg2LzE1LzExMjciO3M6NDoiYXRvbSI7czoyMToiL2NtYWpvLzExLzUvRTc5OS5hdG9tIjt9czo4OiJmcmFnbWVudCI7czowOiIiO30=) 50. Bonaldo G, Andriani LA, D’Annibali O, et al. (2019) Cardiovascular safety of macrolide and fluoroquinolone antibiotics: an analysis of the WHO database of adverse drug reactions. Pharmacoepidemiol Drug Saf 28:1457–63. 51. Čelutkienė J, Balčiūnas M, Kablučko D, et al. (2017) Challenges of treating acute heart failure in patients with chronic obstructive pulmonary disease. Card Fail Rev 3:56–61. 52. (2020) Corticosteroids in community-acquired pneumonia. JAMA 323:887–8. 53. Siemieniuk RAC, Meade MO, Alonso-Coello P, et al. (2015) Corticosteroid therapy for patients hospitalized with community-acquired pneumonia. Ann Intern Med 163:519–28. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.7326/M15-0715&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=26258555&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 54. Lloyd M, Karahalios A, Janus E, et al., Improving Evidence-Based Treatment Gaps and Outcomes in Community-Acquired Pneumonia (IMPROVE-GAP) Implementation Team at Western Health (2019) Effectiveness of a bundled intervention including adjunctive corticosteroids on outcomes of hospitalized patients with community-acquired pneumonia: a stepped-wedge randomized clinical trial. JAMA Intern Med 179:1052–60. 55. Esteban A, Anzueto A, Frutos F, et al., Mechanical Ventilation International Study Group (2002) Characteristics and outcomes in adult patients receiving mechanical ventilation: 28-day international study. JAMA 287:345–55. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1001/jama.287.3.345&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=11790214&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) [Web of Science](http://www.cmajopen.ca/lookup/external-ref?access_num=000173294700029&link_type=ISI) 56. (2020) Global strategy for the diagnosis, management, and prevention of chronic obstructive pulmonary disease: 2020 report. Global Initiative for Chronic Obstructive Lung Disease. 57. de Miguel-Díez J, López-de-Andrés A, Hernández-Barrera V, et al. (2017) Impact of COPD on outcomes in hospitalized patients with community-acquired pneumonia: Analysis of the Spanish national hospital discharge database (2004–2013). Eur J Intern Med 43:69–76. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1016/j.ejim.2017.06.008&link_type=DOI) 58. Mortensen EM, Coley CM, Singer DE, et al. (2002) Causes of death for patients with community-acquired pneumonia: results from the pneumonia patient outcomes research team cohort study. Arch Intern Med 162:1059–64. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1001/archinte.162.9.1059&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=11996618&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) [Web of Science](http://www.cmajopen.ca/lookup/external-ref?access_num=000175512300015&link_type=ISI) 59. Thomsen RW, Kasatpibal N, Riis A, et al. (2008) The impact of pre-existing heart failure on pneumonia prognosis: population-based cohort study. J Gen Intern Med 23:1407–13. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1007/s11606-008-0672-3&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=18574639&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 60. Daniel P, Woodhead M, Welham S, et al. (2016) Mortality reduction in adult community-acquired pneumonia in the UK (2009–2014): results from the British Thoracic Society audit programme. Thorax 71:1061–3. [Abstract/FREE Full Text](http://www.cmajopen.ca/lookup/ijlink/YTozOntzOjQ6InBhdGgiO3M6MTQ6Ii9sb29rdXAvaWpsaW5rIjtzOjU6InF1ZXJ5IjthOjQ6e3M6ODoibGlua1R5cGUiO3M6NDoiQUJTVCI7czoxMToiam91cm5hbENvZGUiO3M6OToidGhvcmF4am5sIjtzOjU6InJlc2lkIjtzOjEwOiI3MS8xMS8xMDYxIjtzOjQ6ImF0b20iO3M6MjE6Ii9jbWFqby8xMS81L0U3OTkuYXRvbSI7fXM6ODoiZnJhZ21lbnQiO3M6MDoiIjt9) 61. Feagan BG, Marrie TJ, Lau CY, et al. (2000) Treatment and outcomes of community-acquired pneumonia at Canadian hospitals. CMAJ 162:1415–20. [Abstract/FREE Full Text](http://www.cmajopen.ca/lookup/ijlink/YTozOntzOjQ6InBhdGgiO3M6MTQ6Ii9sb29rdXAvaWpsaW5rIjtzOjU6InF1ZXJ5IjthOjQ6e3M6ODoibGlua1R5cGUiO3M6NDoiQUJTVCI7czoxMToiam91cm5hbENvZGUiO3M6NDoiY21haiI7czo1OiJyZXNpZCI7czoxMToiMTYyLzEwLzE0MTUiO3M6NDoiYXRvbSI7czoyMToiL2NtYWpvLzExLzUvRTc5OS5hdG9tIjt9czo4OiJmcmFnbWVudCI7czowOiIiO30=) 62. Tang KL, Eurich DT, Minhas-Sandhu JK, et al. (2011) Incidence, correlates, and chest radiographic yield of new lung cancer diagnosis in 3398 patients with pneumonia. Arch Intern Med 171:1193–8. [CrossRef](http://www.cmajopen.ca/lookup/external-ref?access_num=10.1001/archinternmed.2011.155&link_type=DOI) [PubMed](http://www.cmajopen.ca/lookup/external-ref?access_num=21518934&link_type=MED&atom=%2Fcmajo%2F11%2F5%2FE799.atom) 63. 1. Little TD Masyn KE (2013) in The Oxford Handbook of Quantitative Methods: Statistical Analysis, Latent class analysis and finite mixture modeling, ed Little TD (Oxford University Press, Oxford (UK)), pp 551–611. 64. Grant RW, McCloskey J, Hatfield M, et al. (2020) Use of latent class analysis and k-means clustering to identify complex patient profiles. JAMA Netw Open 3:e2029068. * © 2023 CMA Impact Inc. or its licensors