Three Years of the Coronavirus Disease 2019 Pandemic in a European Region: A Population-Based Longitudinal Assessment in Madrid Between 2020 and 2022

Abstract Background Our objective was to assess the health impact of coronavirus disease 2019 (COVID-19) during 2020–2022 in the Madrid region. Methods We included all individuals registered in the Madrid Health System Registry as of 31 December 2019, and followed them until 31 December 2022. Using a unique personal identifier, we linked the databases of primary care, hospitals, pharmacies, certified laboratories performing diagnostic tests, vaccines, and mortality. Results Of 6 833 423 individuals, 21.4% had a confirmed COVID-19 diagnosis, and 1.5% had a COVID-19 hospitalization (primary diagnosis). Thirty-day mortality was 1.6% for confirmed COVID-19 (from 11.4% in first semester 2020 to 0.4% in first semester 2022). Thirty-day mortality was 10.8% for COVID-19 hospitalizations (from 14.0% in first semester 2020 to 6.0% in second semester 2022). There were 24 073 deaths within 30 days of a confirmed COVID-19 diagnosis. Advanced age, male sex, higher socioeconomic deprivation, and comorbidities were associated with higher mortality. Conclusions By linking administrative and clinical databases, we characterized the burden of the COVID-19 pandemic in Madrid over 3 years. Our analysis proposes a high-level framework for comparisons of the burden of COVID-19 across areas worldwide.

The coronavirus disease 2019 (COVID-19) pandemic is among history's most widely studied public health crises.Many studies have described multiple aspects of the epidemiology of COVID-19, including its incidence, morbidity, mortality, and risk factors [1][2][3][4].However, few integrated descriptions exist of the epidemiologic evolution and health consequences of the pandemic in entire populations for extended periods [5].Longitudinal studies of COVID-19 at the population level are needed to characterize the pandemic's impact and to compare it across locations [6].
The most helpful population-level studies of COVID-19 would (1) cover the entire population in a particular geographic area; (2) encompass both the pre-and postvaccination phases of the pandemic as well as the spread of different variants of concern of severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2); and (3) be based on high-quality data sources that can be used to link data for each individual in the population and thus allow integration of data on documented infections, hospitalizations, admissions to intensive care unit (ICU), deaths, and vaccinations with clinical and socioeconomic information.The availability of high-resolution clinical data is critical.For example, most studies have been unable to distinguish between hospitalizations with COVID-19 coded as a primary diagnosis versus secondary diagnosis [5,[7][8][9][10], which precludes an accurate quantification of the impact on the disease, both overall and by age group.
Here, we provide an integrated summary of the health impact of COVID-19 in 2020-2022 in the Madrid region, a COVID-19 in Madrid, 2020-2022 • OFID • 1 Open Forum Infectious Diseases M A J O R A R T I C L E population with universal access to healthcare that, as of June 2018, had the highest life expectancy in the European Union [11].By linking information from several population registries and databases, we characterized the cohort of 6.8 million Madrid residents in the period 2020-2022.Our longitudinal analysis proposes a high-level framework for comparisons of the burden of COVID-19 across metropolitan areas worldwide.

METHODS
The Madrid region (Spanish: Comunidad de Madrid), located in the center of the Iberian Peninsula, is 1 of the 17 autonomous communities of Spain, which includes the second-largest metropolitan area in the European Union (Supplementary Figure 1).About twice the size of Rhode Island, it has a population of about 7 million people, half of whom are within the city limits of Madrid.The Madrilenian Health Service (Servicio Madrileño de Salud [SERMAS]) provides healthcare services and public health programs in the Madrid region.
Our study includes all residents of Madrid on 31 December 2019, and summarizes their COVID-19-related data through 31 December 2022.To do so, we linked individual-level data from several population registries managed by SERMAS.

Madrid Health System Registry
We included all individuals registered in the Madrid Health System Registry (SIP-CIBELES) as of 31 December 2019.Since healthcare coverage is universal in Madrid, this registry includes virtually the entire population (99.9% of individuals included in municipal registers).SIP-CIBELES also contains data on temporary residents coming from other Spanish regions or European Union member states, undocumented immigrants, and special populations (asylum seekers and victims of human trafficking).Among other variables, the registry includes the date of birth, sex, district of residence, date of death, and a unique personal identification code (Código de Identificación Personal Autonómico [CIPA]) for linkage with other databases [12].
We computed a previously proposed socioeconomic deprivation index using 6 census tract indicators related to occupation, unemployment, education, and internet access [13].This deprivation index has been found to be associated with higher mortality [14] and COVID-19 incidence up to September 2021 [15].Since we only had access to the resident's postal code, we averaged the census tract values (weighted by total population) in each postal code.

Primary Care Database
The electronic health records database for primary care (AP-Madrid) includes data on all interactions of Madrid residents with the network of primary care centers.AP-Madrid is linked to all public and certified private laboratories with molecular or antigen diagnostic test results for COVID-19.AP-Madrid is also linked to the vaccine registry with data on the types and dates of COVID-19 vaccines.Patient data and clinical activity are based on the latest International Classification of Primary Care (ICPC-2) [16].We extracted diagnoses of obesity, diabetes mellitus, hypertension, cardiovascular disease (ischemic heart disease, heart failure, atrial fibrillation), cerebrovascular disease (stroke, transient ischemic attack), asthma, chronic obstructive pulmonary disease (COPD), chronic renal failure, connective tissue disease (rheumatoid arthritis, ankylosing spondylitis, systemic lupus erythematosus, other), liver cirrhosis, solid and hematologic neoplasms (diagnosed in the previous 5 years), human immunodeficiency virus (HIV) infection, organ transplantation, depressive disorder, psychosis (affective psychosis, schizophrenia, other organic psychoses), and dementia (see ICPC-2 codes listed in Supplementary Annex 1).

Hospital Database
The Minimum Basic Data Set (Conjunto Mínimo Básico de Datos) records all admissions to hospitals (public, private, public/private) that provide publicly funded healthcare in the region.Clinical documentation specialists at each institution code the information at discharge according to standardized procedures using the International Classification of Diseases, 10th Revision, Clinical Modification [ICD-10-CM]) [17].The database includes demographics, dates of admission and discharge, hospital wards during admission (including ICU), comorbidities at entry, procedures during hospitalization, primary and secondary diagnoses at discharge and whether they were present on admission, and vital status at discharge (Supplementary Annex 2).Charlson comorbidities present at admission were determined using the ICD-10 coding algorithms developed by Quan et al [18] (Supplementary Annex 3).

Pharmacy Database
Farmadrid registers all prescription drugs dispensed at community and hospital pharmacies in Madrid; medications are coded using the Anatomical Therapeutic Chemical classification system [19].

Viral Variants of Concern
Information about the SARS-CoV-2 variants of concern was obtained from the Weekly Epidemiological Report from the Epidemiological Surveillance Network of the Community of Madrid [20].This bulletin summarizes the screening data of viral variants by specific polymerase chain reaction (PCR) provided by the reference microbiology laboratories.Given the excellent correlation between screening by specific PCR and the result by sequencing, this information provides a valid indicator of the circulation of viral variants in the region.The weekly distribution of viral variants during 2021 and 2022 in Madrid, the week in which they were first detected, and the week in which they became predominant (>50% of those screened) are shown in Supplementary Figure 2.

Outcomes
We studied confirmed COVID-19, COVID-19 hospitalization, admission to ICU, need for mechanical ventilation, and length of hospital stays.We also assessed death within 30 days of a positive diagnostic test for SARS-CoV-2 and death within 30 days from the hospital admission date for COVID-19 hospitalizations.
Confirmed COVID-19 was defined as either a positive PCR or antigen test for SARS-CoV-2.The primary care database included all laboratory-confirmed COVID-19 cases up to December 2021.Since January 2022, antigen tests are available without a prescription, and their results have not been uniformly reported to the health system.From 1 July 2020 to 1 June 2022, a PCR for SARS-CoV-2 was routinely performed upon hospital admission to all patients, irrespective of symptomatology.Since June 2022, diagnostic tests were performed at the time of admission if symptoms suggestive of COVID-19 were present.
COVID-19 hospitalization was defined as a hospitalization with COVID-19 present on admission with an ICD-10-CM code of COVID-19 as a primary or secondary diagnosis.Hospital-acquired COVID-19 was defined as a COVID-19 infection not present on admission in which the positive diagnostic test was performed between days 8-14 (probable) or after day 14 (definite) after admission [21].

Data Analysis
We used descriptive statistics (proportions, median and interquartile range [IQR]) to describe the sociodemographic and clinical characteristics of the study population.We computed the cumulative incidence (incidence proportion) of mortality after a documented COVID-19 diagnosis and after COVID-19 hospitalization.All calculations were made overall and for each of the 6 semesters (ie, 6-month periods) in the period 2020-2022, restricted to individuals alive at the beginning of each semester.Analyses were performed with Phyton (version 3.9; Phyton Software Foundation, Beaverton, Oregon).

Ethics Approval
Ethics approval was provided by the institutional review board of the first author's institution (code: FIB-ANA-2020-08).
Figure 1 shows the frequency of confirmed COVID-19 diagnoses and hospitalizations with COVID-19 as the primary diagnosis over time, as well as periods of lockdown and curfews, periods of the predominance of the different viral variants, and milestones of COVID-19 vaccination.The peak of 1008 confirmed COVID-19 per 100 000 persons occurred in week 1, 2022, 4 weeks after the Omicron variant was first detected in the region.The peak of 122 hospitalizations per 100 000 persons occurred during the first wave (week 12, 2020).
Table 2 shows the characteristics of individuals (56% male) hospitalized with COVID-19 as the primary diagnosis in 2020-2022.In the first semester of 2020, the median age at admission was 68, the Charlson comorbidity score was 1.0, and admission to ICU and mechanical ventilation was required in 5.9% and 6.2% of hospitalizations, respectively.In the second semester of 2022, the median age was 79, and the Charlson score 2.0, but ICU and mechanical ventilation decreased to 2.7% and 1.2%, respectively.
The proportion of hospitalizations with COVID-19 as a secondary diagnosis increased from <10% in 2020 to 30% in 2022 (Supplementary Figure 4).Compared with patients hospitalized with COVID-19 as a primary diagnosis, these patients were younger, more likely to be female, and had a lower proportion of ICU admissions and mechanical ventilation (Supplementary Table 2).
The proportion of hospitalizations with probable or definite hospital-acquired COVID-19 was highest (5.3%) in the last semester of 2022 (Supplementary Figure 4).Compared to patients with hospitalizations with COVID-19 as a primary diagnosis, these patients were, on average, 3 years older, less likely to be male (43.4% vs 56.3%), had higher Charlson comorbidity scores, and had longer hospital stays (28 vs 7 days) (Supplementary Table 2).

Vaccination
The COVID-19 vaccination rollout started in week 52, 2020, with national prioritization policies.In the period 2020-2022, 19 941 946 vaccine doses were administered.By December 2021, 75.2% of the population and 88.9% of those aged 50 or older had received at least 1 vaccine dose.The cumulative uptake of the vaccine in the study population overall and by age group is shown in Supplementary Figure 5.The vaccination status of the study population, including the proportion of those with 1, 2, and 3 doses, is shown in Supplementary Table 3.

Antivirals
From April to December 2022, a total of 2937 COVID-19 ambulatory infections were treated with nirmatrelvir plus ritonavir and 115 with molnupiravir.These antivirals were authorized for use within the first 5 days of symptoms among ambulatory individuals with confirmed COVID-19 and severe immunosuppression or those aged ≥65 years with severe comorbidities (Supplementary Figure 6).

Mortality
In 2020-2022, 30-day mortality was documented in 24 073 of the 1 459 970 (1.6%) confirmed COVID-19 diagnoses, with 20 241 deaths occurring in 191 683 (10.6%) diagnoses among people aged ≥70 years.The 30-day mortality risk after confirmed COVID-19 by sex, age, deprivation index, and comorbidities broken down by semesters is shown in Table 3. Mortality among confirmed cases was greatest in the first semester of 2020 (11.4%) and lowest in the first semester of 2022 (0.4%).Across the study period, mortality was higher for males than females and increased with age.According to the area-level deprivation index, mortality was 1.3% in the least deprived quintile and 1.9% in the most deprived quintile.Overall, people with dementia, COPD, chronic kidney disease, cerebrovascular disease, and chronic heart disease had a 30-day mortality risk of >10%.
The 30-day mortality risk was 10.8% after hospitalization with COVID-19 as the primary diagnosis, ranging from 14.0% in the first semester of 2020 to 6.0% in the second semester of 2022 (Table 2).Mortality was higher among those needing ICU admission (15.7%) or mechanical ventilation (19.0%).The 30-day mortality risk was 7.7% for hospitalizations with COVID-19 coded as a secondary diagnosis, ranging from 16.2% in the first semester of 2020 to 4.7% in the second semester of 2022 (Figure 2 and Supplementary Table 4).

DISCUSSION
We characterized the health burden of COVID-19 longitudinally over the first 3 years of the pandemic in the population of a large metropolitan area.By using population-based data from several linked administrative and clinical databases, we described the evolution of the pandemic in the nearly 7 million residents of Madrid over 3 years and 7 epidemic waves.
Our findings indicate that, between 2020 and 2022, 1.3% of the population in the region was hospitalized due to COVID-19, and 0.4% of the population died within 30 days from a COVID-19 diagnosis.Among people who were aged ≥70 years, nearly 9% required hospitalization due to COVID-19, and 2.3% died within 30 days from a COVID-19 diagnosis.The probability of dying from COVID-19 was greater in older persons, men, and those with comorbidities, especially dementia, COPD, chronic kidney disease, cerebrovascular disease, and chronic heart disease.
Like other countries in the European Union, Spain had a considerable reduction in life expectancy in 2020 [22].However, life expectancy in the Madrid region continued to be among the highest in the European Union after the first 2 years of the pandemic [23].
A study like ours has been reported from the region of Stockholm, with complete population coverage of 1.8 million inhabitants and high-resolution data on patient characteristics and comorbid conditions [5].Nevertheless, the study was limited to the first year of the pandemic and lacked information on vaccination rollout and frequency of viral variants.A higher socioeconomic deprivation was associated with a smaller increase in mortality risk than in other studies in Europe [24].Disease severity is also expected to have been affected by changes in the predominant viral variant [25][26][27][28], acquired immunity, and vaccination coverage [29][30][31] during each period.Of note, by December 2021, almost 75% of the population and almost 90% of those older than 50 years had received at least 1 dose of the vaccine.About 20% of the population had a confirmed diagnosis of COVID-19 in the period 2020-2022.However, this figure is an underestimate of the proportion of infected individuals: A populationbased seroprevalence study estimated that about 11.5% of the population of Madrid had already developed antibodies against SARS-CoV-2 by October 2020 [32].The underestimation was particularly high during the first wave of the pandemic when, due to a lack of adequate testing, the number of hospitalizations was closest to the number of documented infections [33].Beginning in the second semester of 2020, COVID-19 testing became widely available, and all individuals admitted to hospitals were systematically tested, which reduced the underestimation of infections.After December 2021, the underestimation of new diagnoses started to grow again because of the availability of home tests whose results were not systematically reported to the health system.COVID-19 was the primary diagnosis in 7% of all hospitalizations during the study period, with 8% requiring ICU admission.The infection was present on admission but coded as a secondary diagnosis in 13% of hospitalizations with a COVID-19 code, reaching 30% when Omicron and its subvariants were predominant in 2022.Almost 2% of COVID-19 hospitalizations were hospital-acquired; these patients were older and sicker than those with community-acquired infections, a finding concordant with what has been found in other studies [34].
Individuals hospitalized with COVID-19 in 2022 had shorter stays and a lower risk of death, even though, on average, they were >10 years older and had more severe comorbidities than individuals hospitalized in the previous 2 years.Similar findings have also been reported in hospitals across the United States [35].Of note, among those requiring critical care in 2022, mortality was similar to or higher than that in the pandemic's first semester, as has also been reported across hospitals in the United States [36].
Our study has the strengths of being population-based and with high-quality and integrated data sources.The most comparable previous study covered 1.8 million individuals from the Stockholm region [5] but was limited to the first year of the pandemic.Furthermore, our study could discriminate between the different types of COVID-19 hospitalizations, which is necessary (particularly during the Omicron dominance period) to distinguish hospitalizations due to COVID-19 from those with an incidental COVID-19 diagnosis.On the other hand, our study lacks individual data on race/ethnicity and socioeconomic status.Nonetheless, this limitation is partially compensated by data on a validated deprivation index at the postal code level.Limitations also include lack of information about smoking and alcohol use and on some pharmacological interventions that likely influenced the prognosis of COVID-19.In conclusion, by linking population-based administrative and clinical databases, we characterized the health burden of the COVID-19 pandemic in Madrid over 3 years.Our longitudinal analysis proposes a high-level framework for comparisons of the burden of COVID-19 across areas worldwide.To better understand the impact of the COVID-19 pandemic on healthcare, these comparisons should include the direct morbidity and mortality from the disease, its postacute sequelae, and the disruptions it caused in routine healthcare.

Figure 1 .
Figure 1.The graphs show the absolute number and rates per 100 000 persons of confirmed coronavirus disease 2019 (COVID-19) (A) and hospitalizations with COVID-19 as the primary diagnosis (B) over time.The graphs also show periods of lockdown and curfews, periods of the predominance of the different viral variants, and milestones of COVID-19 vaccination.Abbreviations: COVID-19, coronavirus disease 2019; VOCs, variants of concern.

Figure 2 .
Figure 2. Thirty-day mortality from the date of hospital admission for coronavirus disease 2019 hospitalizations present on admission and coded as a primary (blue) or secondary (red) diagnosis.Abbreviation: Sem, semester (6-month period).

Table 1 . Baseline Characteristics of Residents in the Madrid Region on 31 December 2019
Data are presented as No. (%) unless otherwise indicated.Abbreviations: COPD, chronic obstructive pulmonary disease; HIV, human immunodeficiency virus; IQR, interquartile range.a Ischemic heart disease, heart failure, atrial fibrillation.b Stroke, transient ischemic attack.c Rheumatoid arthritis, ankylosing spondylitis, systemic lupus erythematosus, and other connective tissue disorders.d Affective psychosis, schizophrenia, other organic psychoses.