From preconception risk to perinatal outcomes: machine learning prediction of depression and acute psychiatric care from electronic health records in the UK
Study type: Observational study: it can show a link, but not prove that one thing causes another.
Abstract
Background
Perinatal depression is common among women with pre-existing psychiatric disorders and may require acute psychiatric care yet tools for early risk stratification remain limited. Objective
To investigate whether routinely collected pre-conception electronic health record data can predict perinatal depressive episodes and the need for acute psychiatric admission or home treatment among women receiving secondary mental healthcare. Methods
This retrospective cohort included 20 793 pregnancies among 14 134 women with an active referral to secondary mental health services and deliveries between 2012 and 2020. Using the Biomedical Research Centre Case Register, we extracted preconception sociodemographic, lifestyle, reproductive, clinical, treatment-related, psychiatric and medical comorbidity variables. Pregnancy-related and birth-related predictors were additionally included for postnatal outcomes. Elastic net-penalised logistic regression models were developed to predict depressive episodes and acute psychiatric admission or home treatment during the overall perinatal, antenatal and postnatal periods. Findings
Approximately 16% of pregnancies were associated with a perinatal depressive episode, of which approximately 19% involved acute psychiatric admission or home treatment. Models predicting depressive episodes achieved moderate discrimination across perinatal periods (area under the receiver operating characteristic curve (AUC) 0.67–0.68; sensitivity 61%–63%; specificity 72%–75%). Key predictors included greater preconception depressive and positive symptom severity, previous antidepressant, antipsychotic and mood stabiliser use, primiparity and greater socioeconomic deprivation. Smoking during pregnancy was additionally associated with postnatal depression. Models predicting acute psychiatric admission or home treatment were significant for the overall perinatal and postnatal periods but showed lower discrimination (AUC 0.63; sensitivity 42%; specificity 84%–85%). Key predictors included previous antipsychotic and hypnotic use and Black ethnicity. Conclusions
Routinely collected preconception electronic health record data can provide moderate discrimination of subsequent perinatal depression risk, whereas prediction of acute psychiatric deterioration remains limited. Clinical implications
Preconception clinical information may support early identification of women at increased risk of perinatal depression and inform targeted monitoring and preventive care. Prediction of acute psychiatric care needs is likely to require additional longitudinal and pregnancy-specific clinical information.
Cite this article
Vai B, Calesella F, Mueller C, et al. From preconception risk to perinatal outcomes: machine learning prediction of depression and acute psychiatric care from electronic health records in the UK. BMJ Ment Health. 2026;29(1). doi:10.1136/bmjment-2026-302945
Spotted a mistake? Suggest a correction