Using AI and Data from the Medical Record to Identify Individuals at Risk for Postpartum Depression

June 27, 2025
Ruta Nonacs, MD PhD
Machine learning can be used to construct a model using data collected from the EHR and that such a model can be used to predict risk for postpartum depression.

In the United States, a pregnant individual will attend approximately 15 prenatal visits with a medical provider for the monitoring of an uncomplicated pregnancy. During these visits, a vast amount of demographic and clinical information is collected and entered into the electronic health record (EHR). Much of the information is related to monitoring the pregnancy, such as measurements of weight and blood pressure; however, there is information in the medical record that could be used to predict risk for perinatal depression. 

In a collaborative project with the Mass General Department of Obstetrics and Gynecology,  Roy Perlis, MD, MSc and colleagues from the Center for Quantitative Health examined whether information included in the medical record at the time of discharge after delivery could help us to identify individuals at increased risk for postpartum depression.

Study Design

For this analysis, the research team conducted a retrospective cohort study of all individuals who delivered babies between 2017 and 2022 at  two large academic medical centers and six community hospitals in the Boston area. 

The analysis excluded individuals considered to be at high risk for PPD based on their clinical history and/or individuals who were already receiving mental health care: patients with a diagnostic code reflecting a current mood or psychotic disorder and those who had received an antidepressant prescription in the 12 months preceding delivery.

Using the EHR, the researchers identified women with postpartum depression within the first six months after delivery, where PPD was defined as (1) a diagnosis of a mood disorder,  (2) an antidepressant prescription, or (3) a positive screen (13 or higher) on the Edinburgh Postnatal Depression Scale administered after delivery. 

Predictors used in the modeling included sociodemographic factors, medical history, and prenatal depression screening information, all of which were documented in the EHR before discharge from the delivery hospitalization.

Results

For the analysis, The cohort included a total of 29,168 individuals; 2,696 (9.2%) met at least one of the criteria for postpartum depression during the six months following delivery.  The model was trained and optimized using a sample of 15,018 patients.  When the researchers tested their risk model on a second group of 14,150  patients (external validation), the model performed well:

    • Discrimination (AUC 0.721): The model could reasonably distinguish between patients who would and would not develop postpartum depression. (An area under the curve or AUC of 0.721 indicates that the model is much better than chance.)
    • Calibration (Brier score 0.087): The model’s predicted risks matched the observed outcomes closely, meaning its predictions were reliable.
    • Positive Predictive Value (PPV, 28.8%): Among those the model identified as high risk, about 29% actually developed postpartum depression.
    • Negative Predictive Value (NPV, 92.2%): Among those the model identified as low risk, about 92% did not develop postpartum depression.

Can We Use the Electronic Medical Record to Predict Risk for PPD?

The current study indicates that machine learning can be used to construct a model using data collected from the EHR and that such a model can be used to predict risk for postpartum depression within the first six months after childbirth. While not every patient identified as high risk using this model will not go on to develop postpartum depression, the tool is very good at identifying those who are unlikely to develop PPD, which can conserve valuable resources by targeting and following those at highest risk.  

Ideally we would like to be able to identify women at risk for postpartum depression before it occurs. This would not only allow us to increase monitoring when needed and to treat early if PPD emerges, but it may also provide an opportunity to initiate preventative interventions. Currently our strongest predictors of risk include a history of depression prior to pregnancy and depressive symptoms during pregnancy. These models build on these robust risk factors, and include other risk factors (i.e., age, BMI) to improve our ability to predict and quantify risk. 

Other researchers contributing to this project include Mark A. Clapp, MD MPH, Victor M. Castro, MS, Pilar Verhaak, BS, Thomas H. McCoy, MD, Lydia L. Shook, MD,
and Andrea G. Edlow, MD MSc.

Read More

Clapp MA, Castro VM, Verhaak P, McCoy TH, Shook LL, Edlow AG, Perlis RH. Stratifying Risk for Postpartum Depression at Time of Hospital Discharge. Am J Psychiatry. 2025 Jun 1; 182(6):551-559. 

In the News

Share this with your network: