DOI 10.1136/bmjment-2025-302066
Identifying postpartum depression subtypes using natural language processing and clinical notes.
Аннотация
BACKGROUND
Postpartum depression (PPD) remains vastly underdiagnosed, and its clinical heterogeneity is not well understood. Diagnosis codes in electronic health records (EHRs) alone may not identify all PPD cases, highlighting a need for novel detection approaches.
OBJECTIVE
To develop a transformer-based natural language processing (NLP) method to identify patients with PPD from clinical notes in EHRs and to examine demographic and clinical heterogeneity among identified cases.
METHODS
Clinical notes from 64 426 patients who gave birth between 2010 and 2023 at a major US academic medical centre were used to develop and evaluate the NLP method. By augmenting the NLP output with International Classification of Diseases (ICD-9/10) diagnosis codes, three subgroups of individuals with PPD were identified: patients identified by ICD only (PPD-ICD), NLP only (PPD-NLP) and both ICD and NLP (PPD-BOTH). Demographics, mental health and substance use disorders (SUDs), antidepressant treatment, behavioural therapy and healthcare utilisation were compared across PPD subgroups and a non-PPD control group. Longitudinal associations of depression and anxiety were also examined.
FINDINGS: The NLP method identified an additional 29.6% of patients whose clinical notes indicated symptoms suggestive of PPD but who lacked an ICD diagnosis. Significant variation was observed among PPD subgroups in comorbid psychiatric disorders, SUDs, treatment patterns and healthcare utilisation. During the 24 months post-delivery, the PPD-BOTH subgroup exhibited the highest rates of anxiety disorder diagnoses (vs PPD-ICD: OR 1.69, 95% CI 1.49 to 1.93; vs PPD-NLP: OR 4.46, 95% CI 3.82 to 5.22), antidepressant prescriptions (vs PPD-ICD: OR 1.95, 95% CI 1.71 to 2.22; vs PPD-NLP: OR 5.98, 95% CI 5.11 to 7.01) and mental health outpatient visits (vs PPD-ICD: OR 1.45, 95% CI 1.24 to 1.7; vs PPD-NLP: OR 4.94, 95% CI 3.9 to 6.31), suggesting higher symptom severity (all p<0.001). Comorbid depression and anxiety diagnoses were most prevalent during the postpartum period and declined over time.
CONCLUSIONS
Augmenting NLP-based identification with ICD codes yielded more individuals with distinct demographic and clinical profiles, demonstrating the method's ability to improve case detection and characterise heterogeneity.
CLINICAL IMPLICATIONS: Given that PPD is underdiagnosed and undertreated, this novel approach demonstrates further potential for NLP in healthcare settings to capture more cases, enabling earlier and more personalised interventions that reach patients who may otherwise be overlooked.
Другие публикации по теме
Перевод полного текста: Перевод в очереди
Полный текст источника
https://creativecommons.org/licenses/by-nc/4.0/
Prakash Adekkanattu
Veer Vekaria
Yiye Zhang
Braja Gopal Patra
Priscilla Liang
Marianne Sharko
Natalie Benda
Meghan Reading Turchioe
Andrea Temkin-Yu
Alison Hermann
Jyotishman Pathak
Supplemental material This content has been supplied by the author(s). It has not been vetted by BMJ Publishing Group Limited (BMJ) and may not have been peer-reviewed. Any opinions or recommendations discussed are solely those of the author(s) and are not endorsed by BMJ. BMJ disclaims all liability and responsibility arising from any reliance placed on the content. Where the content includes any translated material, BMJ does not warrant the accuracy and reliability of the translations (including but not limited to local regulations, clinical guidelines, terminology, drug names and drug dosages), and is not responsible for any error and/or omissions arising from translation and adaptation or otherwise.
Additional supplemental material is published online only. To view, please visit the journal online ( https://doi.org/10.1136/bmjment-2025-302066 ).
No, there are no competing interests.
Dr Prakash Adekkanattu, Information Technologies & Services, Weill Cornell Medicine, New York, New York, USA; pra2008wcm@gmail.com
Received 2025 Sep 1; Accepted 2026 Mar 9; Collection date 2026.
This is an open access article distributed in accordance with the Creative Commons Attribution Non Commercial (CC BY-NC 4.0) license, which permits others to distribute, remix, adapt, build upon this work non-commercially, and license their derivative works on different terms, provided the original work is properly cited, appropriate credit is given, any changes made indicated, and the use is non-commercial. See: https://creativecommons.org/licenses/by-nc/4.0/ .
Abstract
Background
Postpartum depression (PPD) remains vastly underdiagnosed, and its clinical heterogeneity is not well understood. Diagnosis codes in electronic health records (EHRs) alone may not identify all PPD cases, highlighting a need for novel detection approaches.
Objective
To develop a transformer-based natural language processing (NLP) method to identify patients with PPD from clinical notes in EHRs and to examine demographic and clinical heterogeneity among identified cases.
Methods
Clinical notes from 64 426 patients who gave birth between 2010 and 2023 at a major US academic medical centre were used to develop and evaluate the NLP method. By augmenting the NLP output with International Classification of Diseases (ICD-9/10) diagnosis codes, three subgroups of individuals with PPD were identified: patients identified by ICD only (PPD-ICD), NLP only (PPD-NLP) and both ICD and NLP (PPD-BOTH). Demographics, mental health and substance use disorders (SUDs), antidepressant treatment, behavioural therapy and healthcare utilisation were compared across PPD subgroups and a non-PPD control group. Longitudinal associations of depression and anxiety were also examined.
Findings
The NLP method identified an additional 29.6% of patients whose clinical notes indicated symptoms suggestive of PPD but who lacked an ICD diagnosis. Significant variation was observed among PPD subgroups in comorbid psychiatric disorders, SUDs, treatment patterns and healthcare utilisation. During the 24 months post-delivery, the PPD-BOTH subgroup exhibited the highest rates of anxiety disorder diagnoses (vs PPD-ICD: OR 1.69, 95% CI 1.49 to 1.93; vs PPD-NLP: OR 4.46, 95% CI 3.82 to 5.22), antidepressant prescriptions (vs PPD-ICD: OR 1.95, 95% CI 1.71 to 2.22; vs PPD-NLP: OR 5.98, 95% CI 5.11 to 7.01) and mental health outpatient visits (vs PPD-ICD: OR 1.45, 95% CI 1.24 to 1.7; vs PPD-NLP: OR 4.94, 95% CI 3.9 to 6.31), suggesting higher symptom severity (all p<0.001). Comorbid depression and anxiety diagnoses were most prevalent during the postpartum period and declined over time.
Conclusions
Augmenting NLP-based identification with ICD codes yielded more individuals with distinct demographic and clinical profiles, demonstrating the method’s ability to improve case detection and characterise heterogeneity.
Clinical implications
Given that PPD is underdiagnosed and undertreated, this novel approach demonstrates further potential for NLP in healthcare settings to capture more cases, enabling earlier and more personalised interventions that reach patients who may otherwise be overlooked.
Keywords: Mood Disorders, Depressive Disorder, Psychiatry, Mental Health, Mental Health Services
WHAT IS ALREADY KNOWN ON THIS TOPIC
Postpartum depression (PPD) remains vastly underdiagnosed, and novel approaches are necessary to improve identification.
WHAT THIS STUDY ADDS
The natural language processing (NLP) method identified 29.6% more patients with PPD symptoms but missed a diagnosis by International Classification of Diseases (ICD) codes. Those identified by both NLP and ICD had significantly higher comorbidities, treatment use and healthcare visits, highlighting a subgroup with the most severe symptoms.
HOW THIS STUDY MIGHT AFFECT RESEARCH, PRACTICE OR POLICY
This study demonstrates the utility of NLP to improve the sensitivity and personalisation of PPD diagnosis and treatment, and the findings may inform future research on PPD risk stratification.
Introduction
Postpartum depression (PPD) is a serious mental health condition that can significantly impact a mother’s well-being, quality of life and her child’s development and safety. 1 Although prevalence rates vary globally, estimates suggest as much as 14% of mothers may experience PPD. 2 In the Diagnostic and Statistical Manual of Mental Disorders, fifth edition, PPD shares the same diagnostic criteria as major depressive disorder, with an additional postpartum onset specifier of 4 weeks. 3 Clinically, the strongest risk factor for PPD is a history of mental illness, 4 with additional risks linked to genetics and hormones, social or environmental factors, socioeconomic challenges and stressful or traumatic life events. 5 6
Identifying and treating PPD is essential to protect the health of mothers and their infants. Early detection and intervention are linked to faster remission and fewer symptom relapses. 7 Professional guidelines recommend universal PPD screening as part of routine care during pregnancy and postpartum, 8 often using validated tools such as the Edinburgh Postnatal Depression Scale and Patient Health Questionnaire-9 (PHQ-9). 9 10 However, barriers such as limited clinician time and mental health stigma reduce screening uptake. As a result, underdiagnosis and undertreatment remain common, particularly among ethnic minorities and women with lower socioeconomic status. 11 Leveraging electronic health records (EHRs) with advanced artificial intelligence (AI) methods, including natural language processing (NLP), offers a promising strategy to overcome these barriers and identify more patients earlier in their care journey.
EHRs are widely used for phenotyping and developing risk prediction models, 12 and several studies, including our own, have explored PPD detection using structured EHR data. However, much of the clinically relevant information resides in unstructured clinical notes, which remain underutilised, limiting identification of patients who may not be captured by diagnosis codes alone. NLP offers a powerful means of extracting such information, and recent advances in transformer-based architectures have driven high-performance large language models for diverse clinical tasks. 13 In this study, our primary aim was to identify clinically and demographically distinct subgroups of patients with postpartum depression (PPD) and characterise their clinical features. To support this goal, we sought to develop and evaluate a transformer-based NLP approach by identifying symptomatic PPD cases from EHR clinical notes, comparing its performance against ICD diagnoses and chart review benchmarks. We further investigated the association and longitudinal trajectories of PPD and comorbid anxiety after childbirth.
Methods
Setting
The study dataset was derived from patients receiving care at Weill Cornell Medicine (WCM), a large academic medical centre in New York City affiliated with the NewYork-Presbyterian Hospital. Data were standardised using the Observational Medical Outcomes Partnership (OMOP) Common Data Model and included approximately 4 million patients with information from both outpatient and inpatient clinical systems. Clinical notes within the OMOP dataset provided the foundation for developing the NLP method.
Data collection
To develop and validate our NLP method to identify PPD, we extracted clinical notes for 60 426 adult patients (aged ≥18 years) who delivered between 2010 and 2023, hereafter defined as the EHR length. The dataset included 1 195 081 clinical notes for the 60 426 patients and was reported during the time period from 2010 through 2023. Examples of note types include progress note, history and physical note, procedure note, nursing note, assessment and plan note, care coordination and others. Notes were authored by clinicians across multiple specialties, including internal medicine, psychiatry, obstetrics and gynaecology, anaesthesiology and pain medicine, reported during initial encounters as well as follow-up. These notes were highly heterogeneous in content and detail and unstructured in format, reflecting the complexity of routine, real-world clinical documentation. Clinical notes reported over a 24-month window post-delivery were used by the NLP system to determine patients’ PPD status. The patient’s PPD status was also determined by a diagnosis of depression based on ICD codes reported over a 24-month window post-delivery. We used a longer observation period of 0–24 months postpartum mainly to help identify later-occurring cases, particularly among women with prior health risks. Prior work indicates that postpartum depressive symptoms can emerge and remain elevated throughout the first postpartum year and beyond and that women with pre-existing clinical or psychosocial vulnerabilities are at comparatively higher risk. 14 15 The PPD status from NLP output was combined with the depression diagnosis to identify the three subtypes of PPD. The demographic and clinical characteristics of the patients with PPD were studied using other structured data in the EHR.
Reference standards for NLP evaluation
The NLP method was evaluated using two reference standards: ICD diagnosis codes and clinician chart review. For the ICD-based reference standard, ICD-9 codes (296.2, 296.3 and 311) and ICD-10 codes (F32*, F33*, F34.1* and F53.0) were used to define patients’ PPD status. 800 notes from 800 unique patients with two or more PPD diagnoses during 0–24 months postpartum as reported by ICD codes were labelled as positive, while 800 notes from 800 unique patients with no ICD diagnosis of PPD ever were labelled as negative. The second reference standard was established through a clinician chart review of 100 patients randomly selected from the base cohort after NLP processing. The chart review reference standard was constructed using stratified, equal-sized sampling across NLP/ICD-defined strata to ensure adequate representation of each subgroup for evaluation purposes. This sampling strategy was intended to balance strata rather than to reflect the underlying population prevalence of PPD. Refer to online supplemental exhibit 1 for details on the development of the two reference standards. For the chart review reference, two behavioural health clinicians (AH and AT) reviewed all notes from 0 to 24 months postpartum using Epic Systems, following standardised guidelines to identify mentions of depression and associated symptoms. Reviewer consensus was achieved in 72% of cases; the remaining non-conforming cases were excluded from the NLP system evaluation. Refer to online supplemental exhibit 2 for details of the standardised guidelines used in the chart review. The inter-annotator agreement, measured by Cohen’s Kappa between the two reviewers, was 0.46, indicating a moderate level of agreement.
NLP tool development
We implemented the NLP method for detecting PPD in clinical notes using the spaCy framework and BERT transformers. 16 , 19 For our NLP system, we employed a two-step framework. In the first step, we extracted depression-related concepts along with their surrounding context from clinical notes for each patient over a defined time period. These extracted segments were then aggregated to create a comprehensive, patient-level text representation. In the second step, this patient-level representation was used to finetune a pretrained transformer model. Refer to online supplemental exhibit 3 for details of NLP tool development and evaluation.
Large-scale NLP data processing
After validating the NLP method, we applied it to the full cohort of 60 426 patients, processing 1 195 081 clinical notes documented during 0–24 months postpartum. Using the same approach as in model development, notes were transformed into patient-level text representations, which served as input to the transformer model. Each patient’s PPD status was then determined from the model’s classification output.
Patient cohorts for PPD analysis
Combining the NLP output from clinical notes reported during 0–24 months postpartum with ICD-based PPD diagnoses during this period enabled us to identify three patient subgroups:
PPD-ICD: Patients who had an ICD diagnosis of PPD, but the NLP method did not positively identify PPD from clinical notes.
PPD-NLP: Patients whom the NLP method positively identified as having PPD, but no ICD diagnosis of PPD during this period.
PPD-BOTH: Patients who had an ICD diagnosis of PPD and the NLP method positively identified PPD from clinical notes.
Additionally, a control cohort (non-PPD) was created, including patients with neither an ICD diagnosis nor NLP-detected PPD symptoms in their clinical notes.
Demographic and clinical characterisation
Demographic characteristics, comorbid mental health and substance use disorders, medication and psychotherapy use and healthcare utilisation from structured EHR data were compared between PPD and non-PPD cohorts, as well as across PPD subgroups. Diagnosis, treatment patterns and healthcare utilisation were assessed for the 24 months before and after delivery, as well as across the full EHR length from 2010 to 2023. For treatments among PPD subgroups, we used only prescription and psychotherapy session orders for patients since the EHR system does not capture patients’ prescription or psychotherapy adherence details. Psychiatric and non-psychiatric service utilisation was measured based on the count of ambulatory visits (AV), emergency department (ED) encounters, emergency-to-inpatient admissions (EI) and inpatient hospital stays (IP) during the study period. ORs, 95% CIs and p-values were computed between the subgroups of the PPD cohort and between patients with PPD and without PPD. All statistical analyses were performed using R V.3.6.1, and associations were considered statistically significant if p<0.005, ensuring reliable and meaningful results by minimising false positives. ORs were calculated using the epitools package in R employing the midp method (median-unbiased estimation model). Patient counts and corresponding percentages for associations among PPD subgroups and between PPD and non-PPD cohorts are provided in online supplemental table S1–S4 .
Association of depression and anxiety in patients with PPD
The long-term association between depression and anxiety was examined across PPD subgroups and compared with patients without PPD ( online supplemental exhibit 4 ). Data spanning 10 years were analysed, including 4 years before delivery, the 2-year postpartum period and 4 years after.
Results
Model performance and cohort identification
Using the ICD-based reference standard, the NLP method achieved a precision of 0.94 (95% CI 0.89 to 0.98), a recall of 0.92 (95% CI 0.86 to 0.96) and an F1-score of 0.92 (95% CI 0.89 to 0.96). Performance decreased when evaluated against the chart review-based reference standard, with a precision of 0.72 (95% CI 0.41 to 0.73), a recall of 0.74 (95% CI 0.62 to 0.95) and an F1-score of 0.71 (95% CI 0.52 to 0.79). Because the chart review dataset was not population-representative, and reviewer consensus was not achieved for the 100 test cases, prevalence-dependent metrics such as positive and negative predictive value should be interpreted as conditional on the sampling design rather than as estimates of population-level performance.
Of the 60 426 patients in the study cohort, 5501 (9.1%) were identified as having PPD during the 0–24 months postpartum (the ‘PPD cohort’). Within this cohort, 2323 patients (42.2%) were identified via ICD diagnosis codes (PPD-ICD), 1627 patients (29.6%) were identified by the NLP method (PPD-NLP), and 1551 patients (28.2%) were identified by both approaches (PPD-BOTH). Refer to online supplemental figure S1 for details on PPD and non-PPD cohorts identified from the WCM EHR.
Patient demographic characteristics
Table 1 (also online supplemental table S1 ) summarises demographic characteristics of the PPD and non-PPD cohorts. Patients with PPD were slightly older than patients without PPD (mean age 34.33 (SD=5.49) vs 33.69 (SD=5.30)), with more women aged 39–45 years in the PPD cohort and more aged 25–31 years in the non-PPD cohort. Asian women were more prevalent in the non-PPD group (OR 2.21, 95% CI 2.03 to 2.41, p<0.001), whereas White women were more common in the PPD group (OR 0.73, 95% CI 0.69 to 0.77, p<0.001). Hispanic ethnicity was more frequent in the PPD cohort (OR 0.63, 95% CI 0.59 to 0.68, p<0.001), while non-Hispanic women were more common in the non-PPD group (OR 1.58, 95% CI 1.47 to 1.69, p<0.001). The PPD cohort also had a higher proportion of single women (OR 0.80, 95% CI 0.75 to 0.85, p<0.001), whereas married women were more prevalent in the non-PPD cohort (OR 1.37, 95% CI 1.29 to 1.46, p<0.001).
Table 1. OR of demographic characteristics between the subgroups of PPD cohort and between patients without PPD and with PPD.
| PPD-ICD | PPD-NLP | PPD-BOTH | PPD | Non-PPD | |
| n | 2323 | 1627 | 1551 | 5501 | 54 925 |
| Notes/patient (SD) | 35 (234.24) | 30 (178.21) | 28 (49.23) | 31 (182.39) | 18 (96.39) |
| Encounters/patient(SD) electronic health record length | 105 (100.00) | 134 (116.16) | 169 (140.78) | 132 (120.44) | 74 (76.09) |
| Encounters/patient (SD) after delivery | 41 (58.37) | 61 (71.16) | 79 (89.70) | 58 (73.81) | 32 (47.33) |
| Encounters/patient (SD) before delivery | 65 (67.43) | 74 (71.30) | 91 (83.68) | 75 (74.29) | 45 (48.01) |
| Avg age (SD) at delivery | 34.32 (5.41) | 33.95 (5.62) | 34.77 (5.45) | 34.33 (5.49) | 33.69 (5.30) |
| PPD-NLP versus PPD-ICD OR (95% CI) P value | PPD-BOTH versus PPD-ICD OR (95% CI) P value | PPD-BOTH versus PPD-NLP OR (95% CI) P value | Non-PPD versus PPD OR (95% CI) P value | ||
| Age categories | |||||
| <18 | NA | NA | NA | NA | |
| 18–24 | 1.15 (0.88 to 1.5) 0.32 | 0.9 (0.67 to 1.2) 0.46 | 0.78 (0.57 to 1.06) 0.11 | 1.05 (0.93 to 1.19) 0.42 | |
| 25–31 | 1.15 (0.99 to 1.34) 0.07 | 0.82 (0.7 to 0.96) 0.02 | 0.71 (0.6 to 0.85) <0.001 | 1.25 (1.17 to 1.34) <0.001 | |
| 32–38 | 0.96 (0.84 to 1.09) 0.5 | 1.13 (1 to 1.29) 0.06 | 1.18 (1.03 to 1.36) 0.02 | 0.99 (0.94 to 1.05) 0.82 | |
| 39–45 | 0.86 (0.74 to 1.01) 0.07 | 0.99 (0.84 to 1.16) 0.89 | 1.14 (0.96 to 1.36) 0.13 | 0.78 (0.73 to 0.84) <0.001 | |
| >45 | 1.22 (0.69 to 2.14) 0.49 | 1.68 (0.99 to 2.85) 0.05 | 1.37 (0.79 to 2.4) 0.25 | 0.67 (0.54 to 0.86) <0.005 | |
| Race | |||||
| Native/Alaskan | 0.49 (0.1 to 1.68) 0.25 | 0.84 (0.25 to 2.49) 0.74 | 1.72 (0.4 to 8.91) 0.44 | 0.72 (0.45 to 1.25) 0.22 | |
| Asian | 1.26 (1.04 to 1.53) 0.02 | 0.65 (0.52 to 0.82) <0.001 | 0.52 (0.41 to 0.65) <0.001 | 2.21 (2.03 to 2.41) <0.001 | |
| Black/AA | 0.96 (0.79 to 1.17) 0.71 | 1.22 (1.01 to 1.48) 0.04 | 1.27 (1.03 to 1.56) 0.03 | 0.81 (0.75 to 0.89) <0.001 | |
| Hawaiian/PI | 1.5 (0.82 to 2.77) 0.18 | 1.15 (0.58 to 2.2) 0.69 | 0.76 (0.39 to 1.46) 0.41 | 1.87 (1.45 to 2.46) <0.001 | |
| White | 0.84 (0.74 to 0.95) 0.01 | 1.05 (0.92 to 1.19) 0.48 | 1.25 (1.09 to 1.44) <0.005 | 0.73 (0.69 to 0.77) <0.001 | |
| Other/unknown | 1.11 (0.95 to 1.28) 0.18 | 0.99 (0.85 to 1.15) 0.89 | 0.9 (0.76 to 1.05) 0.18 | 0.93 (0.87 to 0.99) 0.02 | |
| Ethnicity | |||||
| Hispanic | 1.18 (1.01 to 1.38) 0.04 | 1.17 (1 to 1.38) 0.05 | 1 (0.84 to 1.18) 0.97 | 0.63 (0.59 to 0.68) <0.001 | |
| Non-Hispanic | 0.85 (0.72 to 0.99) 0.04 | 0.85 (0.73 to 1) 0.05 | 1 (0.85 to 1.19) 0.97 | 1.58 (1.47 to 1.69) <0.001 | |
| Other/unknown | 0.27 (0.01 to 1.61) 0.15 | 0.28 (0.01 to 1.69) 0.16 | 1.05 (0.03 to 40.91) 0.97 | 0.87 (0.43 to 2.1) 0.76 | |
| Marital status | |||||
| Single | 0.92 (0.79 to 1.08) 0.3 | 0.89 (0.76 to 1.04) 0.14 | 0.96 (0.81 to 1.14) 0.66 | 0.8 (0.75 to 0.85) <0.001 | |
| Married | 1.05 (0.91 to 1.2) 0.5 | 1.12 (0.98 to 1.29) 0.11 | 1.07 (0.92 to 1.25) 0.38 | 1.37 (1.29 to 1.46) <0.001 | |
| Divorced | 1.43 (0.82 to 2.49) 0.19 | 1.27 (0.71 to 2.26) 0.41 | 0.89 (0.49 to 1.58) 0.68 | 0.63 (0.5 to 0.82) <0.001 | |
| Widowed | 5.19 (0.72 to 141.64) 0.08 | 4.13 (0.48 to 118.5) 0.15 | 0.8 (0.15 to 3.81) 0.75 | 0.48 (0.24 to 1.12) 0.06 | |
| Other/unknown | 0.95 (0.75 to 1.22) 0.71 | 0.88 (0.68 to 1.13) 0.3 | 0.92 (0.7 to 1.21) 0.54 | 0.69 (0.62 to 0.78) <0.001 |
ICD, International Classification of Diseases; NLP, natural language processing; PPD, postpartum depression.
We observed variations in age among PPD subgroups, with the highest average age in the PPD-BOTH subgroup (34.77 (SD=5.45)). PPD-BOTH had the lowest proportion of Asian patients compared with PPD-ICD (OR 0.65, 95% CI 0.52 to 0.82, p<0.001) and PPD-NLP (OR 0.52, 95% CI 0.41 to 0.65, p<0.001) and a higher proportion of White patients compared with PPD-NLP (OR 1.25, 95% CI 1.09 to 1.44, p<0.005). Hispanic patient prevalence was slightly lower in the PPD-ICD subgroup (18.6%) than in the PPD-NLP (21.2%) and PPD-BOTH (21.1%) subgroups, though differences were less statistically significant.
Patients with PPD had a higher number of notes and encounters per patient compared with patients without PPD. Among PPD subgroups, PPD-BOTH had the highest number of encounters per patient, indicating greater healthcare utilisation, whereas PPD-ICD had the lowest.
Mental health and substance use disorders
Table 2 (also online supplemental table S2 ) presents mental health and SUD diagnoses in the PPD and non-PPD cohorts. From 1 to 24 months before delivery, patients with PPD had higher rates of mental health conditions and SUDs. Among PPD subgroups, depression and anxiety prevalence were highest in PPD-BOTH compared with PPD-ICD and PPD-NLP. For the period 0–24 months after delivery, nearly 70% and 39.3% of patients with PPD had a diagnosis of depression and anxiety, respectively, compared with 0.3% and 5.2% in the non-PPD cohort. By definition, patients without PPD should have no depression diagnosis during this period; however, a few were diagnosed due to delays between cohort identification and measurement. Among PPD subgroups, anxiety diagnoses were highest in PPD-BOTH compared with PPD-ICD (OR 1.69, 95% CI 1.49 to 1.93, p<0.001) and PPD-NLP (OR 4.46, 95% CI 3.82 to 5.22, p<0.001). Post-traumatic stress disorder (PTSD) diagnoses were also highest in PPD-BOTH compared with PPD-ICD (OR 1.86, 95% CI 1.37 to 2.55, p<0.001) and PPD-NLP (OR 4.02, 95% CI 2.61 to 6.43, p<0.001). Severe mental illness differed significantly between PPD-ICD and PPD-NLP (OR 0.37, 95% CI 0.16 to 0.74, p<0.005). Post-delivery EHR data showed significant variations between PPD-BOTH and PPD-NLP for PTSD (OR 3.28, 95% CI 2.22 to 4.97, p<0.001), eating disorder (OR 3.93, 95% CI 1.56 to 12.1, p<0.005), personality disorder (OR 2.41, 95% CI 1.3 to 4.7, p<0.005) and SUDs (OR 1.8, 95% CI 1.31 to 2.48, p<0.001). For the entire EHR history, patients with PPD had markedly higher rates of mental health and substance use diagnoses, and within PPD subgroups, PPD-BOTH exhibited elevated comorbidity compared with PPD-NLP and PPD-ICD.
Table 2. OR of diagnosis of mental health and substance use disorders between the subgroups of patients with PPD and between patients without PPD and with PPD during various observation periods.
| PPD-NLP versus PPD-ICD OR (95% CI) P value | PPD-BOTH versus PPD-ICD OR (95% CI) P value | PPD-BOTH versus PPD-NLP OR (95% CI) P value | Non-PPD versus PPD OR (95% CI) P value | |
| Period: 24–1 months before delivery | ||||
| Generalised anxiety | 0.72 (0.6 to 0.86) <0.001 | 1.84 (1.58 to 2.16) <0.001 | 2.57 (2.14 to 3.09) <0.001 | 0.11 (0.1 to 0.12) <0.001 |
| Anxiety disorders (including panic disorder, OCD and phobias) | 0.71 (0.59 to 0.84) <0.001 | 1.79 (1.54 to 2.08) <0.001 | 2.53 (2.12 to 3.02) <0.001 | 0.11 (0.1 to 0.12) <0.001 |
| Depression (MDD, PPD and unspecified) | 0.3 (0.25 to 0.37) <0.001 | 2.11 (1.84 to 2.42) <0.001 | 6.99 (5.75 to 8.54) <0.001 | 0.02 (0.02 to 0.03) <0.001 |
| Depression (depressive, bipolar and other mood disorders) | 0.37 (0.31 to 0.44) <0.001 | 2.18 (1.9 to 2.5) <0.001 | 5.94 (4.94 to 7.16) <0.001 | 0.03 (0.03 to 0.03) <0.001 |
| Severe mental illnesses (schizophrenia, etc) | 0.72 (0.25 to 1.89) 0.5 | 1.75 (0.8 to 3.89) 0.15 | 2.42 (0.96 to 6.97) 0.06 | 0.09 (0.05 to 0.15) <0.001 |
| Eating disorder | 0.12 (0 to 0.57) 0.01 | 1.4 (0.64 to 3.01) 0.39 | 12.13 (2.4 to 295.01) <0.001 | 0.09 (0.05 to 0.16) <0.001 |
| Personality disorder | 1.01 (0.36 to 2.66) 1 | 2.1 (0.93 to 4.92) 0.07 | 2.08 (0.86 to 5.59) 0.1 | 0.08 (0.04 to 0.13) <0.001 |
| Post-traumatic stress disorder | 0.5 (0.25 to 0.95) 0.04 | 1.42 (0.87 to 2.32) 0.16 | 2.81 (1.48 to 5.73) <0.005 | 0.07 (0.05 to 0.1) <0.001 |
| Opioid use disorder | Inf (NaN to Inf) 0.01 | Inf (NaN to Inf) <0.005 | 1.47 (0.47 to 4.64) 0.57 | 0.22 (0.12 to 0.46) <0.001 |
| Alcohol use disorder | 0.92 (0.38 to 2.13) 0.84 | 1.08 (0.46 to 2.43) 0.87 | 1.16 (0.46 to 2.98) 0.74 | 0.17 (0.11 to0.27) <0.001 |
| Tobacco use disorder | 0.91 (0.52 to 1.57) 0.73 | 1.28 (0.76 to 2.12) 0.35 | 1.4 (0.79 to 2.52) 0.24 | 0.24 (0.19 to 0.31) <0.001 |
| All SUDs | 1 (0.65 to 1.5) 0.98 | 1.27 (0.85 to 1.88) 0.24 | 1.27 (0.83 to 1.97) 0.27 | 0.24 (0.2 to 0.3) <0.001 |
| Period: 0–24 months after delivery | ||||
| Generalised anxiety | 0.38 (0.33 to 0.44) <0.001 | 1.69 (1.49 to 1.93) <0.001 | 4.46 (3.82 to 5.22) <0.001 | 0.08 (0.08 to 0.09) <0.001 |
| Anxiety disorders (including panic disorder, OCD and phobias) | 0.46 (0.4 to 0.52) <0.001 | 1.7 (1.49 to 1.94) <0.001 | 3.73 (3.22 to 4.33) <0.001 | 0.08 (0.08 to 0.09) <0.001 |
| Depression (MDD, PPD and unspecified) | 0 (0 to 0) <0.001 | Inf (NaN to Inf) 0.28 | Inf (NaN to Inf) <0.001 | 0 (0 to 0) <0.001 |
| Depression (depressive, bipolar and other mood disorders) | 0 (0 to 0) <0.001 | Inf (NaN to Inf) 1 | Inf (NaN to Inf) <0.001 | 0 (0 to 0) <0.001 |
| Severe mental illnesses (schizophrenia, etc) | 0.37 (0.16 to 0.74) <0.005 | 0.86 (0.48 to 1.48) 0.58 | 2.33 (1.08 to 5.43) 0.03 | 0.08 (0.05 to 0.11) <0.001 |
| Eating disorder | 0.25 (0.06 to 0.74) 0.01 | 1.42 (0.72 to 2.79) 0.3 | 5.75 (1.91 to 25.69) <0.005 | 0.1 (0.07 to 0.16) <0.001 |
| Personality disorder | 0.89 (0.43 to 1.76) 0.73 | 1.94 (1.09 to 3.49) 0.02 | 2.18 (1.14 to 4.41) 0.02 | 0.06 (0.04 to 0.09) <0.001 |
| Post-traumatic stress disorder | 0.46 (0.29 to 0.72) <0.001 | 1.86 (1.37 to 2.55) <0.001 | 4.02 (2.61 to 6.43) <0.001 | 0.06 (0.05 to 0.08) <0.001 |
| Opioid use disorder | 1.19 (0.5 to 2.8) 0.68 | 1.88 (0.87 to 4.13) 0.1 | 1.57 (0.71 to 3.65) 0.26 | 0.15 (0.1 to 0.23) <0.001 |
| Alcohol use disorder | 0.48 (0.22 to 0.95) 0.04 | 1.2 (0.69 to 2.07) 0.51 | 2.52 (1.23 to 5.57) 0.01 | 0.11 (0.07 to 0.15) <0.001 |
| Tobacco use disorder | 0.78 (0.49 to 1.21) 0.26 | 1.2 (0.8 to 1.8) 0.36 | 1.55 (0.97 to 2.51) 0.06 | 0.28 (0.23 to 0.34) <0.001 |
| All SUDs | 0.71 (0.5 to 0.99) 0.04 | 1.28 (0.96 to 1.72) 0.09 | 1.82 (1.29 to 2.6) <0.001 | 0.21 (0.18 to 0.25) <0.001 |
| Period: 0 to EHR length after delivery | ||||
| Generalised anxiety | 0.43 (0.38 to 0.5) <0.001 | 1.77 (1.55 to 2.02) <0.001 | 4.07 (3.51 to 4.73) <0.001 | 0.1 (0.1 to 0.11) <0.001 |
| Anxiety disorders (including panic disorder, OCD and phobias) | 0.5 (0.44 to 0.57) <0.001 | 1.75 (1.53 to 1.99) <0.001 | 3.49 (3.02 to 4.04) <0.001 | 0.1 (0.1 to 0.11) <0.001 |
| Depression (MDD, PPD and unspecified) | 0 (0 to 0) <0.001 | Inf (NaN to Inf) 0.28 | Inf (NaN to Inf) <0.001 | 0.01 (0.01 to 0.01) <0.001 |
| Depression (depressive, bipolar and other mood disorders) | 0 (0 to 0) <0.001 | Inf (NaN to Inf) 1 | Inf (NaN to Inf) <0.001 | 0.01 (0.01 to 0.01) <0.001 |
| Severe mental illnesses (schizophrenia, etc) | 0.39 (0.19 to 0.74) <0.005 | 0.86 (0.51 to 1.44) 0.56 | 2.19 (1.08 to 4.72) 0.03 | 0.1 (0.07 to 0.14) <0.001 |
| Eating disorder | 0.35 (0.11 to 0.86) 0.02 | 1.36 (0.72 to 2.55) 0.33 | 3.93 (1.56 to 12.1) <0.005 | 0.15 (0.1 to 0.22) <0.001 |
| Personality disorder | 0.77 (0.39 to 1.46) 0.42 | 1.86 (1.1 to 3.16) 0.02 | 2.41 (1.3 to 4.7) <0.005 | 0.07 (0.05 to 0.1) <0.001 |
| Post-traumatic stress disorder | 0.55 (0.36 to 0.81) <0.005 | 1.79 (1.33 to 2.42) <0.001 | 3.28 (2.22 to 4.97) <0.001 | 0.08 (0.06 to 0.09) <0.001 |
| Opioid use disorder | 0.99 (0.44 to 2.13) 0.96 | 1.5 (0.74 to 3.05) 0.25 | 1.52 (0.71 to 3.42) 0.28 | 0.16 (0.11 to 0.24) <0.001 |
| Alcohol use disorder | 0.69 (0.38 to 1.23) 0.21 | 1.29 (0.78 to 2.11) 0.31 | 1.86 (1.03 to 3.47) 0.04 | 0.17 (0.13 to 0.22) <0.001 |
| Tobacco use disorder | 0.86 (0.58 to 1.26) 0.44 | 1.23 (0.86 to 1.75) 0.25 | 1.43 (0.96 to 2.15) 0.08 | 0.31 (0.26 to 0.36) <0.001 |
| All SUDs | 0.71 (0.52 to 0.96) 0.03 | 1.27 (0.98 to 1.66) 0.07 | 1.8 (1.31 to 2.48) <0.001 | 0.25 (0.22 to 0.29) <0.001 |
| Period: entire EHR length | ||||
| Generalised anxiety | 0.46 (0.41 to 0.53) <0.001 | 1.77 (1.56 to 2.02) <0.001 | 3.82 (3.3 to 4.43) <0.001 | 0.11 (0.1 to 0.11) <0.001 |
| Anxiety disorders (including panic disorder, OCD and phobias) | 0.51 (0.45 to 0.58) <0.001 | 1.78 (1.56 to 2.04) <0.001 | 3.51 (3.03 to 4.06) <0.001 | 0.1 (0.1 to 0.11) <0.001 |
| Depression (MDD, PPD and unspecified) | 0 (0 to 0) <0.001 | Inf (NaN to Inf) 0.28 | Inf (NaN to Inf) <0.001 | 0.01 (0.01 to 0.01) <0.001 |
| Depression (depressive, bipolar and other mood disorders) | 0 (0 to 0) <0.001 | Inf (NaN to Inf) 1 | Inf (NaN to Inf) <0.001 | 0.01 (0.01 to 0.01) <0.001 |
| Severe mental illnesses (schizophrenia, etc) | 0.6 (0.34 to 1.02) 0.06 | 1.07 (0.67 to 1.68) 0.78 | 1.78 (1.01 to 3.21) 0.04 | 0.11 (0.08 to 0.14) <0.001 |
| Eating disorder | 0.27 (0.11 to 0.58) <0.001 | 1.3 (0.8 to 2.1) 0.28 | 4.79 (2.23 to 11.96) <0.001 | 0.15 (0.11 to 0.2) <0.001 |
| Personality disorder | 0.75 (0.43 to 1.28) 0.3 | 1.67 (1.07 to 2.62) 0.02 | 2.23 (1.32 to 3.9) <0.005 | 0.08 (0.06 to 0.1) <0.001 |
| Post-traumatic stress disorder | 0.61 (0.42 to 0.87) 0.01 | 1.61 (1.22 to 2.14) <0.001 | 2.63 (1.85 to 3.81) <0.001 | 0.08 (0.07 to 0.1) <0.001 |
| Opioid use disorder | 1.07 (0.49 to 2.28) 0.86 | 1.69 (0.85 to 3.38) 0.12 | 1.57 (0.76 to 3.39) 0.22 | 0.17 (0.12 to 0.24) <0.001 |
| Alcohol use disorder | 0.94 (0.6 to 1.46) 0.79 | 1.42 (0.95 to 2.13) 0.09 | 1.51 (0.96 to 2.39) 0.07 | 0.18 (0.15–0.23) <0.001 |
| Tobacco use disorder | 0.94 (0.68 to 1.3) 0.7 | 1.23 (0.91 to 1.67) 0.18 | 1.31 (0.94 to 1.84) 0.11 | 0.31 (0.27 to 0.36) <0.001 |
| All SUDs | 0.8 (0.61 to 1.02) 0.08 | 1.26 (1 to 1.58) 0.05 | 1.58 (1.21 to 2.06) <0.001 | 0.26 (0.23 to 0.3) <0.001 |
EHR, electronic health record; MDD, major depressive disorder; OCD, obsessive compulsive disorder; PPD, postpartum depression; SUD, substance use disorders.
Treatment patterns
Table 3 (also online supplemental table 3 ) presents antidepressant prescriptions and psychotherapy use among PPD and non-PPD cohorts. Across all periods, a higher proportion of patients with PPD received treatment. Before childbirth, 24% of patients with PPD received an antidepressant and 3% received psychotherapy, compared with 1.8% and 0.7% in patients without PPD. Within PPD subgroups, PPD-BOTH had the highest antidepressant use and psychotherapy compared with PPD-ICD and PPD-NLP. For the period 0–24 months after delivery, 42.1% and 5% of patients with PPD received an antidepressant and psychotherapy, respectively. The number of prescriptions per patient was 4 (SD=5.62), and the number of psychotherapy sessions per patient was 16 (SD=21.43). Among PPD subgroups, PPD-BOTH received the highest number of antidepressant prescriptions compared with PPD-ICD (OR 1.95, 95% CI 1.71 to 2.22, p<0.001) and PPD-NLP (OR 5.98, 95% CI 5.11 to 7.01, p<0.001), while PPD-NLP had fewer prescriptions than PPD-ICD (OR 0.33, 95% CI 0.28 to 0.38, p<0.001). Over the entire EHR history, 52.8% and 8.7% of patients with PPD received an antidepressant and psychotherapy, respectively. The mean number of prescriptions per patient was 8 (SD=14.32), and the mean number of psychotherapy sessions was 19 (SD=34.25). PPD-BOTH received the highest number of antidepressant prescriptions compared with PPD-ICD (OR 2.03, 95% CI 1.77 to 2.33, p<0.001) and PPD-NLP (OR 5.44, 95% CI 4.68 to 6.34, p<0.001). Similarly, PPD-BOTH attended more psychotherapy sessions than PPD-ICD (OR 2.60, 95% CI 2.10 to 3.24, p<0.001) and PPD-NLP (OR 2.68, 95% CI 2.10 to 3.44, p<0.001).
Table 3. OR of depression treatment (antidepressant medication prescription and psychotherapy) between the three subgroups of PPD cohort and between patients without PPD and with PPD during various observation periods.
| PPD-NLP versus PPD-ICD OR (95% CI) P value | PPD-BOTH versus PPD-ICD OR (95% CI) P value | PPD-BOTH versus PPD-NLP OR (95% CI) P value | Non-PPD versus PPD OR (95% CI) P value | |
| Period: 24–1 months before delivery | ||||
| Antidepressant Rx | 0.4 (0.34 to 0.48) <0.001 | 1.71 (1.49 to 1.97) <0.001 | 4.23 (3.53 to 5.1) <0.001 | 0.06 (0.05 to 0.06) <0.001 |
| Psychotherapy | 1.26 (0.85 to 1.85) 0.24 | 2.5 (1.79 to 3.53) <0.001 | 1.99 (1.4 to 2.84) <0.001 | 0.18 (0.15 to 0.22) <0.001 |
| Period: 0–24 months after delivery | ||||
| Antidepressant Rx | 0.33 (0.28 to 0.38) <0.001 | 1.95 (1.71 to 2.22) <0.001 | 5.98 (5.11 to 7.01) <0.001 | 0.05 (0.05 to 0.05) <0.001 |
| Psychotherapy | 0.89 (0.62 to 1.27) 0.52 | 2.89 (2.19 to 3.84) <0.001 | 3.24 (2.35 to 4.55) <0.001 | 0.07 (0.06 to 0.08) <0.001 |
| Period: 0 to EHR length after delivery | ||||
| Antidepressant Rx | 0.39 (0.34 to 0.45) <0.001 | 1.99 (1.75 to 2.28) <0.001 | 5.06 (4.35 to 5.89) <0.001 | 0.08 (0.07 to 0.08) <0.001 |
| Psychotherapy | 1.12 (0.82 to 1.54) 0.47 | 2.84 (2.19 to 3.72) <0.001 | 2.53 (1.91 to 3.39) <0.001 | 0.13 (0.11 to 0.15) <0.001 |
| Period: entire EHR length | ||||
| Antidepressant Rx | 0.37 (0.33 to 0.43) <0.001 | 2.03 (1.77 to 2.33) <0.001 | 5.44 (4.68 to 6.34) <0.001 | 0.07 (0.07 to 0.08) <0.001 |
| Psychotherapy | 0.97 (0.74 to 1.26) 0.82 | 2.6 (2.1 to 3.24) <0.001 | 2.68 (2.1 to 3.44) <0.001 | 0.18 (0.16 to 0.2) <0.001 |
EHR, electronic health record; ICD, International Classification of Diseases; NLP, natural language processing; PPD, postpartum depression.
Healthcare services utilisation
As shown in table 4 (also online supplemental table 4 ), patients with PPD had significantly higher healthcare utilisation than patients without PPD across all observation periods, and among PPD subgroups, PPD-BOTH exhibited the highest utilisation for all periods. For instance, during the period 0–24 months post-delivery, mental health encounters were higher for patients with PPD in AV (OR 0.07, 95% CI 0.06 to 0.07, p<0.001), ED (OR 0.06, 95% CI 0.05 to 0.06, p<0.001), EI (OR 0.09, 95% CI 0.08 to 0.1, p<0.001) and IP (OR 0.09, 95% CI 0.08 to 0.1, p<0.001). Also, PPD-BOTH had the highest outpatient all-cause and mental health visits compared with PPD-ICD (all-cause: OR 1.86, 95% CI 1.61 to 2.14, p<0.001; mental health: OR 1.45, 95% CI 1.24 to 1.7, p<0.001) and PPD-NLP (all-cause: OR 1.52, 95% CI 1.31 to 1.77, p<0.001; mental health: OR 4.94, 95% CI 3.9 to 6.31, p<0.001). While all-cause visits were similar between PPD-ICD and PPD-NLP, PPD-ICD patients were more likely than PPD-NLP to receive anxiety and depression-related services in outpatient settings.
Table 4. OR of healthcare utilisation between the subgroups of PPD cohort and between patients without PPD and with PPD during various observation periods.
| PPD-NLP versus PPD-ICD OR (95% CI) P value | PPD-BOTH versus PPD-ICD OR (95% CI) P value | PPD-BOTH versus PPD-NLP OR (95% CI) P value | Non-PPD versus PPD OR (95% CI) P value | |
| Period: 24–1 months before delivery | ||||
| AV | ||||
| All cause | 1.07 (0.93 to 1.23) 0.35 | 1.6 (1.38 to 1.87) <0.001 | 1.5 (1.27 to 1.77) <0.001 | 0.51 (0.48 to 0.55) <0.001 |
| Mental health * | 0.6 (0.43 to 0.81) <0.005 | 1.97 (1.56 to 2.5) <0.001 | 3.31 (2.45 to 4.52) <0.001 | 0.08 (0.06 to 0.09) <0.001 |
| Anxiety | 0.64 (0.42 to 0.96) 0.03 | 2.2 (1.62 to 2.98) <0.001 | 3.42 (2.34 to 5.15) <0.001 | 0.11 (0.09 to 0.13) <0.001 |
| Depression | 0.3 (0.18 to 0.48) <0.001 | 1.83 (1.38 to 2.43) <0.001 | 6.09 (3.85 to 10.16) <0.001 | 0.02 (0.02 to 0.03) <0.001 |
| ED | ||||
| All cause | 0.96 (0.82 to 1.13) 0.66 | 1.19 (1.02 to 1.39) 0.03 | 1.24 (1.04 to 1.47) 0.01 | 0.42 (0.39 to 0.45) <0.001 |
| Mental health | 0.63 (0.45 to 0.87) 0.01 | 1.67 (1.28 to 2.17) <0.001 | 2.65 (1.91 to 3.72) <0.001 | 0.07 (0.06 to 0.08) <0.001 |
| Anxiety | 0.73 (0.48 to 1.09) 0.13 | 1.63 (1.17 to 2.28) <0.005 | 2.24 (1.51 to 3.39) <0.001 | 0.09 (0.07 to 0.11) <0.001 |
| Depression | 0.36 (0.21 to 0.57) <0.001 | 1.65 (1.2 to 2.26) <0.005 | 4.63 (2.89 to 7.79) <0.001 | 0.02 (0.02 to 0.03) <0.001 |
| EI hospital stay | ||||
| All cause | 0.55 (0.37 to 0.81) <0.005 | 1.15 (0.84 to 1.58) 0.37 | 2.09 (1.4 to 3.16) <0.001 | 0.46 (0.4 to 0.54) <0.001 |
| Mental health | 0.35 (0.15 to 0.72) <0.005 | 1.51 (0.92 to 2.46) 0.1 | 4.33 (2.09 to 10.19) <0.001 | 0.08 (0.06 to 0.11) <0.001 |
| Anxiety | 0.72 (0.27 to 1.75) 0.46 | 2.36 (1.21 to 4.77) 0.01 | 3.28 (1.46 to 8.41) <0.005 | 0.1 (0.06 to 0.15) <0.001 |
| Depression | 0.2 (0.05 to 0.59) <0.005 | 1.5 (0.82 to 2.75) 0.17 | 7.45 (2.56 to 32.75) <0.001 | 0.02 (0.01 to 0.03) <0.001 |
| IP hospital stay | ||||
| All cause | 1.04 (0.85 to 1.26) 0.7 | 1.08 (0.89 to 1.32) 0.42 | 1.04 (0.84 to 1.29) 0.69 | 0.88 (0.81 to 0.96) <0.005 |
| Mental health | 0.53 (0.3 to 0.9) 0.02 | 1.45 (0.96 to 2.19) 0.07 | 2.72 (1.59 to 4.84) <0.001 | 0.1 (0.07 to 0.13) <0.001 |
| Anxiety | 0.52 (0.23 to 1.08) 0.08 | 1.32 (0.74 to 2.36) 0.34 | 2.56 (1.21 to 5.93) 0.01 | 0.17 (0.12 to 0.23) <0.001 |
| Depression | 0.32 (0.14 to 0.66) <0.005 | 1.51 (0.94 to 2.42) 0.08 | 4.73 (2.3 to 11.08) <0.001 | 0.02 (0.01 to 0.04) <0.001 |
| Period: 0–24 months after delivery | ||||
| AV | ||||
| All cause | 1.22 (1.07 to 1.39) <0.005 | 1.86 (1.61 to 2.14) <0.001 | 1.52 (1.31 to 1.77) <0.001 | 0.54 (0.51 to 0.57) <0.001 |
| Mental health | 0.29 (0.23 to 0.37) <0.001 | 1.45 (1.24 to 1.7) <0.001 | 4.94 (3.9 to 6.31) <0.001 | 0.07 (0.06 to 0.07) <0.001 |
| Anxiety | 0.51 (0.39 to 0.67) <0.001 | 1.59 (1.3 to 1.94) <0.001 | 3.08 (2.37 to 4.04) <0.001 | 0.1 (0.09 to 0.12) <0.001 |
| Depression | 0.02 (0.01 to 0.04) <0.001 | 1.22 (1.03 to 1.45) 0.02 | 73.8 (33.88 to 210.47) <0.001 | 0.01 (0 to 0.01) <0.001 |
| ED | ||||
| All cause | 0.96 (0.85 to 1.09) 0.56 | 1.62 (1.42 to 1.84) <0.001 | 1.68 (1.46 to 1.93) <0.001 | 0.4 (0.38 to 0.42) <0.001 |
| Mental health | 0.27 (0.23 to 0.33) <0.001 | 1.55 (1.35 to 1.77) <0.001 | 5.69 (4.72 to 6.9) <0.001 | 0.06 (0.05 to 0.06) <0.001 |
| Anxiety | 0.44 (0.36 to 0.54) <0.001 | 1.46 (1.25 to 1.71) <0.001 | 3.3 (2.68 to 4.07) <0.001 | 0.1 (0.09 to 0.11) <0.001 |
| Depression | 0.01 (0 to 0.02) <0.001 | 1.49 (1.29 to 1.71) <0.001 | 213.01 (90.98 to 695.9) <0.001 | 0 (0 to 0) <0.001 |
| EI hospital stay | ||||
| All cause | 0.57 (0.46 to 0.7) <0.001 | 1.05 (0.87 to 1.25) 0.62 | 1.84 (1.48 to 2.3) <0.001 | 0.63 (0.58 to 0.69) <0.001 |
| Mental health | 0.22 (0.15 to 0.3) <0.001 | 1.03 (0.84 to 1.25) 0.8 | 4.75 (3.43 to 6.7) <0.001 | 0.09 (0.08 to 0.1) <0.001 |
| Anxiety | 0.36 (0.25 to 0.5) <0.001 | 1.13 (0.88 to 1.44) 0.35 | 3.15 (2.21 to 4.58) <0.001 | 0.13 (0.11 to 0.15) <0.001 |
| Depression | 0.01 (0 to 0.03) <0.001 | 0.92 (0.74 to 1.13) 0.43 | 83.14 (26.63 to 537.46) <0.001 | 0 (0 to 0) <0.001 |
| IP hospital stay | ||||
| All cause | 1.15 (1 to 1.33) 0.05 | 0.88 (0.76 to 1.02) 0.1 | 0.76 (0.65 to 0.9) <0.001 | 1.31 (1.23 to 1.39) <0.001 |
| Mental health | 0.37 (0.29 to 0.48) <0.001 | 1.18 (0.98 to 1.43) 0.08 | 3.16 (2.43 to 4.14) <0.001 | 0.09 (0.08 to 0.1) <0.001 |
| Anxiety | 0.7 (0.51 to 0.95) 0.02 | 1.2 (0.91 to 1.57) 0.19 | 1.72 (1.24 to 2.39) <0.001 | 0.17 (0.15 to 0.2) <0.001 |
| Depression | 0 (0 to NaN) <0.001 | 0.96 (0.79 to 1.15) 0.64 | Inf (NaN to Inf) <0.001 | 0 (0 to 0) <0.001 |
| Period: entire EHR length | ||||
| AV | ||||
| All cause | 1.16 (0.94 to 1.44) 0.16 | 2.33 (1.8 to 3.05) <0.001 | 2 (1.51 to 2.66) <0.001 | 0.39 (0.35 to 0.43) <0.001 |
| Mental health | 0.42 (0.35 to 0.5) <0.001 | 1.73 (1.51 to 1.99) <0.001 | 4.1 (3.42 to 4.93) <0.001 | 0.09 (0.08 to 0.09) <0.001 |
| Anxiety | 0.64 (0.52 to 0.78) <0.001 | 1.83 (1.55 to 2.17) <0.001 | 2.88 (2.34 to 3.55) <0.001 | 0.13 (0.12 to 0.15) <0.001 |
| Depression | 0.15 (0.11 to 0.19) <0.001 | 1.5 (1.3 to 1.74) <0.001 | 10.28 (7.87 to 13.64) <0.001 | 0.03 (0.02 to 0.03) <0.001 |
| ED | ||||
| All cause | 1.11 (0.97 to 1.26) 0.12 | 1.56 (1.37 to 1.78) <0.001 | 1.41 (1.22 to 1.63) <0.001 | 0.4 (0.38 to 0.42) <0.001 |
| Mental health | 0.34 (0.29 to 0.4) <0.001 | 1.56 (1.36 to 1.78) <0.001 | 4.57 (3.87 to 5.42) <0.001 | 0.06 (0.06 to 0.07) <0.001 |
| Anxiety | 0.52 (0.43 to 0.62) <0.001 | 1.44 (1.24 to 1.67) <0.001 | 2.79 (2.32 to 3.36) <0.001 | 0.1 (0.09 to 0.11) <0.001 |
| Depression | 0.07 (0.05 to 0.1) <0.001 | 1.53 (1.33 to 1.75) <0.001 | 21.02 (15.71 to 28.76) <0.001 | 0.01 (0.01 to 0.01) <0.001 |
| EI hospital stay | ||||
| All cause | 0.65 (0.54 to 0.78) <0.001 | 1.11 (0.95 to 1.31) 0.19 | 1.72 (1.42 to 2.08) <0.001 | 0.6 (0.56 to 0.65) <0.001 |
| Mental health | 0.29 (0.22 to 0.37) <0.001 | 1.09 (0.91 to 1.31) 0.35 | 3.79 (2.89 to 5.03) <0.001 | 0.1 (0.09 to 0.11) <0.001 |
| Anxiety | 0.41 (0.3 to 0.55) <0.001 | 1.21 (0.97 to 1.52) 0.1 | 2.95 (2.17 to 4.08) <0.001 | 0.14 (0.12 to 0.16) <0.001 |
| Depression | 0.09 (0.06 to 0.14) <0.001 | 0.98 (0.81 to 1.2) 0.87 | 10.93 (7.03 to 17.99) <0.001 | 0.01 (0.01 to 0.02) <0.001 |
| IP hospital stay | ||||
| All cause | 1.17 (1.03 to 1.33) 0.02 | 1.02 (0.89 to 1.16) 0.81 | 0.87 (0.75 to 1) 0.06 | 1.16 (1.1 to 1.23) <0.001 |
| Mental health | 0.44 (0.35 to 0.54) <0.001 | 1.26 (1.06 to 1.49) 0.01 | 2.87 (2.3 to 3.6) <0.001 | 0.1 (0.09 to 0.11) <0.001 |
| Anxiety | 0.71 (0.54 to 0.92) 0.01 | 1.36 (1.09 to 1.71) 0.01 | 1.93 (1.48 to 2.54) <0.001 | 0.17 (0.15 to 0.19) <0.001 |
| Depression | 0.08 (0.05 to 0.11) <0.001 | 1.08 (0.91 to 1.28) 0.38 | 14.05 (9.39 to 22.04) <0.001 | 0.02 (0.01 to 0.02) <0.001 |
Mental health includes depression, anxiety disorder and severe mental illnesses.
AV, ambulatory visit; ED, emergency department; EHR, electronic health record; EI, emergency to inpatient ; IP, inpatient.
As detailed in online supplemental exhibit 4 , depression and anxiety disorders followed similar longitudinal trajectories before and after childbirth. The prevalence of comorbid depression and anxiety was highest during the postpartum period and decreased over time, both before and after the index delivery.
Discussion
Using an NLP-based approach, this study identified 29.6% more patients with PPD symptoms who did not have an ICD-based diagnosis recorded in the EHR, suggesting a sizeable number of patients remain underdiagnosed and undertreated. Patients with PPD were slightly older and disproportionately White compared with other racial/ethnic groups. They also exhibited markedly higher rates of comorbid psychiatric disorders and SUDs than patients without PPD. Within the PPD cohort, we identified three subgroups with distinct demographic and clinical profiles: (1) PPD-BOTH, (2) PPD-ICD and (3) PPD-NLP. Notably, comorbidities, antidepressant and psychotherapy use, and healthcare utilisation were highest in the PPD-BOTH subgroup, suggesting this group experiences greater symptom burden and disease severity than the other two subgroups.
To the best of our knowledge, this is the first study on developing an NLP method for detecting PPD from clinical notes in EHRs. The performance of the NLP method compares with results reported earlier for the detection of PPD using structured data in EHRs. 20 , 22 Although few studies have reported NLP and deep learning (DL) techniques to detect depression, including major depressive disorder (MDD), from clinical notes in EHRs, 23 24 existing research has not focused on identifying PPD from clinical encounter notes.
While an association between PPD and anxiety in women during pregnancy and after childbirth is well established, its prevalence varies widely depending on any given cohort and observation periods. In a meta-analysis including 66 studies incorporating 162 120 women from 30 countries, Fatah-Hassani et al estimated a prevalence of a clinical diagnosis of comorbid anxiety and depression of 1.7% antenatal and 4.2% for 1–24 weeks postnatal. 25 Although there are variations among the three subgroups of PPD, the present study also showed that an overall 1.8% of patients from the base cohort (n=60 426) had a comorbid PPD and anxiety disorder diagnosed during 1–12 months before delivery. Similarly, 4.8% of patients from the base cohort had a comorbid clinical diagnosis of PPD and anxiety during 0–24 months after delivery. Among the three PPD subgroups, anxiety disorder varies significantly, with the highest prevalence in the PPD-BOTH subgroup. The higher treatment and healthcare utilisation observed among patients with PPD when compared with patients without PPD is also supported by a previous report by Pollack et al 26 Additionally, the present study showed that there are significant variations in the treatment and healthcare utilisation between the three subgroups of patients with PPD.
Differences observed among PPD subgroups may also reflect potential variations in documentation practices or provider recognition, in addition to inherent clinical differences in phenotypes. ICD codes are often used for billing or administrative purposes, so their application can be inconsistent and may miss nuanced clinical details. Conversely, NLP models can extract mentions of PPD clinical attributes directly from narrative documentation, detecting cases that might not be formally coded. As a result, PPD-NLP could also represent instances where clinicians noted symptoms or diagnoses in free text, but did not assign a formal coded diagnosis. Similarly, PPD-ICD may also reflect situations where a diagnosis was entered for administrative reasons without detailed descriptive documentation in the narrative record. The PPD-BOTH, therefore, likely represents the intersection where both explicit coding and detailed narrative documentation occurred. Hence, the observed differences among these groups may also reflect how PPD cases are recognised and recorded in the medical record, rather than truly distinct presentations of the disease itself. This highlights the importance of understanding and addressing documentation and coding practices when interpreting subgroup analyses in health data research.
Strengths and limitations
This study reinforces prior evidence that relying solely on ICD diagnosis codes underestimates the true prevalence of PPD. By integrating NLP-derived data with ICD codes, we were able to identify distinct PPD subgroups with meaningful differences in demographic and clinical profiles. This combined approach offers a practical framework to enhance case detection, as well as more precise patient selection in prospective clinical trials and observational studies.
Several limitations should be noted. While our dictionary-based NLP method effectively detected PPD, the keyword library was limited and may not capture all ways depression and PPD are documented in clinical notes. Chart review reflected this challenge, with reviewers agreeing on PPD status only for 72% of cases. The chart review evaluation dataset was constructed using stratified sampling to ensure balanced representation across strata and therefore does not reflect the underlying population prevalence. Consequently, prevalence-dependent metrics such as PPV and NPV should be interpreted as conditional on the sampling design and may not directly generalise to real-world settings. Additionally, exclusion of non-consensus cases to ensure high-confidence labels may preferentially remove ambiguous examples and could yield modestly optimistic performance estimates. Also, we used depression and PPD somewhat interchangeably, as many women had pre-existing depression persisting into the postpartum period, which may have conflated with the strict DSM-5 definition of PPD. Furthermore, psychotherapy data reflect session orders rather than confirmed attendance, so actual utilisation may differ from what is recorded in the EHR. Future work will refine the NLP approach and expand to multi-site datasets to improve generalisability and accuracy.
This study is based on data from a single system, which limits the external validity and generalisability of the findings. While the results provide valuable insights, it is important to recognise that differences in patient characteristics, clinical settings and documentation practices may affect applicability to other institutions and broader patient populations.
Another limitation lies in the reliance on ICD codes as training labels. This approach may have introduced bias into the model’s learning patterns due to differences between the prevalence of PPD cases in the reference dataset and those observed in real-world settings. Additionally, the model’s behaviour may reflect patterns associated with diagnostic coding practices rather than solely the clinical presentation of PPD, as billing codes are often affected by documentation habits, reimbursement considerations and coder interpretation. Gold-standard labelling through chart review would provide more accurate and consistent annotations reflecting actual clinical diagnoses, but it is resource-intensive, requiring significant time and expert clinician effort.
Clinical implications
Previous studies have consistently shown that mental health conditions were insufficiently documented as structured diagnosis codes in the EHRs but more likely to be documented in patients’ notes. 27 For example, Gleeson et al found that relying on diagnostic codes in an EHR would have missed 92.4% (110/119) of the mental health diagnoses. 28 Similarly, only 40.9% (45/110) of patients were found to have a diagnosis code for PTSD. 29 Previously, we reported that among patients with PHQ-9 scores identified using NLP, 31% had at least one PHQ-9 score clinically indicative of MDD but lacked a structured ICD-9/10 diagnosis code for MDD. 30 In this study, from the 3874 patients with an ICD diagnosis code for PPD, our NLP method identified 1551 (40%) patients from clinical text. Among those without documented PPD, the NLP identified 1627 (29.6%) additional individuals with PPD based on evidence in their clinical notes. The observation that approximately 29.6% of patients are missing a diagnosis code for PPD further supports the need for new ways to coherently document and treat PPD. Patients often report PPD symptoms to their providers, but due to various factors, including stigma and bias, such symptoms are not being formally identified with an ICD code.
The added value of NLP lies in its ability to capture nuanced clinical information from unstructured text that ICD codes alone may miss. While performance was high when compared with ICD codes, the decrease against chart review suggests that ICD coding may already capture a subset of the signals NLP identifies. However, NLP provides incremental value by detecting context-rich details—such as severity, temporality and clinician reasoning—that are often not represented in structured data. This allows for more comprehensive case identification and deeper clinical insight, particularly in areas where coding practices vary or undercoding occurs.
Automated NLP methods, when combined with traditional ICD-based diagnoses, provide a powerful tool to identify patients with PPD who might otherwise remain undiagnosed and undertreated. Our findings show that these methods can distinguish high-risk subgroups, such as the PPD-BOTH cohort, in which 58.3% of patients had comorbid anxiety during the first 24 months postpartum, a condition strongly associated with functional impairment and reduced quality of life. By detecting these patients earlier, clinicians can deliver more timely and tailored interventions, potentially mitigating the long-term consequences of postpartum psychiatric disorders. Importantly, this approach not only improves case detection but also offers a scalable framework for enhancing postpartum mental healthcare, guiding resource allocation and informing future clinical trials and observational studies focused on high-risk populations.
Supplementary material
Footnotes
Funding: This research is funded in part by grants from the National Institutes of Health (R41 MH124581, R01 MH121922 and R01 MH119177).
Provenance and peer review: Not commissioned; externally peer reviewed.
Patient consent for publication: Not applicable.
Ethics approval: This study involves human participants. The study was approved and the need for individual informed consent was waived by the Weill Cornell Medicine Institutional Review Board (Protocol# 23-04025990). All methods were carried out in accordance with IRB and Health Insurance Portability and Accountability Act (HIPAA) guidelines. Weill Cornell Medicine Institutional Review Board exempted this study from obtaining informed consent from patients, as this is a retrospective observational study using data from Electronic Health Records and getting consent from all individuals involved was practically impossible.
Data availability free text: The data of this study are not publicly available due to privacy and ethical restrictions. Data to support the findings of this study are available upon reasonable request. Also, code for data collection and NLP model is available on request.
Data availability statement
Data are available upon reasonable request.
References
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
Data are available upon reasonable request.
Предметные рубрики MeSH
Подготовка и перевод публикации
Обработка статьи · этапы, ошибки и управление
Ошибки и ограничения
История · было → стало
Состояние обновляется каждые 5 секунд, пока блок открыт. Процент показывается только там, где известен объём работы. Пауза останавливает продолжение этапа; текущий запрос к источнику может завершиться.
Тип публикации указан по данным источника. Уровень доказательности автоматически не присваивается.