BackgroundThroughout the evolution of the COVID‐19 pandemic, the severity of the disease has varied. The aim of this study was to determine how patients' comorbidities affected and were related to, different outcomes during this time.MethodsRetrospective cohort study of all patients testing positive for SARS‐CoV‐2 infection between March 1, 2020, and January 9, 2022. We extracted sociodemographic, basal comorbidities, prescribed treatments, COVID‐19 vaccination data, and outcomes such as death and admission to hospital and intensive care unit (ICU) during the different periods of the pandemic. We used logistic regression to quantify the effect of each covariate in each outcome variable and a random forest algorithm to select the most relevant comorbidities.ResultsPredictors of death included having dementia, heart failure, kidney disease, or cancer, while arterial hypertension, diabetes, ischemic heart, cerebrovascular, peripheral vascular diseases, and leukemia were also relevant. Heart failure, dementia, kidney disease, diabetes, and cancer were predictors of adverse evolution (death or ICU admission) with arterial hypertension, ischemic heart, cerebrovascular, peripheral vascular diseases, and leukemia also relevant. Arterial hypertension, heart failure, diabetes, kidney, ischemic heart diseases, and cancer were predictors of hospitalization, while dyslipidemia and respiratory, cerebrovascular, and peripheral vascular diseases were also relevant.ConclusionsPreexisting comorbidities such as dementia, cardiovascular and renal diseases, and cancers were those most related to adverse outcomes. Of particular note were the discrepancies between predictors of adverse outcomes and predictors of hospitalization and the fact that patients with dementia had a lower probability of being admitted in the first wave.