{"paper_id":"00bf1f68-2959-48b5-9b33-0544a5ef082e","body_text":"1 \nMANUSCRIPT TITLE \n \nImpact of COVID-19 on mental illness in vaccinated and unvaccinated people: a population-based cohort study \nin OpenSAFELY \n \nAUTHORS \n \nVenexia M Walker [1,2,3]*, Praveetha Patalay [4,5]*, Jose Ignacio Cuitun Coronado [1]*, Rachel Denholm \n[1,6,7], Harriet Forbes [8], Jean Stafford [4], Bettina Moltrecht [5], Tom Palmer [1,2], Alex Walker [9], Ellen J. \nThompson [10,11], Kurt Taylor [1], Genevieve Cezard [12,13], Elsie M F Horne [1,4], Yinghui Wei [14], Marwa \nAl Arab [1], Rochelle Knight [1,3,6,15], Louis Fisher [9], Jon Massey [9], Simon Davy [9], Amir Mehrkar [9], Seb \nBacon [9], Ben Goldacre [9], Angela Wood [12,13,16,17,18,19], Nishi Chaturvedi [4]†, John Macleod [15]†, Ann \nJohn [20]†, Jonathan A C Sterne [1,6,7]† \n \nOn behalf of the Longitudinal Health and Wellbeing COVID-19 National Core Study \n \n* authors contributed equally \n† authors contributed equally \n \n[1] Population Health Sciences, University of Bristol, Bristol, UK \n[2] MRC Integrative Epidemiology Unit, University of Bristol, Bristol, UK \n[3] Department of Surgery, University of Pennsylvania Perelman School of Medicine, Philadelphia, \nPennsylvania, USA \n[4] MRC Unit for Lifelong Health and Ageing, University College London, London, UK  \n[5] Centre for Longitudinal Studies, University College London, London, UK \n[6] NIHR Bristol Biomedical Research Centre, Bristol, UK \n[7] Health Data Research UK South-West, Bristol, UK \n[8] Faculty of Epidemiology and Population Health, London School of Hygiene & Tropical Medicine, London, \nUK \n[9] The Bennett Institute for Applied Data Science, Nuffield Department of Primary Care Health Sciences, \nUniversity of Oxford, Oxford, UK \n[10] Department of Twin Research and Genetic Epidemiology, School of Life Course & Population Sciences, \nFaculty of Life Sciences & Medicine, King’s College London, London, UK \n[11] School of Psychology, University of Sussex, Falmer, UK \n[12] British Heart Foundation Cardiovascular Epidemiology Unit, Department of Public Health and Primary \nCare, University of Cambridge, Cambridge, UK  \n[13] Victor Phillip Dahdaleh Heart and Lung Research Institute, University of Cambridge, Cambridge UK  \n[14] Centre for Mathematical Sciences, School of Engineering, Computing and Mathematics, University of \nPlymouth, Plymouth, UK \n[15] The National Institute for Health and Care Research Applied Research Collaboration West (NIHR ARC \nWest) at University Hospitals Bristol and Weston, UK \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \nNOTE: This preprint reports new research that has not been certified by peer review and should not be used to guide clinical practice.\n\n2 \n[16] British Heart Foundation Centre of Research Excellence, University of Cambridge, Cambridge, UK \n[17] National Institute for Health and Care Research Blood and Transplant Research Unit in Donor Health and \nBehaviour, University of Cambridge, Cambridge, UK \n[18] Health Data Research UK Cambridge, Wellcome Genome Campus and University of Cambridge, \nCambridge, UK \n[19] Cambridge Centre of Artificial Intelligence in Medicine \n[20] University of Swansea, Swansea, UK \n \nCORRESPONDING AUTHOR \n \nJonathan Sterne; jonathan.sterne@bristol.ac.uk \n \nABSTRACT \n \nBackground: COVID-19 is associated with subsequent mental illness in both hospital- and population-based \nstudies. Evidence regarding effects of COVID-19 vaccination on mental health consequences of COVID-19 is \nlimited. \n \nMethods: With the approval of NHS England, we used linked electronic health records (OpenSAFELY-TPP) to \nconduct analyses in a ‘pre-vaccination’ cohort (17,619,987 people) followed during the wild-type/Alpha \nvariant eras (January 2020-June 2021), and ‘vaccinated’ and ‘unvaccinated’ cohorts (13,716,225 and 3,130,581 \npeople respectively) during the Delta variant era (June-December 2021). We estimated adjusted hazard ratios \n(aHRs) comparing the incidence of mental illness after diagnosis of COVID-19 with the incidence before or \nwithout COVID-19.  \n \nOutcomes: We considered eight outcomes: depression, serious mental illness, general anxiety, post-traumatic \nstress disorder, eating disorders, addiction, self-harm, and suicide. Incidence of most outcomes was elevated \nduring weeks 1-4 after COVID-19 diagnosis, compared with before or without COVID-19, in each cohort. \nVaccination mitigated the adverse effects of COVID-19 on mental health: aHRs (95% CIs) for depression and \nfor serious mental illness during weeks 1-4 after COVID-19 were 1.93 (1.88-1.98) and 1.42 (1.24-1.61) \nrespectively in the pre-vaccination cohort and 1.79 (1.68-1.91) and 2.21 (1.99-2.45) respectively in the \nunvaccinated cohort, compared with 1.16 (1.12-1.20) and 0.91 (0.84-0.98) respectively in the vaccinated \ncohort. Elevation in incidence was higher, and persisted for longer, after hospitalised than non-hospitalised \nCOVID-19. \n \nInterpretation: Incidence of mental illness is elevated for up to a year following severe COVID-19 in \nunvaccinated people. Vaccination mitigates the adverse effect of COVID-19 on mental health. \n \nFunding: Medical Research Council (MC_PC_20059) and NIHR (COV-LT-0009).  \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n3 \nINTRODUCTION \n \nSARS-CoV-2 infection, and consequent COVID-19, are associated with subsequent mental illness in both \nhospital and population-based studies1,2; for both common mental health difficulties, such as anxiety and \ndepressive symptoms3, and serious mental illness, including psychotic disorders4. Potential mechanisms for \nthese adverse effects of COVID-19 include physiological pathways, such as inflammation and microvascular \nchanges, and psychosocial effects, such as anxiety about the consequences of COVID-19 including long COVID. \nPrevious studies identified associations of COVID-19 with mental illness in both hospitalised patients5,6 and the \ngeneral population1,7,8. Differentiating between hospitalised and non-hospitalised groups can provide insights \ninto the role of COVID-19 severity.9 \n \nRapid rollout of COVID-19 vaccination within a year of the start of the pandemic was a crucial component of \nthe public health response. Although the impacts of vaccination in preventing and reducing the severity of \nCOVID-19 are well-established10,11, there is limited evidence regarding the implications of vaccination for other \nadverse health consequences of COVID-19, including mental illness. Several studies reported short-term \nimprovements in population mental health following vaccination rollout.12,13 However, we did not identify any \nstudies investigating differences in mental illness outcomes following COVID-19 by vaccination status. \n \nRates of SARS-CoV-2 infection, vaccination, and disease severity were patterned by socio-demographic and \nhealth factors including age, sex, ethnicity, income and prior mental illness.14–18 Mental health consequences \nof COVID-19 may also vary between subgroups. For example, older people are at higher risk of more severe \nCOVID-19, and hence may have experienced higher levels of psychological distress. \n \nUsing linked primary and secondary care data from over 17 million people, we examined associations of \nCOVID-19 with subsequent mental illness in the pre-vaccination period of the pandemic and for unvaccinated \nand vaccinated people after vaccination became available. We compared rates of common and severe mental \nillness after a diagnosis of COVID-19 with rates before or without COVID-19. We also investigated variation in \nthese associations between subgroups defined by COVID-19 severity, age, sex, ethnicity, prior mental illness, \nand prior SARS-COV-2 infection. Follow-up of those diagnosed with COVID-19 during the first year of the \npandemic was for up to two years post-diagnosis. \n \nMETHODS \n \nStudy design and data sources \nOur study used OpenSAFELY-TPP, which provides secure, privacy-protecting access to linked data from 24 \nmillion people registered with English general practices (GPs) using TPP SystmOne software. These data \ninclude primary care data linked via pseudonymised NHS number to Secondary Uses Service (SUS) secondary \ncare data, Office of National Statistics (ONS) Death Registry, Second Generation Surveillance System (SGSS) \nCOVID-19 testing data and the Index of Multiple Deprivation (IMD). COVID-19 vaccination records (National \nImmunisation Management System) are available within TPP primary care data. \n \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n4 \nOutcomes were defined using the earliest of: a relevant SNOMED CT code indicating a diagnosis in primary \ncare; start of a secondary care episode with an ICD-10 code indicating a confirmed diagnosis in any position; or \ndeath with an ICD-10 code indicating the diagnosis as either a primary or underlying cause. From the range of \nmental illnesses examined, we present main findings for depression and serious mental illness (composite of \nschizophrenia, schizo-affective disorder, bipolar disorder, and psychotic depression). We also examined \ngeneral anxiety disorders, post-traumatic stress disorder (PTSD), eating disorders, addiction, self-harm and \nsuicide, which are presented in supplementary material. Code lists are available online: \nhttps://github.com/opensafely/post-covid-mentalhealth/tree/main/codelists. \n \nThe date of COVID-19 was defined as the first of: confirmed COVID-19 diagnosis recorded in primary care; \npositive SARS-COV-2 PCR or antigen test recorded in SGSS; start of an episode with a confirmed diagnosis in \nany position in SUS; or death with SARS-COV-2 infection listed in any position on the ONS death registry. \nPeople with a hospital admission record in SUS that included a confirmed diagnosis in the primary position \nwithin 28 days of first COVID-19 were defined as having had ‘hospitalised COVID-19’. All other COVID-19 \ndiagnoses were defined as ‘non-hospitalised’. Covariates identified as potential confounders included age, sex, \nethnicity, area socioeconomic deprivation, smoking status, care home residence, health care work, number of \nGP-patient interactions in 2019, and binary indicators for history of comorbidities (Supplementary Table 1). \n \nStudy population \nThree cohorts were defined (Supplementary Table 2; Supplementary Figure 1). The ‘pre-vaccination’ cohort \nwas followed from January 1st 2020 (baseline) until the earliest of December 14th 202119, outcome event date \nand date of death. Exposure was defined as recorded COVID-19 between baseline and the earliest date of \neligibility for COVID-19 vaccination, date of first vaccination and June 18th 2021 (when all adults became \neligible for vaccination). Follow-up in the ‘vaccinated’ cohort started at the later of baseline and two weeks \nafter a second COVID-19 vaccination and ended at the earliest of December 14th 2021, outcome event date \nand date of death. The ‘unvaccinated’ cohort had not received a COVID-19 vaccine by 12 weeks after they \nbecame eligible for vaccination. Follow-up started at the later of baseline and 12 weeks after vaccination \neligibility and ended at the earliest of December 14th 2021, outcome event date, date of death and date of \nfirst vaccination. \n \nPeople eligible for each cohort were registered with an English GP for at least six months before baseline and \nwere alive with a known age between 18 and 110 years, sex, deprivation, and region at baseline. People were \nexcluded from each cohort if they had any record of SARS-CoV-2 infection before baseline. In the vaccinated \ncohort, people were excluded if they received a vaccination before the start of the vaccine rollout on \nDecember 8th 2020 (indicating an error or participation in a randomized trial); their second dose was dated \nbefore their first dose vaccination (contradictory vaccine record); their second dose was less than three weeks \nafter their first dose; or they received mixed vaccine brands before this was permitted on May 7th 2021. In the \nunvaccinated cohort, people were excluded if they had any record of a COVID-19 vaccination before June 1st \n2021. Vaccine eligibility was defined using the Joint Committee on Vaccination and Immunisation (JCVI) \ngroupings. People who could not be assigned to a JCVI group were excluded.  \n \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n5 \nStatistical analyses \nFor each cohort, baseline characteristics were described, and numbers of outcome events, person-years of \nfollow-up and incidence rates (per 100,000 person-years) before and after all, hospitalised and non-\nhospitalised COVID-19 were tabulated. Time to first event was analysed for each outcome. Cox models were \nfitted with calendar time scale using the cohort-specific baseline as the origin. Hazard ratios (HRs) for follow-\nup after, versus before or without COVID-19, were estimated, splitting follow-up into the day of COVID-19 \ndiagnosis (‘day 0’), the remainder of 1-4 weeks, and 5-28 weeks after COVID-19 for all cohorts and additionally \n29-52 and 53-102 weeks after COVID-19 for the pre-vaccination cohort. For computational efficiency, we used \nsampling for analyses containing >4,000,000 people: we included all people with the outcome event, all \npeople with the exposure, and a 10% (for general anxiety, depression, serious mental illness) or 20% (for all \nother outcomes) random sample of non-case-non-exposed people. We used inverse probability weights to \nadjust for the sampling and derived confidence intervals using robust standard errors when sampling had \noccurred. For each outcome and cohort, we estimated: (i) age and sex adjusted; and (ii) maximally adjusted \nHRs including all covariates listed above. Restricted cubic splines were used to account for age unless \notherwise specified. All models were stratified by region so that risk sets were constructed within region, \nhence accounting for between-region variation in the baseline hazard. \n \nSubgroup analyses according to prior history of the outcome event, age group, sex, ethnicity, and COVID-19 \nhistory were conducted for depression and serious mental illness. We calculated absolute excess risk 28 weeks \nafter COVID-19, including outcome events recorded on the day of COVID-19 diagnosis (‘day 0’) and weighted \nby the proportion of people in age and sex strata in the pre-vaccination cohort. Further details of the \nstatistical methods are in the supplement. \n \nData management and analyses were conducted in Python version 3.8.10, R version 4.0.2 and Stata/MP \nversion 16.1 according to a pre-specified protocol. The protocol, analysis code and code lists are available \nonline: https://github.com/opensafely/post-covid-mentalhealth.  \n \nRESULTS \n \nThe pre-vaccination cohort included 17,619,987 people of whom 975,429 received a COVID-19 diagnosis \n(Table 1, Supplementary Figure 2). The median (interquartile range (IQR)) age was 49 (34-64) years. The \ncohort was 50.2% female and 79.3%, 6.3%, and 2.1% were recorded as of White, South Asian, and Black \nethnicities respectively. The vaccinated and unvaccinated cohorts included 13,716,225 and 3,130,581 people \nrespectively, of whom 850,023 and 147,315 received a COVID-19 diagnosis. Differences in demographic \ncharacteristics between the vaccinated and unvaccinated cohorts reflect predictors of COVID-19 vaccine \nuptake.20 Supplementary Table 3 summarises participants’ medical history by cohort. \n \nIn each cohort, the incidence of mental illness was higher after diagnosis of COVID-19 than before or without \nCOVID-19 (Table 2). The highest incidence rates were after hospitalised COVID-19. Depression was the most \ncommon outcome with a total of 1,278,363, 343,371, and 56,403 diagnoses in the pre-vaccination, vaccinated \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n6 \nand unvaccinated cohorts respectively. There were 379,275, 84,981, and 18,039 diagnoses of serious mental \nillness in the pre-vaccination, vaccinated and unvaccinated cohorts respectively. \n \nComparisons of event rates after diagnosis of COVID-19 versus before or without COVID-19 \nMaximally adjusted HRs (aHRs) comparing the incidence of each outcome after diagnosis of COVID-19 with the \nincidence before or without COVID-19 did not differ substantially from the age- and sex-adjusted HRs in all \ncohorts (Supplementary Figure 3). The incidence of all outcomes was extremely high on day zero (Table 3). \nThe incidence of most outcomes was elevated during the remainder of 1-4 weeks after COVID-19, compared \nwith before or without COVID-19, in each cohort. \n \nDepression \nThe incidence of depression was elevated during weeks 1-4 after COVID-19, compared with before or without \nCOVID-19, in the pre-vaccination and unvaccinated cohorts (1.93 (95% CI 1.88-1.98) and 1.79 (1.68-1.91) \nrespectively) and, to a lesser extent, in the vaccinated cohort (1.16 (1.12-1.20)) (Figure 1, Table 3). The \nincidence of depression remained elevated during weeks 5-28 in the vaccinated and unvaccinated cohorts \n(aHRs 1.11 (1.08-1.14) and 1.28 (1.22-1.36) respectively) and up to weeks 53-102 in the pre-vaccination cohort \n(aHR 1.17 (1.13-1.20)). aHRs during weeks 1-4 were considerably higher after hospitalised COVID-19 (pre-\nvaccination: 16.5 (15.8-17.3); vaccinated: 13.0 (12.0-14.0); unvaccinated: 15.6 (14.1-17.2)) than after non-\nhospitalised COVID-19 (pre-vaccination: 1.22 (1.17-1.26); vaccinated: 0.92 (0.88-0.95); unvaccinated: 1.11 \n(1.02-1.20)) (Figure 1, Supplementary Tables 4-5). In the pre-vaccination cohort, aHRs remained higher after \nhospitalised than non-hospitalised COVID-19 throughout follow-up. \n \nSerious mental illness \nThe incidence of serious mental illness was elevated during weeks 1-4 after COVID-19, compared with before \nor without COVID-19, in the pre-vaccinated and unvaccinated cohorts (1.48 (95% CI 1.40-1.56) and 1.42 (1.24-\n1.61) respectively) (Figure 1, Table 3). However, the incidence of serious mental illness was lower during \nweeks 1-4 in the vaccinated cohort (0.91 (0.84-0.98)). Incidence remained slightly elevated during weeks 5-28 \nin the vaccinated and unvaccinated cohorts (1.07 (1.01-1.1) and 1.14 (1.02-1.27)) and up to weeks 53-102 in \nthe pre-vaccination cohort (1.13 (1.06-1.19)). The incidence of serious mental illness during weeks 1-4 was \nconsiderably higher after hospitalised COVID-19 (pre-vaccination: 9.65 (8.71-10.7); vaccinated: 6.38 (5.21-\n7.80); unvaccinated: 8.76 (7.02-10.9)) than after non-hospitalised COVID-19: (pre-vaccination: 1.04 (0.97-\n1.11); vaccinated: 0.79 (0.73-0.86); unvaccinated: 0.98 (0.83-1.15)) (Figure 1, Supplementary Tables 4-5). \n \nSubgroup analyses \naHRs for depression were highest during weeks 1-4 after COVID-19, versus before or without COVID-19, for \npeople with prior history of the condition that was recorded more than six months ago (Figure 2, \nSupplementary Tables 6-8). For example, in the pre-vaccination cohort, aHRs were 2.16 (2.08-2.23) for prior \nhistory more than six months ago, 1.66 (1.52-1.80) for prior history within six months, and 1.58 (1.50-1.67) for \nno prior history. aHRs for serious mental illness were also highest during weeks 1-4 after COVID-19 for people \nwith prior history of the condition that was recorded more than six months ago in the unvaccinated cohort \n(1.56 (1.30-1.88)). However, aHRs for serious mental illness were highest during weeks 1-4 after COVID-19 for \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n7 \npeople with prior history within six months for the pre-vaccination (1.88 (1.57-2.26)) and vaccinated cohorts \n(1.07 (0.87-1.33)). Beyond 5 weeks, incidence attenuated for those with prior history both within six months \nand more than six months ago. For the vaccinated cohort, incidence of serious mental illness during weeks 5-\n28 after COVID-19 was consistent with before or without COVID-19 (prior history more than six months ago: \n1.00 (0.93-1.08); prior history within six months: 1.07 (0.87-1.33)). \n \nIn the vaccinated cohort, aHRs for depression and serious mental illness after COVID-19, versus before or \nwithout COVID-19 were similar in people with and without a with prior history of COVID-19 (Supplementary \nFigure 4, Supplementary Table 9). aHRs for depression during weeks 1-4 and 5-12 were greater in the 60-79 \nand 80-110 age groups than the 18-39 and 40-59 age groups: those serious mental illness were greater in the \n60-79 and 80-110 age groups than the 18-39 and 40-59 age groups across all time periods (Supplementary \nFigure 5, Supplementary Tables 10-13). aHRs for depression and serious mental illness were marginally higher \nfor men than women during weeks 1-4 after COVID-19 (Supplementary Figure 6, Supplementary Tables 14-\n15). aHRs for depression after COVID-19, versus before or without COVID-19, were generally comparable \nbetween ethnic groups (Supplementary Figure 7, Supplementary Tables 16-20), except that in the vaccinated \ncohort aHRs for depression were higher for the Black ethnic group than other ethnic groups. aHRs for serious \nmental illness after COVID-19 were broadly comparable by ethnic group for the pre-vaccination cohort. aHRs \nfor serious mental illness could only be estimated for the White and South Asian ethnic groups in the \nvaccinated cohort, and for the White ethnic group in the unvaccinated cohort, due to low event counts.  \n \nOther mental illnesses  \naHRs for other mental illnesses were broadly similar to those for depression and serious mental illness, both \noverall (Figure 3, Table 3) and for hospitalised and non-hospitalised COVID-19 (Supplementary Tables 4-5). An \nexception was that aHRs for post-traumatic stress disorder after hospitalised COVID-19, versus before or \nwithout COVID-19, were higher during weeks 1-4 in the vaccinated cohort than the other two cohorts (pre-\nvaccination: 19.9 (15.6-25.5); vaccinated: 26.3 (19.3-35.8); unvaccinated: 14.0 (8.40-23.4)). This pattern was \nnot present for non-hospitalised COVID-19 or overall. \n \nAbsolute excess risk \n \nEstimated excess risks of depression 28 weeks after COVID-19, standardised to the age and sex distribution of \nthe pre-vaccination cohort, were 1020, 449, and 1009 per 100,000 people in the pre-vaccination, vaccinated \nand unvaccinated cohorts respectively (Figure 4, Supplementary Table 21). Up to 32% of the estimated excess \nevents occurred on the day of COVID-19 diagnosis (‘day 0’). Estimated excess risks of serious mental illness 28 \nweeks post-COVID-19, standardised to the age and sex distribution of the pre-vaccination cohort, were 227, \n60, and 199 per 100,000 people in the pre-vaccination, vaccinated and unvaccinated cohorts respectively. Up \nto 43% of the estimated excess events occured on the day of COVID-19 diagnosis (‘day 0’). \n \n  \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n8 \nDISCUSSION \n \nIn a study of more than 17 million people followed for up to two years of the pandemic, rates of most mental \nillnesses were markedly elevated during the first four weeks after diagnosis of COVID-19. This elevation was \nless marked in people who were vaccinated before diagnosis of COVID-19. In people diagnosed with COVID-19 \nbefore vaccination was available, incidence of mental illness remained elevated more than four weeks after \ndiagnosis, particularly in people who were hospitalised with COVID-19. In subgroup analyses according to prior \nhistory of depression and serious mental illness, associations 1-4 weeks after COVID-19 were greater in those \nwith than without prior history of each outcome, but more than 4 weeks after COVID-19 associations were \ngreater in people with no prior history of the outcome. Subgroup analyses also suggested stronger \nassociations in older age groups and in men. The effect of COVID-19 on mental illness did not differ markedly \nbetween ethnic groups. \n \nThe attenuation of adverse effects of COVID-19 on mental illness in those who were vaccinated, compared to \nthose unvaccinated, may be explained by reduced disease severity due to vaccination.21 This might be due to \nlower levels of systemic inflammation, as well as psychological benefits of vaccination such as reduced worry \nabout the consequences of COVID-19, increased social engagement, and resuming previous activities.22 A \nprevious cross-cohort study found that associations varied by COVID-19 severity, with poorer mental illness \noutcomes only found among those who were bedridden with COVID-19, as a marker of more severe illness.3 \nThose hospitalised due to COVID-19, especially people in intensive care and requiring ventilator support, may \nhave been at greater risk of developing post-traumatic stress disorder23; though this could not be examined in \nthe present study. \n \nElevation in rates of mental illness outcomes declined with increasing time since diagnosis of COVID-19, \nalthough for those diagnosed in in the pre-vaccination era incidence remained elevated up to a year after \nhospitalised COVID-19. Previous findings regarding long-term effects have been mixed, with a review reporting \nno clear long-term associations between COVID-19 and mental illness24, whereas a recent multi-cohort study \nfound an association between COVID-19 and mental illness with little evidence of attenuation over time1. \nPersisting effects of COVID-19 on mental illness could partly reflect ongoing impacts of long COVID25,26. \n \nIn line with previous research1, we found stronger associations between COVID-19 and mental illness among \nolder age groups. This is likely to reflect the increased risk of severe COVID-19 among older people and \nresulting increased anxiety about the consequences of infection. The association between COVID-19 and \nmental illness was slightly stronger among men, who have been found to be at greater risk of severe mental \nillness outcomes than women27. These patterns contrast with the wider impacts of the pandemic on mental \nhealth. For instance, overall mental health impacts of the pandemic were found to be greatest in adults aged \n25-44 years, women, and those with higher degrees28; indicating that the mechanisms linking COVID-19 \ndisease and mental health may differ from those underpinning wider effects of the pandemic. \n \nOur findings highlight the wider public health benefits of the vaccination programme. Prior mental illness may \ninfluence vaccine uptake, which highlights the importance of actively encouraging vaccine uptake in people \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n9 \nwith mental health difficulties.20,29,30 Our analyses suggested that the adverse effects of COVID-19 on mental \nillness were greater during the first year of the pandemic, prior to the availability of vaccination. This may \nreflect greater uncertainty and public concern around consequences of COVID-19 and treatment effectiveness \nat the beginning of the pandemic.  \n \nStrengths of this study include the very large sample size, availability of detailed linked electronic health \nrecord data, relatively long duration of follow-up, and the opportunity to examine the role of vaccination in \nthe relationship between COVID-19 and mental illness. We also note several limitations. First, those who were \nunvaccinated may have been less likely to contact health services and to test for SARS-CoV-2, which might \nhave led to underestimated effects in unvaccinated people not hospitalised with COVID-19. Those with \nrecorded COVID-19, particularly those who were hospitalised, may have been more likely to have their mental \nillness recorded due to greater contact with health services. This may have underpinned the particularly high \nHRs observed initially following diagnosis, especially in those hospitalised, and the rapid fall thereafter as \nservice contact is likely to be highest in the early post-diagnosis period. However, this is unlikely to fully \nexplain the adverse effect of COVID-19 on mental illness, given the persistent elevation of incidence of mental \nillness following hospitalised COVID-19 and the variation in associations with different mental illnesses. Also, \nthose with prior recorded mental health diagnoses may not have had additional diagnostic codes added to \ntheir record at every visit, even if their mental health had deteriorated due to COVID-19. Additionally, data on \nmental health in primary and secondary care is generally incomplete, as it does not include access to mental \nhealth services data or NHS Talking Therapies (formerly ‘Improving Access to Psychological Therapies (IAPT)’), \nwhich patients can self-refer to. A further limitation is that we could only assess COVID-19 severity according \nto whether patients were hospitalised and did not consider the potential role of repeated infections. We \ncannot exclude the possibility of unmeasured confounding, although we controlled for a wide range of \ndemographic characteristics and prior morbidities. A previous study found that the mental health impacts of \nCOVID-19 were less apparent when using a negative control group, suggesting that observed associations may \nhave been, at least in part, due to residual confounding2. Finally, other viruses may have consequences for \nmental illness. Our findings may therefore reflect a phenomenon that occurs after many viruses rather than \nbeing specific to SARS-CoV-2. \n \nOur findings add to a growing body of evidence highlighting the increased risk of mental illness following \nCOVID-19 diagnosis, with stronger associations found in relation to non-vaccination and more severe COVID-\n19 disease, and longer-term associations relating mainly to new-onset mental illness. This has important \nimplications for public health and mental health service provision, as serious mental illnesses in particular are \nassociated with more intensive healthcare needs and longer-term health and other adverse effects. Our \nresults highlight the importance of accessing vaccination among those with mental illness, who may be at \nhigher risk of both SARS-CoV-2 infection and adverse health outcomes following COVID-19. They also \nemphasise the widespread public health benefits of COVID-19 vaccination in the general population.  \n \n  \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n10 \nREFERENCES \n \n1 Thompson EJ, Stafford J, Moltrecht B, et al. Psychological distress, depression, anxiety, and life satisfaction \nfollowing COVID-19 infection: evidence from 11 UK longitudinal population studies. The Lancet Psychiatry \n2022; 9: 894–906. \n2 Abel KM, Carr MJ, Ashcroft DM, et al. Association of SARS-CoV-2 Infection With Psychological Distress, \nPsychotropic Prescribing, Fatigue, and Sleep Problems Among UK Primary Care Patients. JAMA Netw Open \n2021; 4: e2134803. \n3 Magnúsdóttir I, Lovik A, Unnarsdóttir AB, et al. Acute COVID-19 severity and mental health morbidity \ntrajectories in patient populations of six nations: an observational study. The Lancet Public Health 2022; 7: \ne406–16. \n4 Taquet M, Geddes JR, Husain M, Luciano S, Harrison PJ. 6-month neurological and psychiatric outcomes in \n236 379 survivors of COVID-19: a retrospective cohort study using electronic health records. The Lancet \nPsychiatry 2021; 8: 416–27. \n5 Taquet M, Dercon Q, Luciano S, Geddes JR, Husain M, Harrison PJ. Incidence, co-occurrence, and evolution \nof long-COVID features: A 6-month retrospective cohort study of 273,618 survivors of COVID-19. PLoS Med \n2021; 18: e1003773. \n6 Oh TK, Park HY, Song I. Risk of psychological sequelae among coronavirus disease-2019 survivors: A \nnationwide cohort study in South Korea. Depression and Anxiety 2021; 38: 247–54. \n7 Klaser K, Thompson EJ, Nguyen LH, et al. Anxiety and depression symptoms after COVID-19 infection: \nresults from the COVID Symptom Study app. J Neurol Neurosurg Psychiatry 2021; 92: 1254–8. \n8 Niedzwiedz CL, Benzeval M, Hainey K, Leyland AH, Katikireddi SV. Psychological distress among people with \nprobable COVID-19 infection: analysis of the UK Household Longitudinal Study. BJPsych open 2021; 7: e104. \n9 Nersesjan V, Christensen RHB, Kondziella D, Benros ME. COVID-19 and Risk for Mental Disorders Among \nAdults in Denmark. JAMA Psychiatry 2023; 80: 778. \n10 Mascellino MT, Di Timoteo F, De Angelis M, Oliva A. Overview of the Main Anti-SARS-CoV-2 Vaccines: \nMechanism of Action, Efficacy and Safety. IDR 2021; Volume 14: 3459–76. \n11 Suthar AB, Wang J, Seffren V, Wiegand RE, Griffing S, Zell E. Public health impact of covid-19 vaccines in the \nUS: observational study. BMJ 2022; : e069317. \n12 Perez-Arce F, Angrisani M, Bennett D, Darling J, Kapteyn A, Thomas K. COVID-19 vaccines and mental \ndistress. PLoS ONE 2021; 16: e0256406. \n13 Koltai J, Raifman J, Bor J, McKee M, Stuckler D. COVID-19 Vaccination and Mental Health: A Difference-In-\nDifference Analysis of the Understanding America Study. American Journal of Preventive Medicine 2022; 62: \n679–87. \n14 Watkinson RE, Williams R, Gillibrand S, Sanders C, Sutton M. Ethnic inequalities in COVID-19 vaccine uptake \nand comparison to seasonal influenza vaccine uptake in Greater Manchester, UK: A cohort study. PLoS Med \n2022; 19: e1003932. \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n11 \n15 Nafilyan V, Dolby T, Razieh C, et al. Sociodemographic inequality in COVID-19 vaccination coverage among \nelderly adults in England: a national linked data study. BMJ Open 2021; 11: e053402. \n16 Gomez JMD, Du-Fay-de-Lavallaz JM, Fugar S, et al. Sex Differences in COVID-19 Hospitalization and \nMortality. Journal of Women’s Health 2021; 30: 646–53. \n17 Agyemang C, Richters A, Jolani S, et al. Ethnic minority status as social determinant for COVID-19 infection, \nhospitalisation, severity, ICU admission and deaths in the early phase of the pandemic: a meta-analysis. \nBMJ Glob Health 2021; 6: e007433. \n18 Lo C-H, Nguyen LH, Drew DA, et al. Race, ethnicity, community-level socioeconomic factors, and risk of \nCOVID-19 in the United States and the United Kingdom. eClinicalMedicine 2021; 38: 101029. \n19 UKHSA. Omicron daily overview: 17 December 2021. \nhttps://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/10421\n00/20211217_OS_Daily_Omicron_Overview.pdf. \n20 Curtis HJ, Inglesby P, Morton CE, et al. Trends and clinical characteristics of COVID-19 vaccine recipients: a \nfederated analysis of 57.9 million patients’ primary care records in situ using OpenSAFELY. Br J Gen Pract \n2022; 72: e51–62. \n21 Tenforde MW, Self WH, Adams K, et al. Association Between mRNA Vaccination and COVID-19 \nHospitalization and Disease Severity. JAMA 2021; 326: 2043. \n22 Nguyen M. The Psychological Benefits of COVID-19 Vaccination. Advances in Public Health 2021; 2021: \ne1718800. \n23 Nagarajan R, Krishnamoorthy Y, Basavarachar V, Dakshinamoorthy R. Prevalence of post-traumatic stress \ndisorder among survivors of severe COVID-19 infections: A systematic review and meta-analysis. Journal of \nAffective Disorders 2022; 299: 52–9. \n24 Bourmistrova NW, Solomon T, Braude P, Strawbridge R, Carter B. Long-term effects of COVID-19 on mental \nhealth: A systematic review. J Affect Disord 2022; 299: 118–25. \n25 Zawilska JB, Kuczyńska K. Psychiatric and neurological complications of long COVID. Journal of Psychiatric \nResearch 2022; 156: 349–60. \n26 Kirchberger I, Meisinger C, Warm TD, Hyhlik-Dürr A, Linseisen J, Goßlau Y. Longitudinal course and \npredictors of health-related quality of life, mental health, and fatigue, in non-hospitalized individuals with \nor without post COVID-19 syndrome. In Review, 2023 DOI:10.21203/rs.3.rs-3221088/v1. \n27 Pijls BG, Jolani S, Atherley A, et al. Demographic risk factors for COVID-19 infection, severity, ICU admission \nand death: a meta-analysis of 59 studies. BMJ Open 2021; 11: e044640. \n28 Patel K, Robertson E, Kwong ASF, et al. Psychological Distress Before and During the COVID-19 Pandemic \nAmong Adults in the United Kingdom Based on Coordinated Analyses of 11 Longitudinal Studies. JAMA \nNetw Open 2022; 5: e227629. \n29 Hassan L, Sawyer C, Peek N, et al. COVID-19 vaccination uptake in people with severe mental illness: a UK-\nbased cohort study. World Psychiatry 2022; 21: 153–4. \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n12 \n30 Hassan L, Peek N, Lovell K, et al. Disparities in COVID-19 infection, hospitalisation and death in people with \nschizophrenia, bipolar disorder, and major depressive disorder: a cohort study of the UK Biobank. Mol \nPsychiatry 2022; 27: 1248–55. \n \nACKNOWLEDGEMENTS \n \nWe are very grateful for all the support received from the TPP Technical Operations team throughout this \nwork, and for generous assistance from the information governance and database teams at NHS England and \nthe NHS England Transformation Directorate. We thank the CONVALESCENCE Study Long COVID PPIE group \nfor their input and for sharing their experiences and expertise throughout the duration of the project. \n \nCONFLICTS OF INTEREST  \n \nNC is remunerated for participation in Data Safety and Monitoring Boards for AstraZeneca. AM was paid for \nthree days of consultancy for https://inductionhealthcare.com/ in Feburary 2022. No other conflicts of \ninterest to be disclosed. \n \nFUNDING  \n \nThis work was supported by the COVID-19 Longitudinal Health and Wellbeing National Core Study, which is \nfunded by the Medical Research Council (MC_PC_20059) and NIHR (COV-LT-0009). VW is also supported by \nthe Medical Research Council Integrative Epidemiology Unit at the University of Bristol [MC_UU_00032/03]. \nYW was supported by an UKRI MRC Fellowship awarded to YW (MC/W021358/1) and received funding from \nUKRI EPSRC Impact Acceleration Account (EP/X525789/1). AM received funding from the Bennett Foundation, \nWellcome Trust, NIHR Oxford Biomedical Research Centre, NIHR Applied Research Collaboration Oxford and \nThames Valley, Mohn-Westlake Foundation. The OpenSAFELY Platform is supported by grants from the \nWellcome Trust (222097/Z/20/Z) and MRC (MR/V015737/1, MC_PC_20059, MR/W016729/1). In addition, \ndevelopment of OpenSAFELY has been funded by the Longitudinal Health and Wellbeing strand of the \nNational Core Studies programme (MC_PC_20030: MC_PC_20059), the NIHR funded CONVALESCENCE \nprogramme (COV-LT-0009), NIHR (NIHR135559, COV-LT2-0073), and the Data and Connectivity National Core \nStudy funded by UK Research and Innovation (MC_PC_20058) and Health Data Research UK \n(HDRUK2021.000). \n \nDATA AVAILABILITY STATEMENT \n \nAll data were linked, stored and analysed securely within the OpenSAFELY platform: \nhttps://www.opensafely.org/. Data include pseudonymised data such as coded diagnoses, medications and \nphysiological parameters. No free text data are included. All code and code lists are shared openly for review \nand re-use under an MIT open license (https://github.com/opensafely/post-covid-mentalhealth). Detailed \npseudonymised patient data is potentially re-identifiable and therefore not shared.  \n \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n13 \nETHICAL APPROVAL AND INFORMATION GOVERNANCE \n \nThis study was approved by the Health Research Authority [REC reference 22/PR/0095] and by the University \nof Bristol's Faculty of Health Sciences Ethics Committee [reference 117269]. Authors involved in data \nmanagement/analysis successfully passed information governance training and obtained ONS safe researcher \naccreditation. NHS England is the data controller of OpenSAFELY-TPP. All outputs underwent disclosure checks \nand were approved by NHS England. Further details of OpenSAFELY information governance are provided in \nsupplemental methods. \n \nAUTHOR CONTRIBUTIONS \n \nVW, PP, RD, AWo, NC, JMac, AJ, JACS contributed to Conceptualization. VW, RD, JACS contributed to \nMethodology. VW, JICC, TP, AWa, LF, JMas, SD, AM, SB, BG contributed to Software. VW, JICC, RD, HF, JS, BM, \nET, KT, GC, EH, YW, MAA, RK, JMac, AJ contributed to Validation. VW, JICC contributed to Formal analysis. VW, \nJICC contributed to Investigation. TP, AWa, LF, JMas, SD, AM, SB, BG contributed to Resources. VW, JICC, HF \ncontributed to Data Curation. VW, PP, JACS contributed to Writing - Original Draft. All authors contributed to \nWriting - Review & Editing. VW, JICC contributed to Visualization. VW, RD, BG, AWo, NC, JMac, AJ, JACS \ncontributed to Supervision. VW, PP, RD, BG, AWo, NC, JMac, AJ, JACS contributed to Project administration. \nNC, JACS contributed to Funding acquisition. \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n2 \nTable 1: Patient characteristics in the pre-vaccination, vaccinated and unvaccinated cohorts. \nCharacteristic Pre-vaccination cohort Vaccinated cohort Unvaccinated cohort \n  N (%) COVID-19 \ndiagnoses N (%) COVID-19 \ndiagnoses N (%) COVID-19 \ndiagnoses \nAll  17619987 975429 13716225 850023 3130581 147315 \nSex Female 8847327 (50.2%) 524127 7140045 (52.1%) 472455 1313967 (42%) 77943 \nMale 8772657 (49.8%) 451299 6576177 (47.9%) 377571 1816611 (58%) 69375 \nAge, years \n18-29 2968245 (16.8%) 230823 1695351 (12.4%) 92115 948093 (30.3%) 39417 \n30-39 3018537 (17.1%) 197505 1914075 (14%) 146811 939573 (30%) 49947 \n40-49 2921427 (16.6%) 185643 2162535 (15.8%) 232005 593535 (19%) 32889 \n50-59 3135621 (17.8%) 180213 2663187 (19.4%) 200301 361947 (11.6%) 16545 \n60-69 2452011 (13.9%) 90525 2270565 (16.6%) 103599 175419 (5.6%) 5535 \n70-79 1990863 (11.3%) 49467 1940685 (14.1%) 53013 76089 (2.4%) 1899 \n80-89 940581 (5.3%) 29667 889707 (6.5%) 17853 28389 (0.9%) 879 \n90+ 192699 (1.1%) 11583 180123 (1.3%) 4323 7527 (0.2%) 219 \nEthnicity \nWhite 13965363 (79%) 737295 11361897 (83%) 726897 1946799 (62%) 112497 \nS. Asian 1109529 (6.3%) 114231 769293 (5.6%) 40809 311121 (9.9%) 9381 \nBlack 368835 (2.1%) 25845 212187 (1.5%) 9405 166593 (5.3%) 7443 \nOther 371805 (2.1%) 19137 228615 (1.7%) 10377 180609 (5.8%) 3951 \nMixed 197745 (1.1%) 13467 124425 (0.9%) 7383 77583 (2.5%) 3789 \nMissing 1606707 (9.1%) 65451 1019811 (7.4%) 55149 447873 (14.3%) 10257 \nIMD \nquintile \n(lower: \nmore \ndeprived) \n1 3395079 (19.3%) 239709 2229885 (16.3%) 133593 933093 (29.8%) 45183 \n2 3478545 (19.7%) 211725 2563539 (18.7%) 156321 750447 (24%) 34959 \n3 3801099 (21.6%) 194859 3032523 (22.1%) 183045 627477 (20%) 29079 \n4 3606213 (20.5%) 176199 2999331 (21.9%) 188019 479739 (15.3%) 22113 \n5 3339045 (19%) 152931 2890947 (21.1%) 189039 339819 (10.9%) 15981 \nSmoking \nNever  682269 (3.9%) 38217 412623 (3%) 15945 356319 (11.4%) 8247 \nFormer  8051205 (45.7%) 485781 6381579 (46.5%) 414003 1295349 (41.4%) 58611 \nCurrent  5870427 (33.3%) 318777 5000223 (36.5%) 327639 625515 (20%) 43167 \nMissing 3016083 (17.1%) 132645 1921797 (14%) 92433 853395 (27.3%) 37287 \nRegion \nEast 4088403 (23.2%) 221181 3209673 (23.4%) 180231 704565 (22.5%) 33441 \nE.Midlands 3121905 (17.7%) 185739 2431149 (17.7%) 158091 513993 (16.4%) 28311 \nLondon 1116735 (6.3%) 64383 715353 (5.2%) 37059 446763 (14.3%) 10929 \nNorth East 852093 (4.8%) 58887 652491 (4.8%) 48537 132987 (4.2%) 7185 \nNorth West 1568139 (8.9%) 104913 1233741 (9%) 85629 211239 (6.7%) 11697 \nSouth East 1159293 (6.6%) 47829 943521 (6.9%) 55689 188109 (6%) 8757 \nSouth West 2490369 (14.1%) 76029 2136165 (15.6%) 129291 313809 (10%) 17235 \nW.Midlands 693339 (3.9%) 52617 481725 (3.5%) 29205 172029 (5.5%) 7941 \nYorkshire 2529699 (14.4%) 163839 1912395 (13.9%) 126285 447087 (14.3%) 21819 \nCare home resident 82575 (0.5%) 14391 56451 (0.4%) 2775 2889 (0.1%) 105 \nHealthcare worker 552441 (3.1%) 63351 480825 (3.5%) 38709 20157 (0.6%) 1947 \nIMD: Index of Multiple Deprivation \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n \n3 \nTable 2: Mental illness events following diagnosis of COVID-19 in the pre-vaccination, vaccinated and unvaccinated cohorts, overall and by COVID-19 severity. \nOutcome COVID-19 severity \nPre-vaccination cohort  \nN=17,619,987 \nVaccinated cohort  \nN=13,716,225 \nUnvaccinated cohort  \nN=3,130,581 \nEvent/person-years  Incidence \nrate  Event/person-years  Incidence \nrate  Event/person-years  Incidence \nrate  \nDepression \nNo COVID-19 1229103/31815936 3863 332523/6177768 5383 53547/1178058 4545 \nHospitalised COVID-19 6123/40514 15113 1359/2379 57128 831/1614 51475 \nNon-hospitalised COVID-19 43137/875165 4929 9489/153403 6186 2025/24665 8210 \nSerious mental \nillness \nNo COVID-19 364809/32692824 1116 82479/6242112 1321 17325/1185912 1461 \nHospitalised COVID-19 1581/46044 3434 207/2651 7809 165/1771 9319 \nNon-hospitalised COVID-19 12885/921950 1398 2295/156141 1470 549/25091 2188 \nGeneral anxiety \ndisorders \nNo COVID-19 898383/32181914 2792 221499/6207309 3568 39285/1181444 3325 \nHospitalised COVID-19 4695/42625 11015 1017/2481 40994 873/1615 54045 \nNon-hospitalised COVID-19 34569/891502 3878 6795/154561 4396 1689/24774 6818 \nPost-traumatic \nstress disorder \nNo COVID-19 35325/33027918 107 8061/6260421 129 2733/1189246 230 \nHospitalised COVID-19 303/47761 634 57/2695 2115 57/1798 3170 \nNon-hospitalised COVID-19 1281/939590 136 225/156887 143 93/25218 369 \nEating disorders \nNo COVID-19 18273/33044280 55 4539/6261356 72 903/1189653 76 \nHospitalised COVID-19 63/48018 131 Sep-07 333 15/1808 830 \nNon-hospitalised COVID-19 765/940251 81 129/156909 82 33/25239 131 \nAddiction \nNo COVID-19 36615/33023855 111 5481/6261035 88 4131/1188788 347 \nHospitalised COVID-19 165/47887 345 21/2704 777 51/1799 2835 \nNon-hospitalised COVID-19 879/939847 94 105/156925 67 87/25220 345 \nSelf-harm \nNo COVID-19 85761/32977385 260 15027/6258886 240 4977/1188790 419 \nHospitalised COVID-19 237/47754 496 27/2703 999 15/1808 830 \nNon-hospitalised COVID-19 2955/936599 316 507/156793 323 141/25205 559 \nSuicide \nNo COVID-19 39951/33023812 121 6135/6260977 98 1935/1189437 163 \nHospitalised COVID-19 159/47888 332 15/2706 554 9/1810 497 \nNon-hospitalised COVID-19 1359/939065 145 219/156893 140 57/25232 226 \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n \n4 \nTable 3: Maximally adjusted hazard ratios and 95% CIs for mental illness events following diagnosis of COVID-19 in the \npre-vaccination, vaccinated and unvaccinated cohorts. \n \nOutcome  Time since  \nCOVID-19  \nPre-vaccination \ncohort  \nVaccinated \n cohort  \nUnvaccinated \n cohort  \nDepression  \nDay 0 32.9 (31.8-34.0) 8.52 (8.05-9.03) 19.1 (17.5-20.8) \n1-4 weeks 1.93 (1.88-1.98) 1.16 (1.12-1.20) 1.79 (1.68-1.91) \n5-28 weeks 1.25 (1.23-1.26) 1.11 (1.08-1.14) 1.28 (1.22-1.36) \n29-52 weeks 1.16 (1.14-1.18) - - \n53-102 weeks 1.17 (1.13-1.20) - - \nSerious mental illness  \nDay 0 29.4 (27.6-31.3) 7.61 (6.74-8.59) 19.1 (16.2-22.5) \n1-4 weeks 1.48 (1.40-1.56) 0.91 (0.84-0.98) 1.42 (1.24-1.61) \n5-28 weeks 1.20 (1.17-1.23) 1.07 (1.01-1.12) 1.14 (1.02-1.27) \n29-52 weeks 1.15 (1.12-1.18) - - \n53-102 weeks 1.13 (1.06-1.19) - - \nGeneral anxiety  \nDay 0 33.7 (32.4-34.9) 8.55 (7.98-9.17) 25.3 (23.3-27.5) \n1-4 weeks 2.19 (2.13-2.26) 1.26 (1.21-1.31) 2.29 (2.15-2.44) \n5-28 weeks 1.26 (1.24-1.28) 1.12 (1.09-1.16) 1.36 (1.28-1.45) \n29-52 weeks 1.14 (1.12-1.16) - - \n53-102 weeks 1.15 (1.11-1.19) - - \nPost-traumatic stress \ndisorder  \nDay 0 43.3 (36.8-51.0) 12.3 (9.13-16.4) 30.0 (22.1-40.5) \n1-4 weeks 1.84 (1.56-2.16) 1.01 (0.81-1.26) 1.42 (1.06-1.92) \n5-28 weeks 1.13 (1.04-1.23) 1.01 (0.86-1.18) 1.05 (0.81-1.36) \n29-52 weeks 1.06 (0.97-1.16) - - \n53-102 weeks 1.17 (0.99-1.38) - - \nEating disorders  \nDay 0 29.2 (22.7-37.6) 5.59 (3.26-9.59) 20.9 (11.8-37.0) \n1-4 weeks 1.96 (1.61-2.39) 0.88 (0.64-1.21) 1.56 (0.97-2.52) \n5-28 weeks 1.26 (1.13-1.41) 0.91 (0.71-1.16) 1.14 (0.73-1.77) \n29-52 weeks 1.09 (0.96-1.24) - - \n53-102 weeks 1.24 (0.98-1.57) - - \nAddiction  \nDay 0 66.2 (56.9-77.1) 17.0 (12.0-24.1) 44.8 (34.9-57.5) \n1-4 weeks 1.45 (1.19-1.78) 0.98 (0.72-1.33) 1.04 (0.73-1.47) \n5-28 weeks 0.95 (0.86-1.05) 0.69 (0.53-0.91) 0.77 (0.57-1.05) \n29-52 weeks 1.00 (0.89-1.12) - - \n53-102 weeks 1.00 (0.79-1.26) - - \nSelf-harm  \nDay 0 22.3 (19.2-26.0) 10.9 (8.61-13.9) 12.1 (8.28-17.6) \n1-4 weeks 1.21 (1.06-1.37) 1.02 (0.86-1.20) 1.09 (0.83-1.44) \n5-28 weeks 1.15 (1.09-1.22) 1.17 (1.04-1.31) 0.92 (0.73-1.15) \n29-52 weeks 1.17 (1.10-1.25) - - \n53-102 weeks 1.14 (1.01-1.29) - - \nSuicide  \nDay 0 850 (742-975) † † \n1-4 weeks 4.18 (2.94-5.94) † † \n5-28 weeks 0.85 (0.60-1.19) † † \n29-52 weeks 0.83 (0.57-1.20) - - \n53-102 weeks 0.86 (0.45-1.65) - - \n† Insufficient events for estimation  \n  \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n \n5 \nFigure 1: Maximally adjusted hazard ratios and 95% CIs for depression and serious mental illness following diagnosis of COVID-19 in the pre-vaccination, \nvaccinated and unvaccinated cohorts, overall and by COVID-19 severity. Events on the day of COVID-19 diagnosis (day 0) were excluded.  \n \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n \n6 \nFigure 2: Maximally adjusted hazard ratios and 95% CIs for depression and serious mental illness following diagnosis of COVID-19 in the pre-vaccination, \nvaccinated and unvaccinated cohorts, by prior history of the outcome. Events on the day of COVID-19 diagnosis (day 0) were excluded.  \n \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n \n7 \nFigure 3: Maximally adjusted hazard ratios and 95% confidence intervals for other mental illness events following \ndiagnosis of COVID-19 in the pre-vaccination, vaccinated and unvaccinated cohorts. Events on the day of COVID-19 \ndiagnosis (day 0) were excluded.  \n \n \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint \n\n \n8 \nFigure 4: Absolute excess risk up to 28 weeks for depression and serious mental illness following diagnosis of COVID-19 in the pre-vaccination, vaccinated and \nunvaccinated cohorts. \n \n . CC-BY 4.0 International licenseIt is made available under a \n is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)\nThe copyright holder for this preprint this version posted December 7, 2023. ; https://doi.org/10.1101/2023.12.06.23299602doi: medRxiv preprint","source_license":"CC-BY-4.0","license_restricted":false}