Oversight
The institutional review boards at Hamad Medical Corporation and Weill Cornell Medicine–Qatar approved this retrospective study with a waiver of informed consent. The study was reported according to the Strengthening the Reporting of Observational Studies in Epidemiology (STROBE) guidelines (Extended Data Table 3).
Study population and data sources
This study was conducted on the population of Qatar before and after the introduction of the Omicron variant on 19 December 2021 (ref. 16). The first analysis assessed the effectiveness of pre-Omicron infection in preventing reinfection with a pre-Omicron virus between 5 February 2020 (the onset of the COVID-19 pandemic in Qatar17) and 18 December 2021. The second analysis assessed the effectiveness of Omicron infection in preventing reinfection with an Omicron virus between 19 December 2021 and 12 February 2024 (marking the end of the study).
The data encompassed the national, federated databases for COVID-19 laboratory testing, vaccination, hospitalization and death, retrieved from the integrated, nationwide, digital-health information platform (Supplementary Methods section 2). These databases have captured SARS-CoV-2-related data with no missing information since the onset of the pandemic, including all PCR tests regardless of location or facility, and, from 5 January 2022, all medically supervised rapid antigen tests (Supplementary Methods section 3). SARS-CoV-2 testing was extensive in Qatar until 31 October 2022, with nearly 5% of the population being tested every week, primarily for routine purposes such as screening or meeting travel-related requirements56,60. Subsequently, testing rates decreased, with less than 1% of the population being tested per week61. Most infections during the pandemic were diagnosed through routine testing rather than symptomatic presentation56,60.
Qatar launched its COVID-19 vaccination programme in December 2020, using messenger RNA vaccines and prioritizing individuals on the basis of coexisting conditions and age criteria56,59. COVID-19 vaccination was provided free of charge, regardless of citizenship or residency status, and was nationally tracked56,59. Demographic information, including sex, age and nationality, was extracted from the records of the national health registry. Qatar shows demographic diversity, with 89% of its residents being expatriates from more than 150 countries17. Detailed descriptions of Qatar’s population and national databases have been previously reported17,32,51,53,56,60,62.
Study design
The effectiveness of natural infection against reinfection was estimated using the test-negative, case-control study design, which compares the odds of previous infection among SARS-CoV-2-positive tests (cases) to that among SARS-CoV-2-negative tests (controls)11,12,15,16,63,64. The assessment was conducted both overall and by time since previous infection, using 3-month intervals.
Cases and controls were determined on the basis of the results of SARS-CoV-2 tests conducted during each analysis period. Cases were defined as SARS-CoV-2-positive tests, whereas controls were defined as SARS-CoV-2-negative tests. SARS-CoV-2 reinfection is conventionally defined as a documented infection more than or equal to 90 days after a previous infection, to avoid misclassifying prolonged test positivity as reinfection with shorter time intervals16,21,65,66. Consequently, cases or controls preceded by SARS-CoV-2-positive tests within 90 days were excluded. Previous infection was defined as a SARS-CoV-2-positive test more than or equal to 90 days before the study test.
To comply with the non-differential healthcare-seeking behaviour assumption inherent to the test-negative study design15,63,64, only tests with a documented reason for testing were included in the analysis. In the Omicron era analysis, cases or controls preceded by a pre-Omicron infection were excluded from the analysis, as the research question pertained to the effectiveness of Omicron immunity, rather than pre-Omicron immunity, against Omicron reinfection. The protection provided by pre-Omicron immunity against Omicron reinfection has been previously investigated14,16,60.
In estimating effectiveness in preventing reinfection, cases and controls were matched exactly one-to-two by sex, 10-year age group, nationality, number of coexisting conditions (ranging from zero to more than or equal to six; Supplementary Methods section 1), number of vaccine doses (ranging from zero to more than or equal to four), calendar week of the SARS-CoV-2 test, method of testing (PCR or rapid antigen) and reason for testing. This matching strategy aimed to balance observed confounders that could potentially influence the risk of infection across the exposure groups17,67,68,69,70. The selection of matching factors was guided by findings from earlier studies on Qatar’s population11,56,57,58,59,71 and the need to comply with the non-differential healthcare-seeking behaviour assumption inherent to the test-negative design15,63,64. This requirement was met by matching by the calendar week of the SARS-CoV-2 test, method of testing and reason for testing. In estimating effectiveness in preventing severe72, critical72 or fatal73 COVID-19 on reinfection, a one-to-five matching ratio was applied to enhance statistical precision.
Classification of severe72, critical72 and fatal73 COVID-19 followed the World Health Organization guidelines (Supplementary Methods section 4). The assessments were made by trained medical personnel independent of study investigators and using individual chart reviews. As part of the national protocol, each individual who had a SARS-CoV-2-positive test and concurrent COVID-19 hospital admission was subject to an infection severity assessment every 3 days until discharge or death, irrespective of hospital length of stay26. Individuals who progressed to severe, critical or fatal COVID-19 between the SARS-CoV-2-positive test and the end of this study were classified on the basis of their worst outcome, starting with death, followed by critical disease and then severe disease.
The variant status of infections was determined on the basis of the dominant variant at the time of infection diagnosis. Infections were categorized as pre-Omicron or Omicron. The duration of dominance for every variant throughout the pandemic was determined using Qatar’s variant genomic surveillance74,75,76 (Extended Data Fig. 3), which includes viral genome sequencing74 and multiplex real-time quantitative PCR with reverse transcription (RT–qPCR) variant screening75 of weekly collected random positive clinical samples (Supplementary Methods section 3). Once the first massive Omicron wave started, virtually all infections were due to Omicron, as it displaced all pre-Omicron variants16,60,62.
Statistical analysis
All records of SARS-CoV-2 testing were examined for the selection of cases and controls, but only matched samples were analysed. Cases and controls were described using frequency distributions and measures of central tendency and compared using standardized mean differences. A standardized mean difference of less than or equal to 0.1 indicated adequate matching77.
Odds ratios (ORs), comparing odds of previous infection among cases versus controls, and associated 95% CIs were derived using conditional logistic regression. Analyses stratified by time since previous infection considered the date for the most recent documented infection. CIs were not adjusted for multiplicity and interactions were not investigated. The reference group for all estimates comprised individuals with no documented previous infection.
Effectiveness measures and associated 95% CIs were calculated as 1-OR of previous infection among cases versus controls if the OR was less than one, and as 1/OR-1 if the OR was more than or equal to one (refs. 15,32,63,78). This approach ensured a symmetric scale for both negative and positive effectiveness, spanning from −100 to 100%, resulting in a clear and meaningful interpretation of effectiveness, regardless of the value being positive or negative.
In addition to estimating effectiveness of previous infection in preventing reinfection, regardless of symptoms, effectiveness was also assessed specifically against symptomatic reinfection. This was accomplished by restricting the analysis to tests performed owing to clinical suspicion, indicating the presence of symptoms consistent with a respiratory tract infection.
Subgroup analyses were performed, considering only unvaccinated and vaccinated individuals, respectively. A sensitivity analysis was undertaken by redefining SARS-CoV-2 reinfection as a documented infection occurring more than or equal to 40 days after a previous infection, instead of the conventional more than or equal to 90 days. This adjustment was informed by a recent analysis suggesting the adequacy of a 40-day time window to define reinfection21. Statistical analyses were conducted in STATA/SE version v.18.0 (Stata).
Further validation analyses
Previous infection misclassification
Under-ascertainment of infection introduces misclassification of previous infection status into the test-negative design used in this study, potentially biasing the estimates15. To assess the impact of under-ascertainment on estimates of waning immune protection, mathematical modelling simulations were conducted by extending our previous work on the test-negative design methodology15. These simulations evaluated the impact of an infection ascertainment rate of only 10%, indicating that 90% of SARS-CoV-2 infections are undocumented and would thus be misclassified. The model incorporated a gradual (linear) waning of the protective effect of infection against reinfection. Analyses were performed for both pre-Omicron and Omicron waning patterns, with immune protection durations set at 3 years for the pre-Omicron era14 and 1 year for the Omicron era. The results were reported at the 2-year mark from the onset of both the pre-Omicron and Omicron pandemic phases. A detailed description of the model, its methods and previous analyses can be found elsewhere15.
Coexisting conditions misclassification
Coexisting conditions were identified by analysing electronic health record encounters for each individual within the national public healthcare system’s database (Supplementary Methods section 1). However, this approach may not capture all conditions, as some may be undiagnosed or diagnosed at private facilities with unavailable records. To assess the impact of this potential bias on the estimated effectiveness of infection against reinfection, a sensitivity analysis was conducted in which matching by the number of coexisting conditions was entirely removed, simulating a scenario of complete under-ascertainment of these conditions.
Validation using a cohort study design
This study used the test-negative design15. To validate the findings, two extra national, matched, retrospective cohort studies—one for the pre-Omicron era and another for the Omicron era—were conducted. Each study compared the incidence of infection and severe forms of COVID-19 in two national cohorts: individuals with documented primary SARS-CoV-2 infection (primary-infection cohort) and uninfected individuals (uninfected cohort).
The first study estimated the effectiveness of a pre-Omicron primary infection in preventing reinfection with a pre-Omicron virus, and the second study estimated the effectiveness of an Omicron primary infection in preventing reinfection with an Omicron virus. Both studies were conducted over the same study durations as in the main analysis using the test-negative design. Incidence of infection was defined as any PCR-positive or rapid antigen-positive test after the start of follow-up, irrespective of symptomatic presentation.
Cohorts were matched exactly one-to-one by sex, 10-year age group, nationality, number of coexisting conditions, number of vaccine doses at the start of the follow-up, calendar week of the SARS-CoV-2-positive test for the primary-infection cohort and SARS-CoV-2-negative test for the uninfected cohort, method of testing (PCR or rapid antigen) and reason for testing. In both studies, individuals in the matched primary-infection cohort may have contributed follow-up time in the uninfected cohort before their primary infection and subsequently contributed follow-up time as part of the primary-infection cohort after contracting the infection.
Follow-up for each matched pair started 90 days after the primary infection for the individual in the primary-infection cohort. To ensure exchangeability, both members of each matched pair were censored at the earliest occurrence of receiving an extra vaccine dose. Accordingly, individuals were followed until the first of any of the following events: a documented SARS-CoV-2 infection, a new vaccine dose for the individual in either the primary-infection cohort or the uninfected cohort (with matched-pair censoring), death or the administrative end of follow-up, which was set at the end of the study or 15 months after the primary infection, whichever came first.
The overall adjusted hazard ratio (aHR), comparing the incidence of SARS-CoV-2 infection (or severe forms of COVID-19) between the cohorts, and the corresponding 95% CI, were calculated using Cox regression models with adjustment for the matching factors and testing rate in the cohorts, using the Stata v.18.0 stcox command. This adjustment was implemented to ensure precise and unbiased estimation of the standard variance79.
The overall aHR provides a weighted average of the time-varying hazard ratio80. To explore differences in the risk of infection (or severe forms of COVID-19) over time, the aHR was also estimated by 3-month intervals from the start of follow-up using separate Cox regressions, with ‘failure’ restricted to specific time intervals.
Effectiveness of infection against reinfection and against severe, critical or fatal COVID-19, along with the associated 95% CIs, were derived from the aHR as 1-aHR if the aHR was less than one and as 1/aHR-1 if the aHR was more than or equal to one (refs. 32,78). This approach ensured a symmetric scale for both negative and positive effectiveness, spanning from −100 to 100%, resulting in a meaningful interpretation of effectiveness, regardless of the value being positive or negative.
Statistical analyses were performed using Stata/SE v.18.0 (Stata). Further details on this type of cohort study design can be found in our previous publications, which used also the same national databases to estimate the effectiveness of infection against reinfection or the effectiveness of vaccination against infection4,8,10,14,15,30,32,33,45,59,61,62,71,81,82,83.
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.