Bidirectional associations between COVID-19 and psychiatric disorder: a study of 62,354 COVID-19 cases

Background: Adverse mental health consequences of COVID-19, including anxiety and depression, have been widely predicted but not yet accurately measured. There are a range of physical health risk factors for COVID-19, but it is not known if there are also psychiatric risk factors. Methods: We addressed both questions using cohort studies derived from an electronic health records (EHR) network of 69 million patients including over 62,000 cases of COVID-19. Propensity score matching was used to control for confounding by risk factors for COVID-19 and for more severe illness. Findings: In patients with no prior psychiatric history, COVID-19 was associated with an increased incidence of psychiatric diagnoses in the three months after infection compared to 6 other health events (hazard ratio [95% CI] 2.1 [1.8-2.5] compared to influenza; 1.7 [1.5-1.9] compared to other respiratory tract infections; 1.6 [1.4-1.9] compared to skin infection; 1.6 [1.3.1-9] compared to cholelithiasis; 2.2 [1.9-2.6] compared to urolithiasis, and 2.1 [1.9-2.5] compared to fracture of a large bone; all p<0.0001). The increase was greatest for anxiety disorders but also present for depression, insomnia, and dementia. The results were robust to several sensitivity analyses. There was a ~30% reduction in psychiatric diagnoses in the total EHR population over the same period. A psychiatric diagnosis in the previous year was associated with a 65% higher incidence of COVID-19 (relative risk 1.65, 95% CI: 1.59-1.71, p<0.0001). This was independent of known physical health risk factors for COVID-19. Interpretation: COVID-19 infection has both psychiatric sequelae and psychiatric antecedents. Survivors have an increased rate of new onset psychiatric disorders, and prior psychiatric disorders are associated with a higher risk of COVID-19. The findings have implications for research into aetiology and highlight the need for clinical services to provide multidisciplinary follow-up, and prompt detection and treatment.


Introduction
From the early stages of the coronavirus disease 2019 (COVID-19) pandemic, concerns have been raised about its impact on mental health 1-3 and on patients with mental illness 4 . Yet a few months later, we still know little about the mental health consequences of COVID-19 (its psychiatric sequelae) and the susceptibility of patients with mental illness to COVID-19 (its psychiatric antecedents).
CORONERVE, a UK-wide surveillance program has identified 23 patients with a psychiatric diagnosis following infection with SARS-CoV-2 13 . A meta-analysis pooled data from studies estimating the incidence of psychiatric disorders following the severe acute respiratory syndrome (SARS) and Middle East respiratory syndrome (MERS), suggesting that coronavirus infections may lead to delirium, anxiety, depression, manic symptoms, poor memory, and insomnia 14 . However cohort studies of patients with COVID-19 with adequate control and follow-up are urgently needed to quantify the incidence of psychiatric sequelae following infection with the virus.
A separate question is whether pre-existing psychiatric disorder affects susceptibility to  infection. A study based on 908 cases from UK Biobank revealed that self-reported symptoms of mental illness were associated with an increased risk of hospitalisation for COVID-19 but these were not robust to adjustment for several confounders 15 . A case-control study based on the electronic health records (EHR) of 843 patients with COVID-19 found that depression, anxiety, and dementia might increase the odds of being diagnosed with COVID-19 16 . However, reliable estimation of possible increased risk of COVID-19 among patients with a psychiatric illness requires large, well-controlled cohort studies.
. CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review)

5/22
In this EHR network cohort study, we assessed the psychiatric sequelae and antecedents of COVID-19 using data from 69 million individuals, 62,354 of whom have had a diagnosis of COVID-19.

Data and study design
We used data from TriNetX Analytics Network (www.trinetx.com), a global federated research network capturing anonymized data from EHR in 54 healthcare organizations in the USA, totalling 69⋅8 million patients. The TriNetX platform and its functionalities have been described elsewhere 17 .
The healthcare organizations are a mixture of hospitals, primary care, and specialist providers.
TriNetX has a waiver from the Western Institutional Review Board since only de-identified summary statistics are provided. Available data include demographics, diagnoses (using ICD-10 codes), procedures, and measurements (e.g. lab results, body mass index). Most captured data were from 2007 onwards, and data are updated on average every 24 days.
Using the TriNetX user interface, cohorts can be created based on specified inclusion and exclusion criteria and compared for outcomes of interest over specified time periods. Cohorts were matched for confounding variables using the built-in propensity score matching capability. Outcomes of interest were then compared between matched cohorts. This study followed the STROBE reporting guidelines.

Variables of interest and their coding
We defined a diagnosis of COVID-19 as one of the following diagnoses, recorded on or after January 20, 2020 (date of the first recorded COVID-19 case in the USA): COVID-19 (U07.1 and U07.2); Pneumonia due to SARS-associated coronavirus (J12.81); Other coronavirus as the cause of disease classified elsewhere (B97.29); or Coronavirus infection unspecified (B34.2). Inclusion of the latter three definitions (which make up 7⋅3% of the total COVID-19 sample) were included to capture the early stage of the pandemic when the ICD code for COVID-19 (U07) was not yet defined. We define . CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted August 16, 2020. . https://doi.org/10.1101/2020.08.14.20175190 doi: medRxiv preprint 6/22 a psychiatric illness as any of the ICD-10 codes F20-F48 corresponding to psychotic (F20-F29), mood (F30-F39), and anxiety (F40-F48) disorders.
We identified a set of established and suspected risk factors for COVID-19 [18][19][20] : age, sex, race, obesity, hypertension, diabetes, chronic kidney disease, asthma, chronic lower respiratory diseases, nicotine dependence, ischaemic heart disease, and other forms of heart disease. To capture these risk factors in patients' EHR, we used 28 variables (e.g. diabetes was separated into Type 1 and Type 2, hypertension was represented both as a diagnosis and as a measurement of systolic and diastolic blood pressure, etc.). We also identified an additional set of established risk factors for death due to COVID-19 21 (which we take to be risk factors for severe illness): cancer (and haematological cancer in particular), chronic liver disease, stroke, dementia, organ transplant, rheumatoid arthritis, lupus, psoriasis, and other immunosuppression. These risk factors were captured using 22 variables from patients' EHR.
More details about these variables are provided in the appendix, pp. 1-2.

Analysis of psychiatric sequelae
To assess the psychiatric sequelae of COVID-19 and compare them to other acute health events, we produced matched cohorts of patients who had been diagnosed with another health event. The other health events were selected to represent a wide range of common acute presentations (some clinically similar to COVID-19 and others very different). These control health events comprised: (i) influenza, All seven cohorts (COVID-19 and six control health events) included all patients over the age of ten who had the corresponding health event on or after January 20, 2020. We excluded patients who had a psychiatric diagnosis recorded at any time before January 20, 2020, and patients who had died by the time of the analysis (August 1, 2020). Cohorts were matched (details shown below) for the 50 . CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted August 16, 2020. . https://doi.org/10.1101/2020.08.14.20175190 doi: medRxiv preprint 7/22 variables mentioned above: the 28 variables capturing risk factors for COVID-19 and the 22 variables capturing risk factors for more severe COVID-19 illness.
The primary outcome was the incidence of a first psychiatric diagnosis (F20-F48) over a period from 14 days to 90 days after a diagnosis of COVID-19 represented by a hazard ratio (HR) and by the estimated probability of outcome over that period. Other outcomes included incidence of subcategories of these psychiatric illnesses. We also assessed for dementia and insomnia as they are thought to be potential sequelae of COVID-19 9,14 . For dementia, the analysis was repeated among patients over the age of 65 years.
Besides using six different control cohorts, the robustness of the findings was tested by repeating the analysis (i) after excluding individuals whose race was unknown (in case this differentially affected cohorts), (ii) by restricting the diagnosis of COVID-19 to confirmed diagnoses (ICD-10 code U07.1), and (iii) by focusing on patients who made at least one healthcare visit between 14 and 90 days after the health event (in case of differential drop-out rates between cohorts).
Besides the explanation that COVID-19 itself leads to increased rates of psychiatric sequelae, we tested three alternative hypotheses which could explain differences in outcomes between cohorts. The "severity" hypothesis posits that differences in rates of psychiatric sequelae are due to differences in the severity of the health event (e.g. COVID-19 might lead to more severe presentations than influenza). We tested this hypothesis by limiting the cohorts to patients with the least severe presentations (taken to be those not requiring inpatient admission). If the hypothesis were correct, the difference in rates of psychiatric sequelae between these cohorts would be substantially smaller than in the original cohorts. The "overall incidence" hypothesis posits that, compared to control health events, COVID-19 was often diagnosed at a time when more people (regardless of their COVID-19 status) were diagnosed with a psychiatric illness (e.g. due to lockdown, financial strain, seasonality, etc.). It would follow that the increased rate of psychiatric sequelae following COVID-19 simply reflects a change in incidence of psychiatric illness in the general population. We tested this . CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

(which was not certified by peer review)
The copyright holder for this preprint this version posted August 16, 2020. . https://doi.org/10.1101/2020.08.14.20175190 doi: medRxiv preprint 8/22 hypothesis by comparing the evolution of the incidence of psychiatric diagnoses, COVID-19, and control health events across the study period. Finally, the "contextual factors" hypothesis posits that COVID-19 was mostly diagnosed at a time when having any health event would have increased the risk of psychiatric sequelae (e.g. because of overwhelmed health services, fear of COVID-19, limited social support, etc.). Assuming that contextual factors may have changed substantially between January and April 2020, we tested this hypothesis by comparing the rate of psychiatric sequelae of health events before vs. after April 1, 2020 and by comparing the rate of psychiatric sequelae between COVID-19 and control health events after April 1, 2020.
Further details on the outcome definitions and sensitivity analyses are provided in the appendix (pp.

Analysis of psychiatric antecedents
We tested whether patients with a recent diagnosis of psychiatric illness were at a higher risk of developing COVID-19 compared to a matched cohort of patients with otherwise similar risk factors for COVID-19.
Two cohorts were defined. The first cohort included all patients over the age of 18 who had a diagnosis of a psychiatric illness recorded in their EHR in the past year (from January 21, 2019 to January 20, 2020). The second cohort had no psychiatric illness recorded in their EHR but did make a healthcare visit in the same period (thus excluding patients who made no contact with the participating healthcare organizations). We also defined separate cohorts for the three main classes of psychiatric illness (psychotic disorder [F20-F29], mood disorders [F30-F39], and anxiety disorders [F40-F48]). Patients who had died before January 20, 2020 were excluded from both cohorts.
Cohorts were matched for the 28 variables capturing risk factors for COVID-19 (see above). The primary outcome was the relative risk (RR) of being diagnosed with COVID-19 between matched cohorts. The robustness of the findings was tested by repeating the analysis in 5 scenarios: (i) limiting . CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

(which was not certified by peer review)
The copyright holder for this preprint this version posted August 16, 2020. . https://doi.org/10.1101/2020.08.14.20175190 doi: medRxiv preprint 9/22 the cohorts to those with none of the physical risk factors for COVID-19, (ii) extending the window for a psychiatric diagnosis from one to three years before January 20, 2020 (iii) limiting the cohort to patients with a first diagnosis of psychiatric illness (i.e. with no diagnosis present before January 21, 2019), (iv) excluding patients with unknown race, and (v) redefining the primary outcome as a confirmed COVID-19 diagnosis.
More details on the sensitivity analyses are provided in the appendix pp. 3-5.

Statistical analyses
Propensity score 1:1 matching used a greedy nearest neighbour matching with a caliper distance of 0⋅1 pooled standard deviations of the logit of the propensity score 22 . We considered any variable which had a standardized mean difference between cohorts lower than 0.1 to be well matched 23 . For the analysis of psychiatric sequelae, propensity score matching was directly applied to each cohort pair. For the analysis of psychiatric antecedents, given their much larger sample sizes (which exceeded the maximum number of 1⋅5 million patients possible per matched cohort), cohorts were first stratified by sex and age (from 18 years old to 30, 31 to 45, 46 to 60, 61 to 75, and 76 and over) and propensity score matching (including for age) was achieved within each stratum separately.
In the analysis of psychiatric sequelae, Kaplan-Meier analysis was conducted to estimate the probability of outcomes from 14 to 90 days. Comparisons between cohorts were made using a logrank test. The HR was calculated using a proportional hazard model (with the survival package 3.2.3 in R) wherein the cohort to which the patient belonged was used as the independent variable. The proportional hazard assumption was tested using the generalized Schoenfeld approach 24 . If the assumption was violated, a piecewise constant HR was estimated by calculating a separate HR for the early and late phases of the follow-up period and the assumption was tested again in each sub-period (see appendix p. 5).
. CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

10/22
In the analysis of the psychiatric antecedents, the RR of being diagnosed with COVID-19 were calculated for each stratum and for the whole cohort. The null hypothesis that the outcome rate is equal in the two cohorts was tested using a χ 2 -test. A logistic regression was used to test for a potential association between age and RR (see appendix p. 6).
Statistical analyses were conducted in R version 3.4.3 except for the logrank tests which were performed within TriNetX. Statistical significance was set at two-sided p-values < 0⋅05.

Characteristics of the cohorts and descriptive statistics
A total of 62,354 patients had a diagnosis of COVID-19 (Table 1). For the analysis of psychiatric sequelae, a subset of 44,779 patients who had no prior psychiatric illness and who had not died was used as the COVID-19 cohort. Successful matching was achieved between this cohort and cohorts with other acute health events (appendix pp. [7][8][9][10][11][12][13][14][15][16][17][18]. For the analysis of psychiatric antecedents, a cohort of 1,729,837 patients with a psychiatric diagnosis between January 21, 2019 and January 20, 2020 was defined and successfully matched to a cohort of 1,729,837 patients who never had a psychiatric diagnosis (appendix p. 19).

Psychiatric sequelae of COVID-19
The estimated probabilities of psychiatric sequelae during the first 14-90 days following COVID-19 and other control health events are presented in Table 2 (the corresponding HR are reported in the appendix, p. 20). Compared to all six control health events, a diagnosis of COVID-19 led to significantly more first diagnoses of psychiatric illness (HR between 1⋅58 and 2⋅24, all p-values < 0⋅0001; Fig. 1 and appendix p. 21). At 90 days, the estimated probability of having been diagnosed with a new onset psychiatric illness following COVID-19 was 5⋅8% (95% CI: 5⋅2-6⋅4). The proportional hazard assumption was valid for three out of six control health events (influenza, other . CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

(which was not certified by peer review)
The copyright holder for this preprint this version posted August 16, 2020. . https://doi.org/10.1101/2020.08.14.20175190 doi: medRxiv preprint 11/22 respiratory tract infection, and urolithiasis). For the other three events (skin infection, cholelithiasis, and fracture), there was evidence of non-proportionality and the HR tended to increase over time (appendix p. 22). However, the HR remained significantly greater than 1 for both the early and late phases of the follow-up period (all p<0⋅0001, except for cholelithiasis in the early phase: p=0⋅0044).
. CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.
The elevated risk of psychiatric sequelae after COVID-19 compared to control health events could not be readily explained by differences in illness severity. Patients with COVID-19 requiring inpatient admission were more at risk of psychiatric sequelae than patients not needing an admission (HR 1⋅40, 95% CI: 1⋅06-1⋅85, p=0⋅019). However, when limiting cohorts to those not requiring inpatient admission, large differences in psychiatric sequelae remained between COVID-19 and the other cohorts (HR 1⋅54-2⋅23, all p<0⋅0001, appendix p. 29).
Neither could the finding of higher rates of psychiatric disorder following COVID-19 be explained by a general increase in incidence of psychiatric diagnoses in the general population. Indeed diagnostic rates decreased from January to July 2020 (alongside a reduction in control health events), in contrast to the incidence of COVID-19 ( Fig. 2 and appendix p. 30). In other words, the psychiatric sequelae of COVID-19 occurred against a backdrop of fewer psychiatric diagnoses being made in the total population.
Contextual factors provide part of the explanation for the difference in psychiatric sequelae between COVID-19 and control health events. Indeed all health events had significantly higher rates of psychiatric sequelae when they occurred after (vs. before) April 1, 2020 (HR comparing the period before to the period after April 1 ranging from 1⋅32 and 1⋅79, all p<0⋅05, appendix p. 31) and the HR between COVID-19 and control health events were lower when these events occurred after April 1, 2020 (HR 1⋅31-1⋅83 vs. 1⋅58-2⋅24 when considering the whole study period, appendix p. 32).
. CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

13/22
However, these HR remained statistically larger than 1 indicating that contextual factors alone are insufficient to explain differences in psychiatric sequelae. In other words, experiencing any health event after (vs. before) April 1, 2020 led to a significantly higher rate of psychiatric sequelae but this rate was higher still after experiencing COVID-19.
. CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

Discussion
We provide strong evidence that COVID-19 survivors have a significantly elevated rate of psychiatric disorders. We also show that a psychiatric history is associated with an increased risk of being diagnosed with COVID-19.
In the period between 14 days and 90 days after diagnosis, 5⋅8% of COVID-19 survivors had their first recorded diagnosis of psychiatric illness (F20-F48), compared to 2⋅5-3⋅4% of patients in the comparison cohorts. The figures are a minimum estimate, since there are likely to be many other patients who have not yet presented or received a diagnosis. Indeed, the Kaplan-Meier curves for COVID-19 show no signs of plateauing, suggesting that the absolute risk of psychiatric disorder will continue to increase with longer duration of follow-up. The HR from COVID-19 were higher compared to all other cohorts, indicating that COVID-19 has a specific impact on psychiatric health above and beyond changes that may be occurring in the general population. Evidence of the latter is apparent from the overall reduction in psychiatric diagnoses during the COVID-19 period, and by the fact that the risk of psychiatric sequelae remains higher for COVID-19 than for other health events in the 'lockdown period' (i.e. after April 1, 2020). The mechanism of COVID-19's impact on mental health is unknown and requires urgent investigation. The modest relationship between severity of the illness (as proxied by inpatient admission) and psychiatric outcomes might represent a dose-response relationship suggesting that the association may at least partially be mediated by biological factors directly related to COVID-19 (e.g. viral load, immune response) 9,25,26 .
The psychiatric effects of COVID-19 were broad but not uniform. The HR was greater for anxiety disorders (ranging from 1⋅6-2⋅6) than for mood disorders (1⋅1-1⋅8). The particular impact of COVID-19 on anxiety is in line with expectations and highlights the need for effective and accessible interventions. The data show increased diagnoses in all major anxiety disorder categories, and so it remains unclear whether post-COVID-19 anxiety will have a particular PTSD-like picture. Rates of . CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

(which was not certified by peer review)
The copyright holder for this preprint this version posted August 16, 2020.

15/22
an insomnia diagnosis were also markedly elevated (HR 1⋅9-3⋅3), again in keeping with predictions that circadian disturbances will follow COVID-19 infection. In contrast, we did not find a clear signal for psychotic disorders despite case reports suggesting that this might occur 13,27 . Lastly, the 2-3 fold increased risk of dementia after COVID-19 extends findings from previous case series 13,28 and is particularly concerning. Detailed investigation of this group should be a research priority, as should evaluation of other severe neuropsychiatric phenotypes which become apparent.
We had not anticipated that psychiatric history would be a risk factor for COVID-19, independent of known physical health factors. The finding appears robust, being seen in all age strata, and in both sexes, and is substantial-a 1⋅65-fold excess. The basis for the finding is unclear. It is not related to any specific diagnostic category, and it was similar regardless of whether the diagnosis was made within one or three years, and whether or not the known physical risk factors for COVID-19 were present. These features suggest that broad or non-specific factors related to psychiatric illness are involved, potentially including cognitive impairment, lower awareness of risk, or increased difficulty in following social distancing recommendations 4 . Residual confounding, for example by unmeasured lifestyle factors, is another possible explanation. It may also be that vulnerability to COVID-19 is increased by the pro-inflammatory state postulated to occur in some forms of psychiatric disorder, or be related to psychotropic medication.
The strengths of this study are the sample size, the amount of data available, the use of propensity score matching to control for confounding, the range of sensitivity analyses, and the real-world nature of the data. The study also has limitations. Despite the matching and use of various comparison cohorts, there may be residual confounding. There is little information in the network regarding social and economic factors which might influence clinical outcomes post COVID-19. We do not know whether psychiatric diagnoses were made correctly and consistently between cohorts; it is possible that clinicians were more likely to diagnose a psychiatric illness after a COVID-19 diagnosis due to subjective bias. We did not examine whether COVID-19 affects relapse rate in those with prior . CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

(which was not certified by peer review)
The copyright holder for this preprint this version posted August 16, 2020. Nevertheless, the findings are of sufficient robustness and magnitude to have some immediate implications. The figures provide minimum estimates of the excess in psychiatric morbidity to be anticipated in survivors of COVID-19 and for which services need to plan 29 . As COVID-19 sample sizes and survival times increase, it will be possible not only to refine these findings, but also to identify rarer and delayed psychiatric presentations. It will also be important to explore additional risk factors for contracting COVID-19, and for developing psychiatric illness thereafter, since some elements may prove to be modifiable.

Declaration of interests
PJH and MT were granted unrestricted and free access to the TriNetX Analytics network for the purposes of research relevant to psychiatry, and with no constraints on the analyses performed nor the decision to publish. SL is an employee of TriNetX Inc.

Author contributions
PJH and MT designed the study. MT carried out data analyses. SL and JRG assisted with data analysis and interpretation. MT and PJH wrote the paper with input from JRG and SL. PJH is the guarantor.

Role of the funding source
The funders of the study had no role in study design, data collection, data analysis, data interpretation, or writing of the report. MT and PJH had full access to all the data in the study and the corresponding author had final responsibility for the decision to submit for publication.
. CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

(which was not certified by peer review)
The copyright holder for this preprint this version posted August 16, 2020. . https://doi.org/10.1101/2020.08.14.20175190 doi: medRxiv preprint . CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity.

(which was not certified by peer review)
The copyright holder for this preprint this version posted August 16, 2020. . https://doi.org/10.1101/2020.08.14.20175190 doi: medRxiv preprint 21/22 P-values are obtained using a logrank test. A breakdown of the results for different diagnoses of the anxiety disorders and mood disorders categories is provided in Table 10 and 11 respectively (appendix pp. [24][25]. . CC-BY 4.0 International license It is made available under a is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. (which was not certified by peer review) The copyright holder for this preprint this version posted August 16, 2020. . https://doi.org/10.1101/2020.08.14.20175190 doi: medRxiv preprint