{'fraction_non_alphanumeric': 0.04108438335242459, 'fraction_numerical': 0.034949726358661067, 'mean_word_length': 5.077660891089109, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 5, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Identifying pre-existing conditions and multimorbidity patterns associated with in-hospital mortality in patients with COVID-19

We investigated the association between a wide range of comorbidities and COVID-19 in-hospital mortality and assessed the influence of multi morbidity on the risk of COVID-19-related death using a large, regional cohort of 6036 hospitalized patients. This retrospective cohort study was conducted using Patient Administration System Admissions and Discharges data. The International Classification of Diseases 10th edition (ICD-10) diagnosis codes were used to identify common comorbidities and the outcome measure. Individuals with lymphoma (odds ratio [OR], 2.78;95% CI,1.64–4.74), metastatic cancer (OR, 2.17; 95% CI,1.25–3.77), solid tumour without metastasis (OR, 1.67; 95% CI,1.16–2.41), liver disease (OR: 2.50, 95% CI,1.53–4.07), congestive heart failure (OR, 1.69; 95% CI,1.32–2.15), chronic obstructive pulmonary disease (OR, 1.43; 95% CI,1.18–1.72), obesity (OR, 5.28; 95% CI,2.92–9.52), renal disease (OR, 1.81; 95% CI,1.51–2.19), and dementia (OR, 1.44; 95% CI,1.17–1.76) were at increased risk of COVID-19 mortality. Asthma was associated with a lower risk of death compared to non-asthma controls (OR, 0.60; 95% CI,0.42–0.86). Individuals with two (OR, 1.79; 95% CI, 1.47–2.20; P < 0.001), and three or more comorbidities (OR, 1.80; 95% CI, 1.43–2.27; P < 0.001) were at increasingly higher risk of death when compared to those with no underlying conditions. Furthermore, multi morbidity patterns were analysed by identifying clusters of conditions in hospitalised COVID-19 patients using k-mode clustering, an unsupervised machine learning technique. Six patient clusters were identified, with recognisable co-occurrences of COVID-19 with different combinations of diseases, namely, cardiovascular (100%) and renal (15.6%) diseases in patient Cluster 1; mental and neurological disorders (100%) with metabolic and endocrine diseases (19.3%) in patient Cluster 2; respiratory (100%) and cardiovascular (15.0%) diseases in patient Cluster 3, cancer (5.9%) with genitourinary (9.0%) as well as metabolic and endocrine diseases (9.6%) in patient Cluster 4; metabolic and endocrine diseases (100%) and cardiovascular diseases (69.1%) in patient Cluster 5; mental and neurological disorders (100%) with cardiovascular diseases (100%) in patient Cluster 6. The highest mortality of 29.4% was reported in Cluster 6.


Results
Analytical population. The dataset used in this study was based on the hospital identifying the admission as a COVID-19 admission and coding the method of admission accordingly. In effect, 8524 records identified as COVID-19 hospital admissions were initially considered for inclusion. Patients (n = 1075) were then excluded from the analysis if COVID-19 was not confirmed by laboratory testing or not diagnosed clinically or epidemiologically as reflected in the ICD-10 coding (note that the method of admission was not retrospectively amended). In addition, 552 patients with no ICD-10 codes were excluded. In effect, analyses were restricted to patients with ICD-10 diagnosis code for COVID-19, including primary or secondary diagnosis code of U07.1 and U07.2, with complete ICD-10 data on pre-existing health conditions. The ICD-10 diagnosis codes from multiple records of hospital admissions for a specific individual, including transfers between or within hospitals, were combined and the duplicate ICD-10 codes removed (n = 861). This resulted in a subset of 6036 (70.8%) hospitalized COVID-19 cases included in the analysis (Fig. 1). Out of 6036 patients, 5955 (98.7%) represented cases when COVID-19 was confirmed by laboratory testing (ICD-10 diagnosis code U07.1) while 81 (1.3%) corresponded to COVID-19 cases that were diagnosed clinically or epidemiologically since laboratory testing was inconclusive or not available (ICD-10 diagnosis code U07.2).

Comorbidities and in-hospital mortality in patients with COVID-19. An overview of associations
between different comorbidities examined in this study and in-hospital mortality in patients with COVID-19 are shown in Table 2. Only 15.3% (187/1225) of patients who died in hospital from COVID-19 had no documented long-term conditions. Out of patients who were discharged, 31.7% (1526/4811) had no record of pre-existing long-term conditions. However, it is worth noting that patients with no record of pre-existing long-term conditions who died were significantly older (median (IQR): 81 (72-86) years) than those who were discharged (58  years) (P < 0.05). Age was the factor most strongly associated with higher risk of COVID-19-associated mortality with a clear large gradient seen with increasing age (e.g., OR, 3.62; 95% CI, 1.83-7.71; P < 0.001 in patients aged 50-59 years; OR, 8.98; 95% CI, 4.69-17.24; P < 0.001 in patients aged 60-69 years; and OR, 14.53; 95% CI, 7.62-27.69; P < 0.001 in patients 70-79 years compared with those aged 40 to 49 years). The largest mortality risk was observed in patients aged ≥ 80 years compared with those aged 40-49 years (OR, 23.77; 95% CI, 12. 48-45.27; P < 0.001). No significant difference in risk of COVID-19-related death was found between the age groups 0-40 years and 40-49 years (OR, 0.60; 95% CI, 0.20-1.77, P = 0.36). The risk of death was significantly higher in men (OR, 1.41; 95% CI, 1.22-1.62; P < 0.001). Furthermore, individuals with obesity (OR, 5.28; 95% CI, 2.92-9.52; P < 0.001), lymphoma ( (Table 2). Increasing number of comorbidities was associated with a greater COVID-19 in-hospital mortality risk. Individuals with one pre-existing health condition had an adjusted OR for in-hospital death of 1.44 (95% CI, 1.18-1.75; P < 0.001), compared to those with no pre-existing health conditions (Table 3). Furthermore, the risk of death was increasingly higher in patients with two (OR, 1.79; 95% CI, 1.47-2.20; P < 0.001), and three or more comorbidities (OR, 1.80; 95% CI, 1.43-2.27; P < 0.001). Analyses stratified by sex showed a similar trend, i.e., both men and women with multiple pre-existing health conditions had increased odds of death when compared to those with no pre-existing health conditions (Table 3). However, the interaction test showed that the effect of the number of pre-existing conditions on the risk of COVID-19-related death did not differ significantly between males and females.
Multimorbidity clusters. Out of 6,036 hospitalised patients, 2313 (38.3%) had ≥ 2 conditions. The optimal k-modes clustering solution yielded 6 patient groups. The number of patients in each group ranged from 648 (Cluster 2) to 2293 (Cluster 3). The identified patient clusters had significant differences in mortality, ranging from 15.3% (Cluster 4) to 29.4% (Cluster 6). Median (IQR) age ranged from 63 (49-78) (Cluster 4) to 82 (74-86) (Cluster 6). Table 4 describes the prevalence of diseases in each patient cluster. Within each patient cluster, disease groups with the highest prevalence were highlighted in bold while other less common conditions with a higher prevalence than in other clusters were underlined. Cluster 1 was characterised by cardiovascular (100.0%), genitourinary (15.6%), and respiratory diseases (9.9%). Cluster 2 included a high percentage of patients with mental and neurological disorders (100%), metabolic and endocrine diseases (19.3%), and genitourinary diseases (9.4%). It was also Cluster 2 that had the highest percentage of patients with digestive diseases (2.5%). Note that digestive disease group included only patients with liver disease. Cluster 3 was characterized by respiratory (100%), cardiovascular (15.0%), and metabolic and endocrine diseases (12.7%) while Cluster 5 corresponded to the patient group with a high prevalence of metabolic & endocrine (100%), cardiovascular (69.1%), and genitourinary diseases (15.0%). The highest percentage of patients with cancer (5.9%) was found in Cluster 5. Finally, Cluster 6, with the highest mortality, was characterized by cardiovascular diseases (100.0%),  Sensitivity analysis. The results of two sensitivity analyses, based on identifying COVID-19 related admissions with ICD-10 code diagnosis: (1) including only primary or secondary diagnosis code of U07.1 (Table 5) and (2) including U07.1 or U07.2 as the primary code (Table 6), were consistent with those of the primary analysis. The magnitude and significance of associations between potential risk factors and the outcome measure remained robust under different assumptions. The difference in results between the primary and sensitivity analyses was observed only for neurological disorders, i.e., neurological disorders were found to be associated with increased risk of COVID-19-related deaths in sensitivity analysis in which COVID-19 deaths were defined as COVID-19 related admissions with ICD-10 diagnosis code U07.1 or U07.2 as the primary code for clinical diagnosis (OR, 1.45; 95% CI, 1.04-2.01; P = 0.03).  www.nature.com/scientificreports/ Compared with people with no underlying conditions, the risk of death was significantly higher for those with one or more comorbidities (OR, 1.63; 95% CI, 1.36-1.94; P < 0.001) ( Table S2 in Supplementary Material). Moreover, the risk of death was increasingly higher in patients with two and three or more comorbidities (Table S3 and S4 in Supplementary Material). These results strengthened the credibility of our main findings by highlighting the significant association between underlying health conditions and in-hospital mortality in individuals with COVID-19. www.nature.com/scientificreports/ Since the primary analysis indicated that asthma was associated with a decreased risk of COVID-19-related death, we also performed a third sensitivity analysis to compare the risk of death from COVID-19 in people with asthma compared to those with no documented comorbidities. Our results showed no difference in risk of death from COVID-19 in people with asthma compared to patients with no record of underlying long-term conditions (OR, 1.22; 95% CI, 0.86-1.75; P = 0.27), suggesting that the presence of other comorbidities may have an impact on the significance of results of the primary analysis. We intend to investigate the extents of multimorbidity in patients with asthma as well as the relationship between asthma medications and different multimorbidity patterns in future work.

Discussion
Early recognition of high-risk and critically ill patients has become a priority in improving treatment and reducing mortality among patients who contracted SARS-CoV-2 2 . In this study, we examined the impact of multiple long-term conditions on the in-hospital mortality in individuals with COVID-19 to determine risk factors for COVID-19-related deaths. Our findings can help improve the effectiveness of management of COVID-19 patients and contribute to further development of policies for prevention and response to COVID-19 and its critical outcomes. Using a large, well-documented, regional cohort of hospitalised COVID-19 patients, we found that pre-existing health conditions, including obesity, liver disease, renal disease, metastatic cancer, solid tumour without metastasis, lymphoma, congestive heart failure, chronic obstructive pulmonary disease, and dementia are clinical risk factors associated with COVID-19 mortality, with chronic obstructive pulmonary disease, renal disease, and dementia being the most prevalent among those that died.
Our results are consistent with several studies 4,5,7,[19][20][21][22] . Chronic obstructive pulmonary disease (COPD) was found to increase the odds of death by nearly threefold in a large meta-analysis of 30 studies that examined the vital status of COVID-19 patients with COPD 19 . Substantial mortality rates in COVID-19 patients with COPD were also observed by other studies 20,21 . It has been suggested that the association between COPD and risk of poor outcomes in COVID-19 might be related to the fact that the innate and acquired antiviral immune responses in individuals with COPD are impaired, leading to delayed virus clearance 19 . Dementia was identified as a major risk factor for death in COVID-19 cases 22,23 . Wang et al. 22 showed that the odds of COVID-19-related death in patients with dementia doubled when compared to individuals without dementia, with the highest mortality risk in adults with vascular dementia (OR, 3.17; 95% CI, 2.97-3.37, P < 0.001). Some evidence suggested that elevated risk of neurological complications from COVID-19 in people with dementia might be caused www.nature.com/scientificreports/ by the pre-existing brain pathology 24 . For example, the breakdown of the blood-brain barrier, i.e., a defence mechanism against disease-causing pathogens, in patients with Alzheimer's disease and vascular dementia, can increase the ability of bacterial, fungal, and viral pathogens to access the brain more easily and this in turn may have an effect on the severity of COVID-19 and associated fatal outcomes 25,26 . A number of studies investigated the impact of chronic diseases and health conditions on risk of COVID-19-related death through multivariate analyses 4,5,[7][8][9][10]27 ; however, some of them were based on a small sample size, included a limited list of underlying medical conditions or focused on the impact of a specific medical condition on COVID-19 mortality adjusted for demographic and/or socioeconomic characteristics 7,9,10 . Moreover, previous evidence on the relationship between multi morbidity and COVID-19-related death was limited 4,5 . A UK prospective observational study of 20,133 patients who were hospitalised with COVID-19 showed that the risk of death was higher for patients with dementia, chronic pulmonary disease, kidney disease, cardiac disease, liver disease, malignancy, and obesity 5 .
Another study based on 10,926 COVID-19-related deaths reported similar results: individuals with COVID-19 and underlying kidney disease, liver disease, cardiovascular disease, chronic respiratory diseases, obesity, and recent history of haematological malignancy or other cancers had a greater risk of dying 27 . Cancer, possibly due to its ability to cause immunodeficiency inherently or through medication, was identified as a major risk factor for COVID-19-related deaths in several studies 4,5,27 . In individuals with heart failure and kidney disease, both the SARS-CoV-2 infection and the immune response to the viral infection could destabilize pre-existing conditions, leading to the development of acute cardiac 28 or kidney 29 injuries and hence, increase the risk of a fatal outcome associated with COVID-19 30 . People with obesity have been previously characterized by systemic low-grade inflammation, impaired immune response to infections, and higher susceptibility and mortality associated with infections 17,31,32 . These factors may all lead to a greater mortality risk in those who contracted SARS-CoV-2. Several studies emerging from different countries identified obesity as an independent risk factor for hospitalisation and death due to COVID-19 11,12,18,31,32 , with a BMI ≥ 35 kg/m2 radically increasing the mortality risk 33 . In our study, asthma diagnosis was present among 7.6% of hospitalized patients with COVID-19, which is lower than the 9.8% prevalence of asthma in Northern Ireland 34 . At the same time, we found asthma to be associated with a lower risk of COVID-19-related death in the full sample, although the results of our sensitivity analysis showed no difference in risk of COVID-19-related death in patients with asthma compared to individuals with no documented comorbidities. This finding supports the mixed evidence on the role of asthma in influencing COVID-19-related outcomes. The Open SAFELY study identified asthma as a significant risk factor of death in patients with COVID-19 and indicated that patients on inhaled corticosteroids have the greatest risk 3 . In vitro studies have suggested that corticosteroids use can result in impaired antiviral innate immune responses 35,36 and delayed virus clearance 37 , and this in turn can potentially lead to more severe outcomes in individuals who contracted SARS-CoV-2; however, this hypothesis has to be further tested. Several studies found no statistically significant difference in mortality risk by asthma status 38,39 . For example, the prospective case-control study based on the UK Biobank data showed that asthma did not significantly increase the odds of COVID-19 mortality 38 . More recent work however indicated that people with asthma were in fact less likely to die due to COVID-19 40 . Interestingly, the risk of severe clinical outcomes of COVID-19 was lower in people with allergic asthma 41 . Akenroye et al. 42 suggested that some asthma medications, such as mepolizumab, reslizumab, and benralizumab, may enhance immune responses to viral infections and potentially decrease susceptibility to additional lung injury from diseases such as COVID-19. The association between asthma and COVID-19 mortality could also differ by the degree of asthma severity 3 . Given that our sensitivity analysis showed no difference in risk of COVID-19-related death in patients with asthma compared to individuals with no documented comorbidities, but our primary results indicated a lower risk of COVID-19-related death in patients with asthma compared to non-asthma controls, further analysis is required to evaluate the impact of differing patterns and extents of multimorbidity in patients with asthma (e.g. cardiometabolic multimorbidity) and the role of different asthma medications when examining COVID-19-related outcomes.
We confirmed that COVID-19-related mortality increased with older age. In particular, patients in age groups ≥ 50 years old had higher odds of COVID-19-related death when compared with those aged 40 to 49 years. Higher COVID-19 mortality among older adults has been known since early in the pandemic and has been described in detail 3,27,43 . The analysis based on the US epidemiologic data demonstrated that the overall COVID-19 case-fatality rate among individuals infected with SARS-CoV-19 was highest in those aged ≥ 85 years (range 10-27%), followed by those aged 65-84 years (3-11%), aged 55-64 years (1-3%), and aged < 55 years (< 1%) 43 . Greater risk of death due to COVID-19 in older adults is likely related to their declining immune defences, however other hypotheses have also been suggested 44 .
Finally, we demonstrated that multimorbidity is an important clinical characteristic to consider in the context of the COVID19 pandemic. Our findings showing the higher COVID-19 in-hospital mortality risk in people with multiple underlying conditions are consistent with other published data 45 . A cross-sectional, multicenter, observational study of Italian COVID-19 population found that increasing multimorbidity, measured by the Charlson Comorbidity Index, was strongly associated with COVID-19-related death 46 . Kim et al. 47 , in their study of 2,491 COVID-19 patients, reported that individuals with 3 or more underlying conditions had a 1.8 times higher risk of in-hospital mortality than patients with no underlying conditions. Multimorbidity was also reported to be a predictor of the risk of COVID-19 infection in a large UK Biobank cohort of 428,199 participants; however, the authors did not report on the relationship between the co-existence of multiple underlying conditions and risk of death 48 .
We also analysed multimorbidity patterns by identifying clusters of conditions in hospitalised COVID-19 patients using an unsupervised machine learning technique (k-mode clustering). Our study revealed recognisable co-occurrences of COVID-19 with different combinations of diseases, with a potentially causal link or underlying mechanism, including cardiovascular diseases, respiratory diseases, mental and neurological disorders, metabolic and endocrine diseases, and renal diseases. For example, Cluster 1 characterized by the group of individuals www.nature.com/scientificreports/ with cardiovascular diseases had also a high percentage of cases with COPD. Previous studies suggested that the systemic inflammatory response associated with COPD may act as a possible mechanism that links COPD with increased risk for cardiovascular diseases 49 . Furthermore, it was demonstrated that COPD is associated with increased carotid intimal medial thickness (CIMT) and that among those with COPD, CIMT is linked to higher cardiovascular mortality 50 . Evidence also supports the association between renal disease and cognitive impairment (Cluster 2); however, the mechanisms underlying this association are not completely elucidated 51 . Although, direct impact of uremic toxins has been proposed as a potential cause of cognitive decline, studies showed that dialysis prescription did not reverse symptoms of cognitive impairment 52 . Co-occurrence of other conditions, such as, (i) metabolic syndrome (defined by the presence of metabolic abnormalities including obesity, glucose intolerance, and elevated blood pressure), cardiovascular disease, and liver disease (Cluster 2, 3 and 5) 53,54 ; (ii) mental disorders and heart disease (Cluster 6) 55 , and (iii) cancer with obesity and diabetes (Cluster 4) 56 has also been broadly documented and shown to be associated with high mortality. Therefore, the identification of these multi morbidity patterns among hospitalized individuals with COVID-19 can help identify opportunities to target patient-centred care towards people with high-risk ages and a specific combination of health conditions, leading to improved clinical outcomes. Note that we acknowledge that a presence of a specific chronic disease or a combination of chronic diseases in our analytic sample may have acted as an effect modifier of COVID-19 death but could also be associated with COVID-19 death via the existence of another common cause i.e., other clinical characteristics or socio-economic factors not included in our study. The strengths of our study include the large, regional cohort of hospitalised COVID-19 patients, providing high statistical power to investigate associations between different risk factors and COVID-19 in-hospital mortality. The use of ICD-10 diagnosis codes assigned by medical professionals working in all hospitals throughout Northern Ireland meant that comprehensive information on a wide range of comorbidities were available. Our results remained robust in a number of sensitivity analyses and reinforced previous findings of a higher risk of COVID-19-related death associated with obesity 12 , liver disease 57 , renal disease 5 , metastatic cancer 58 , congestive heart failure 59 , and COPD 19 . Furthermore, we investigated the associations between several conditions for which little data exist regarding risk for in-hospital mortality in patients with COVID-19, such as hypothyroidism, solid tumour without metastasis, lymphoma, dementia, and other neurological disorders. We also added to the, so far inconclusive, evidence on the role of asthma in influencing COVID-19-related outcomes. Finally, given a paucity of research on the impact of multi morbidity on the risk of COVID-19 in-hospital mortality, we examined the association between increasing multi morbidity, multi morbidity patterns, and COVID-19-related death. To our knowledge, this is the first study to characterise patterns of multi morbidity in a hospitalised population with COVID 19 using an unsupervised machine learning approach.
The interpretation of our results should be made considering several limitations. First, due to unavailability of ICD-10 diagnosis codes, we were unable to consider the records of 552 patients with COVID-19, admitted to hospital in the period from March 1, 2020, to January 31, 2021. Furthermore, we have only used the comorbidity data collected in the studied period. Therefore, it is possible we missed some comorbidities by not including information reported at prior admissions. Second, the underlying cause of death was allocated based on the hospital records of ICD-10 diagnostic coding and discharge status, not death certificate; this might have led not only to the underestimation of the real magnitude of mortality due to COVID-19 but also potential misclassification of deaths from other causes. To assess the extent to which these inaccuracies may have affected our estimates, a similar analysis should be performed in the future using death certificate-based ICD-10 diagnosis codes. Third, since the ICD-10 diagnosis codes were assigned by medical professionals working in different hospitals, they may not have captured intended disease concepts with complete consistency. Fourth, our analysis is cross-sectional, meaning that both the independent variables and the outcome were collected simultaneously. Although the central element of the cross-sectional design is the lack of the temporal information required to describe the evolution of the underlying dynamics, in case of our study, the temporal link between the outcome and independent variables can be cautiously assumed since the presence of underlying health conditions most likely preceded the outcome studied (i.e., fatal/non-fatal hospitalization due to . Fifth, the impact of inpatient treatment or procedures performed during hospitalisation as well as the information on the duration of the long-term conditions on patient outcomes was not considered in this study. In addition, unavailability of data on clinical parameters such as oxygen and ventilation treatment limited the opportunity of a more comprehensive analysis including multiple levels of severity as the outcome. Sixth, the purpose of using the clustering approach was for this method to potentially become part of the pipeline for discovering the various multi morbidity profiles that are associated with mortality due to COVID-19. Extensions to this research may include a more robust look at the effects of the hyper parameters and different analytic samples on the associations between different disease groups and COVID-19-related deaths. Furthermore, the results of the clustering algorithm should be further validated by domain experts to determine its clinical utility. It is important to highlight that this analysis was performed among a cohort of individuals hospitalized with COVID-19 and may not be generalizable to those non-hospitalized. The lack of data on non-hospitalized individuals with SARS-CoV-2 infection limited our ability to examine utilization of our algorithm outside of the hospitalized patients. However, our population represented a diverse cohort with a variety of comorbidities and is representative of high-risk individuals across Northern Ireland. Seventh, as mentioned above, our analytic sample does not represent a true random selection from the population since it is solely based on hospitalised patients, that died or did not die during the admission episode following COVID-19 diagnosis. This non-randomness of sample selection may have had an impact on our study results. Older adults, those obese, and with pre-existing medical conditions are more susceptible to adverse COVID-19 outcomes, while COVID-19 severity likely influences hospitalisation 60 . As such, characteristics related to our sample inclusion, also relate to the hypothesised risk factors and the outcome of interest and hence, investigating these factors within hospitalised patients may have introduced the possibility of collider bias. In future work, the likelihood and extent of collider bias associated with sample selection could www.nature.com/scientificreports/ be evaluated by comparing means, variances, and distributions of variables in the sample of individuals with COVID-19 that have been hospitalized with those in a representative sample of the NI population 61 . This could not be evaluated in the current data set. Finally, our study may be subject to other potential sources of bias. For example, selection bias could have been introduced by not including non-hospitalized individuals living in long-term care or assisted living facilities that suffered from severe COVID-19 symptoms and subsequently died due to COVID-19 62 . Bias due to omission of a confounder from the model (unmeasured confounder) is also a possibility. Several demographic factors (e.g., race/ethnicity, disability status, socio-economic status), as well as structural factors (e.g., literacy) were not included in the analysis [63][64][65][66] . Moreover, we did not control for the effect of concurrently prescribed medications such as antipsychotics, proton pump inhibitors, antihistamines, and opioid analgesics that were previously shown to increase the risk of adverse outcomes among patients with COVID-19 67 . The association between certain drug classes, polypharmacy, and the risk of COVID-19 mortality should be addressed in future work. In addition, further analysis on host-specific genetic factors and their relationships with severe manifestations of COVID-19, in particular, in individuals with no underlying health conditions that died as a direct consequence of SARS-CoV-2 infection, could allow us to better understand relationships between environmental risk factors and severe outcomes associated with COVID-19 and identify potential targets for therapeutic development. This study estimated the impact of the broad spectrum of comorbidities on COVID-19 in-hospital mortality using a large, regional cohort of hospitalized patients. We found that individuals with lymphoma, metastatic cancer, solid tumour without metastasis, liver disease, congestive heart failure, chronic obstructive pulmonary disease, obesity, renal disease, and dementia were at significantly increased risk for COVID-19-related death. In addition, we showed that the presence of multiple coexisting health conditions further increased odds of death. Given that effective clinical management of patients with multimorbidity is therefore a critical step towards their survival from COVID-19, multidisciplinary clinical teams should prepare comprehensive care plans that can be streamlined and meet the dynamic needs of such patients. Future work should investigate the associations between different patterns of multimorbidity and COVID-19 mortality to better characterize those individuals who would benefit from enhanced preventive measures.

Methods
Study design and study population. This retrospective cohort study was conducted using the Patient Administration System (PAS) data from Northern Ireland, covering the period from March 1, 2020, to January 31, 2021. The PAS data includes patient level data on hospital admissions, transfers, and discharges for all NHS Trusts in Northern Ireland. In total, 8524 records identified as COVID-19 hospital admissions (using PAS admission codes) were initially selected for analysis (Fig. 1). We then excluded n = 1075 patients that were not clinically, epidemiologically, or laboratory-confirmed COVID-19 cases as indicated by COVID-19-related ICD-10 diagnostic codes of U07.1 and U07.2, leaving 7449 patients eligible for analysis. Next, we excluded n = 552 patients for whom ICD-10 codes of U07.1 and U07.2 were not recorded. In effect, analyses were restricted to n = 6897 patients with ICD-10 codes for COVID-19, including the primary or secondary diagnosis code of U07.1 and U07.2, with complete ICD-10 data on underlying conditions. Finally, we combined the ICD-10 diagnosis codes from multiple hospitalizations due to COVID-19, including transfers between or within hospitals, and removed the duplicate ICD-10 codes (n = 861). Note that the discharge code of the most recent hospital stay was used for patients with multiple records of hospital admissions. This resulted in a subset of 6036 hospitalized COVID-19 cases included in the analysis. Specifically, we compared characteristics of COVID-19 patients that were discharged from hospitals (n = 4811) with those that died in hospital during the admission episode following COVID-19 diagnosis (n = 1225). Figure 1 shows the stages of the selection process.
Outcomes. The outcome used in our analysis were hospital discharge and in-hospital COVID-19-related death, defined on the basis of a discharge status and the International Classification of Diseases (version 10; ICD-10) code diagnosis, of U07.1 ("COVID-19, virus identified") or U07.2 ("COVID-19, virus not identified"), recorded as either a primary or secondary diagnosis to ensure the inclusion of all people who had COVID-19 in hospital 68 . Specifically, U07.1 code was assigned when COVID-19 was confirmed by laboratory testing irrespective of severity of clinical signs or symptoms while U07.2 code was used when COVID-19 was diagnosed clinically or epidemiologically but laboratory testing was inconclusive or not available. For patients with multiple records of hospital admissions identified as COVID-19 hospital admissions, including those transferred between or within hospitals, the discharge code of the most recent hospital stay, was considered the outcome measure. Therefore, the same person was not included more than once in the analytic sample while all in-hospital COVID-19-related deaths were counted. The presence of specific comorbidities in patients with multiple records was established by combining the ICD-10 diagnosis codes from all visits and removing the duplicate codes.
Covariates. We examined the following patient-level data for each admission: (i) demographics (age, sex); and (ii) ICD-10 diagnosis codes that were used to identify common comorbidities. The presence of specific comorbidities in patients with multiple records of hospital admissions, including those transferred between or within hospitals, was established by combining the ICD-10 diagnosis codes from all considered visits and removing the duplicate codes. Subsequently, the discharge code of the most recent hospital stay for a patient with multiple records of hospital admissions was considered the outcome measure. The ICD-10 coding criteria for all comorbidities were adapted from the Elixhauser comorbidity measure 69 . Accordingly, the following comorbidities were considered: congestive heart failure (I09. 9  The association between patient characteristics and in-hospital mortality was examined using logistic regression models. Adjusted logistic regression analyses were presented as odds ratios (OR) with 95% confidence intervals (95% CI) and included age, sex, and pre-existing long-term conditions identified using ICD-10 coding rules. Statistical significance was determined using the Wald's test. Non-linear dependence between age and the outcome measure was evaluated by comparing the generalised additive model with linear and spline terms for age against the model with only a linear term. The likelihood-ratio χ2 test indicated that linearity assumption was not satisfied (p < 0.001). We therefore grouped age into six categories (0-40, 40-50, 50-60, 60-70, 70-80 and ≥ 80 years) since odds ratios calculated for variables modelled as polynomials in the model, are not directly interpretable. Additionally, we provided the odds ratios adjusted for age parametrised as a 4-knot restricted cubic spline in the Supplementary Material (Table S1 in Supplementary Material). Furthermore, the non-linear relationship between age and the risk of death involving COVID-19 is shown in Fig.F1 in Supplementary Material.
We investigated the potential effect of having multiple pre-existing long-term conditions on the outcome measure (hospital discharge vs. in-hospital COVID-19-related death). The analysis was conducted for the total population and stratified by sex. Comorbidities were expressed as categorical variables from 0 to 2, then 3 or higher. The model including categories of comorbidities was adjusted for age and sex in the analysis including all patients and age only in the sex-stratified analysis, with age modelled as a polynomial in the logistic regression model.
We further investigated patterns of multimorbidity by performing a cluster analysis. First, we classified all considered health conditions into eight groups: (1) autoimmune diseases including rheumatoid arthritis and collagen vascular diseases; (2) metabolic and endocrine diseases including diabetes, hypothyroidism, and obesity; (3) respiratory diseases including chronic obstructive pulmonary disease and asthma; (4) cardiovascular diseases including hypertension, congestive heart failure, and cardiac arrhythmias; (5) mental and neurological disorders including depression, dementia, and neurological disorders; (6) neoplasms including lymphoma, metastatic cancer, and solid tumour without metastasis; (7) digestive system diseases including liver disease; and (8) genitourinary system diseases including renal diseases. To identify disease clusters within the analytic sample, we used the k-modes clustering approach, an unsupervised machine learning algorithm for grouping categorical data 70 . The method partitions the objects (patients) into a specified number of clusters such that the distance from objects to the assigned cluster modes is minimized. We used the Hamming distance to determine the dissimilarity of two objects. The optimal number of clusters was determined with the modified Elbow method using within-cluster differences 71 . Frequencies and percentages of disease groups were then calculated for each cluster. Descriptive statistics of age and in-hospital mortality in patients with COVID-19 were also provided for each cluster. All analyses were conducted using R Studio v.1.2.5033 operating R v.3.6.3.

Sensitivity analysis.
Four sensitivity analyses were performed to validate the robustness of the main findings. First, COVID-19-related deaths were defined as COVID-19 related admissions with ICD-10 code diagnosis, including only primary or secondary diagnosis code of U07.1 which is likely to have a greater degree of specificity. Second, COVID-19-related deaths were defined as COVID-19 related admissions with ICD-10 diagnosis code U07.1 or U07.2 as the primary code for clinical diagnosis. Note that U07.1 code represents cases when COVID-19 was confirmed by laboratory testing while U07.2 code corresponds to COVID-19 cases that were diagnosed clinically or epidemiologically since laboratory testing was inconclusive or not available. Third, to assess the relative importance of underlying health conditions to adverse outcomes, we compared the risk of death from COVID-19 in individuals with comorbidity and those with no recorded comorbidity, adjusting for sex and age parametrised as a 4-knot restricted cubic spline. Finally, since asthma was found to be associated with a decreased risk of COVID-19-related death, we also performed a fourth sensitivity analysis to compare the risk of death from COVID-19 in people with asthma and those with no documented comorbidities. The model was adjusted for sex and age parametrised as a 4-knot restricted cubic spline.
Ethical considerations. The

Data availability
De-identified study data are available for access by accredited researchers in accordance with data sharing policies of HSCB Performance Management Service Improvement Directorate.