Development and Validation of a Two-Stage NLP System Combining Rule-Based Extraction and LLM-Based Classification for Deprescribing Recommendations in Discharge Summaries.
Kenji Fujita, Marion Matheson, Bhavya Valecha, Sarah N Hilmer
Departments of Clinical Pharmacology and Aged Care, Kolling Institute, Faculty of Medicine and Health, The University of Sydney and the Northern Sydney Local Health District, St Leonards, NSW, Australia. kenji.fujita@sydney.edu.au. · Northern Beaches Hospital, Sydney, NSW, Australia.
Key points
From the paper's conclusion- A two-stage hybrid approach combining rule-based extraction and open-source LLM-based classification could identify deprescribing recommendations from discharge summaries, enabling cost-efficient, privacy-compliant local deployment.
Abstract
INTRODUCTION: Polypharmacy in older adults is associated with increased risks of adverse drug events and functional decline. Discharge summaries often contain deprescribing recommendations, but these are frequently overlooked due to documentation complexity. OBJECTIVE: The aim of this study was to develop and validate a two-stage hybrid natural language processing (NLP) system combining rule-based extraction and large language model (LLM)-based classification for automated identification of deprescribing recommendations from discharge summaries. METHODS: This retrospective cohort study included 850 discharge summaries from patients aged ≥ 65 years with hospitalisation for ≥ 48 h across six public hospitals in New South Wales, Australia. Model 1 (rule-based extraction) identified discharge medications and candidate sentences containing pre-defined deprescribing keywords. Model 2 (LLM-based classification) categorised candidate sentences into five categories, from which a binary outcome (deprescribing recommendation present versus absent) was derived using a pre-specified mapping. Data were split into training (80%) and test (20%) sets. Gold standard classifications were established by independent reviews, followed by adjudication of discrepancies. RESULTS: Model 1 extracted 9631 discharge medications (median 11 per patient) and 1061 candidate sentences from 850 patients (median age 82.8 years). Model 2 achieved an F1 score of 0.91 and accuracy of 0.90 for the binary outcome in the test set (144 medications). Inter-rater reliability showed substantial agreement (Cohen's kappa 0.70). The most frequently identified medications recommended for deprescribing were antibiotics and opioids. The most common misclassification was incorrectly identifying actions completed during hospitalisation as post-discharge recommendations. The combined processing time averaged 12.6 seconds per discharge summary. CONCLUSIONS: A two-stage hybrid approach combining rule-based extraction and open-source LLM-based classification could identify deprescribing recommendations from discharge summaries, enabling cost-efficient, privacy-compliant local deployment.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- RxReduce: a medication deprescribing agent framework leveraging large language models to optimize proton pump inhibitor use.JAMIA open · 2026
- Predicting Deprescribing of High-Risk Medications Using Provider EHR Use and Patient Characteristics.medRxiv : the preprint server for health sciences · 2026
- Development of an evidence-based guideline for deprescribing potentially inappropriate medications in older adults.BMC geriatrics · 2026
- Physicians Outperform Large Language Models in Pediatric Discharge Summary GenerationHospital Pediatrics · 2026
- Polypharmacy in Older Adults: A Narrative Review of Clinical Risks, Deprescribing Strategies, and Interdisciplinary Management.Geriatrics (Basel, Switzerland) · 2026
- Automating data extraction from discharge reports via multimodal LLMs in the REBOOT trialEuropean Heart Journal · 2026