Beyond billing codes: a proof-of-concept study of large language models for pregnancy episode reconstruction from clinical notes
A.-K. Schalkamp, S. Azzam, A. Ayati, A. Belov, M. Wang, V. A. Rudrapatna
Key points
From the paper's conclusion- LLM-based extraction from clinical notes is a promising complement to code-based pregnancy phenotyping that warrants evaluation in larger, multi-institutional cohorts.
Abstract
Background: Accurate identification of pregnancy episodes from electronic health records (EHRs) is essential for maternal and fetal health research. Existing approaches rely primarily on diagnosis and procedure codes, which may miss pregnancies documented outside the health system and are susceptible to coding errors. Clinical notes contain richer information but remain largely unexplored for this task. Objectives: To evaluate whether a large language model (LLM) can reconstruct complete pregnancy episodes directly from clinical notes. Methods: Chronologically concatenated notes and messages were provided to GPT-5, which identified episodes and extracted variables including assisted reproductive treatment, gestational age, outcome, and complications. Performance was benchmarked against manual chart review (gold standard) and a hierarchical ICD-code algorithm in 30 patients comprising 74 pregnancies (20 patients in a held-out test set). Results: The LLM identified 53 of 54 test-set pregnancies versus 40/54 for a hierarchical ICD-code algorithm, with fewer spurious episodes (3 vs 24), corresponding to an F1 score for pregnancy detection against chart review of 0.96 vs 0.68. Among pregnancies identified by both methods, median absolute error was 0 vs 25.5 days for start dates (p<0.001) and 0 vs 1 day for end dates (p=0.044), and outcome accuracy was numerically but not significantly higher (0.84 vs 0.74 for exact outcome types; 0.92 vs 0.84 with abortion subtypes grouped). It additionally recovered information unavailable in structured data, including reproductive-treatment type and fetus-level outcomes. Conclusions: An LLM applied to clinical narratives identified pregnancy episodes more completely and with more accurate dates than an ICD-code algorithm while capturing richer clinical detail. Because the two approaches used different input data, these gains reflect both the information in clinical notes and the LLM itself. LLM-based extraction from clinical notes is a promising complement to code-based pregnancy phenotyping that warrants evaluation in larger, multi-institutional cohorts.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Nonstress Test Classification by Obstetric Clinicians and Large Language Models: A Comparative StudyInternational Journal of Clinical Practice · 2026
- Evaluation of AI language models in answering pregnancy-related questions assessed by obstetrics specialistsScientific Reports · 2026
- Understanding of Preeclampsia Risk Factors in Large Language Models Compared with a Validated Competing-Risks Model.Diagnostics (Basel, Switzerland) · 2026
- A Multi-Agent Large Language Model Reasoning Engine for Early Detection of Pediatric Growth DisordersmedRxiv · 2026
- Privacy-preserving, low-annotation pregnancy status classification from obstetric ultrasound reports using on-premises small language modelsScientific Reports · 2026
- Multidimensional evaluation of large language models for patient education on asthma during pregnancy: a cross-sectional comparative study.Frontiers in digital health · 2026