Study design
This is a population-based retrospective cohort study of pregnant people who gave birth between April 1st, 2012, to March 31st, 2021, in Ontario, Canada.
Study population
All pregnant individuals who had singleton live births and stillbirths with a birthweight of ≥ 500 g or a gestational age of ≥ 20 weeks that occurred in Ontario hospitals were included in the study cohort. We excluded terminations, pregnant persons who did not reside in Ontario, Canada as well as those with multiple gestational births. In total, 68,602 records were excluded. The final cohort consisted of 1,202,292 pregnant individuals.
Data sources and linkage
Better Outcomes Registry & Network (BORN)
BORN is a prescribed pregnancy and birth registry in Ontario, Canada that collects data via the BORN Information System (BIS) on all hospital births in the province. The births captured in the BIS represent > 99% of the births that occur in Ontario, making BORN the largest perinatal registry in Canada [20]. Alongside data on births, BORN also gathers information on pregnancy and newborns that can be accessed in aggregate form for population-level research [20]. In an external audit, Public Health Ontario concluded high accuracy of the BORN data based on alignment with literature and other databases [21]. BORN maintains high quality data using multiple strategies including routine quality tracking and reporting, data quality evaluations and audit [22, 23], and formal training sessions for individuals entering data [24].
Canadian Institute for Health Information (CIHI)
On a yearly basis, pregnancy records from the Discharge Abstract Database (DAD) – maintained by CIHI – are provided to BORN. Ontario’s acute care hospital discharge information is accessible in the DAD [25], allowing for identification of those who had a psychiatric diagnosis during pregnancy.
2016 Canadian Census
The variables of neighbourhood education and income from the 2016 Census of the Canadian population were utilized in our study [26].
Postal Code Conversion file plus (PCCF+) version 7D
The PCCF + is a SAS program accompanied by Statistics Canada datasets that contain postal codes matched to census geographic areas [26,27,28]. The PCCF + program has procedures to address issues with partial postal codes as well as discrepancies between postal and census boundaries [28]. We used the PCCF + to link maternal residence to neighbourhood SES indicators from the 2016 Census.
Data linkages
We first extracted a BIS dataset with aggregate pregnancy data limited to date of births within the study timeframe, and then linked it to a BIS aggregate infant dataset which allowed for exclusion of records that did not meet the inclusion criteria. Linkage with CIHI-DAD, PCCF+, and the 2016 Census generated the final cohort for analysis (See Fig. 1).

Flowchart of study cohort
Exposure measurement
In this study, maternal SES is the exposure. Due to data limitations, we were not able to estimate SES indicators on the individual level. Instead, we linked the study cohort to the Canadian Census data. Two neighbourhood SES indicators were investigated separately: (a) neighbourhood income and (b) neighbourhood education level. Neighbourhood income was estimated using after tax median family income adjusted by household size and categorized into quintiles based on each census metropolitan area or census agglomeration area in Ontario [29].
Neighbourhood education level was estimated by the percentage of the adult population aged 25 to 64 years with a university degree or higher at the dissemination area (DA) level and was categorized by quintiles by ranking all DAs in Ontario [30]. The least value is quintile 1 (Q1) and the greatest value is quintile 5 (Q5).
Outcome measurement
The outcomes were defined as anxiety (yes, no), depression (yes, no), anxiety and/or depression (yes, no), and any mental health conditions (yes, no) in pregnancy. The BIS and CIHI-DAD database were accessed to retrieve data on self-report or clinical diagnosis of these outcomes. The BIS retrieval included any maternal mental health concerns during this pregnancy including those pre-existing, diagnosed during pregnancy or active during pregnancy [31]. The picklist values for mental health conditions in the BIS registry data were based on both self-report symptoms and/or clinical diagnoses [31]. Due to data limitations, we were not able to differentiate symptoms, disorders or conditions that were pre-existing only, diagnosed during pregnancy or active during pregnancy clearly. In the CIHI-DAD dataset, mental health conditions were identified by the International Statistical Classification of Diseases and Related Health Problems, 10th Revision, Canadian adaptation (ICD-10-CA) codes [32]. The ICD-10-CA codes for any mental health conditions during pregnancy included F00-F99 (Mental and behavioural disorders). The diagnosis codes for anxiety include F06.4 (Organic anxiety disorder), F40 (Phobic anxiety disorders), and F41 (Other anxiety disorders). The diagnosis codes for depression include: F32 (Depressive episode), F33 (Recurrent depressive disorder), and F34.1 (Dysthymia). For the outcome of anxiety and/or depression and the outcome of any mental health conditions, in addition to the cases identified from BIS and DAD, we also included pregnant people with selective serotonin reuptake inhibitor (SSRI) medication use during pregnancy identified via the BORN data source.
Covariates
Covariates were selected for inclusion in the model based on the findings from the literature review and consideration of the distribution of the covariates within the cohort [13]. Substance use during pregnancy was not in the models for the outcomes of anxiety and depression due to a limit of its range for some observations. The covariates controlled for included maternal age (< 35 years old vs. ≥35 years old), obesity status in pre-pregnancy (yes, no, unknown), pre-existing maternal health conditions including hypertension, diabetes, heart disease and pulmonary disease (yes vs. no), substance use during pregnancy (yes vs. no), race (White, other races, unknown) and rural/urban residence (Yes, rural residence vs. No, urban residence).
Statistical analysis
Descriptive analyses were performed to show the distributions of anxiety, depression, anxiety and/or depression, and any mental health condition by SES quintiles. The Cochran-Armitage trend test was used to test the prevalence trends of mental health outcomes by SES. Poisson regression with robust error variance models was performed to estimate the relative risk (RR) of the mental health outcomes explored by the pregnant individual’s residential neighbourhood income and education level. For the regression analysis, we excluded pregnant people (n = 140,486) with singleton births, stillbirths, or pregnancy terminations after the COVID-19 pandemic (February 28, 2020). We adjusted for maternal age, obesity status in pre-pregnancy, certain pre-existing health conditions (e.g., diabetes mellitus, hypertension, pulmonary disease, and heart disease), substance use during pregnancy, rural residence, and maternal race. We categorized “Unknown” values of obesity and race as a separate level in the multivariable regression analysis. Records with missing values from other variables were excluded in multivariable regression analysis. Sensitivity analysis was conducted by including pregnant people with singleton births, stillbirths, or pregnancy terminations that occurred after February 28, 2020, to evaluate the impact of the COVID-19 pandemic on the associations between mental health conditions during pregnancy and maternal SES. All analyses were performed using SAS 9.4 (SAS Institute Inc., Cary NC) [33].
link

