Development and Validation of a Two-Stage NLP-LLM System for Automated Extraction of Deprescribing Recommendations from Discharge Summaries
Fujita, K.; Matheson, M.; Valecha, B.; Hilmer, S. N.
Show abstract
IntroductionPolypharmacy 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. ObjectiveTo develop and validate a two-stage hybrid system combining rule-based natural language processing (NLP) and large language model (LLM) for automated extraction of deprescribing recommendations from discharge summaries. MethodsThis retrospective cohort study included 850 discharge summaries from patients aged [≥]65 years with hospitalisation [≥]48 hours across six public hospitals in New South Wales, Australia. Model 1 (rule-based NLP) extracted discharge medications and candidate sentences containing pre-defined deprescribing keywords. Model 2 (open-source LLM) classified candidate sentences into five categories. Data were split into training (80%) and test (20%) sets. Gold standard classifications were established by independent reviews, followed by adjudication of discrepancies. ResultsModel 1 extracted 9,631 discharge medications (median 11 per patient) and 1,061 candidate sentences from 850 patients (median age 82.8 years). Model 2 achieved an F1 score of 0.91 and accuracy of 0.90 on the test set. Inter-rater reliability showed substantial agreement (Cohens 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. ConclusionsA two-stage hybrid approach combining rule-based NLP and open-source LLM can accurately extract deprescribing recommendations from discharge summaries, enabling cost-efficient, privacy-compliant local deployment. Key Points- A two-stage system combining rule-based NLP and open-source LLM extracted and classified deprescribing recommendations from 850 discharge summaries, achieving an F1 score of 0.91 and accuracy of 0.90. - The use of an open-source LLM (Llama 3.3) enables cost-efficient, privacy-compliant local deployment in healthcare institutions. - Antibiotics and opioids were the most frequently identified medications recommended for deprescribing in discharge summaries.
Matching journals
The top 7 journals account for 50% of the predicted probability mass.
Similar papers in this journal
- A method for rapid machine learning development for data mining with Doctor-In-The-Loop 93%
- Hospital at home: a systematic review of how medication management is conceptualised, described and implemented in practice – a study protocol 93%
- Development of the AD F ICE_IT clinical decision support system to assist deprescribing of fall-risk increasing drugs: A user-centered design approach 93%
Similar papers in this journal
- Identification of predictive patient characteristics for assessing the probability of COVID-19 in-hospital mortality 92%
- Accuracy of preferred language data in a multi-hospital electronic health record in Toronto, Canada 92%
- Hospital-wide Natural Language Processing summarising the health data of 1 million patients 91%
Similar papers in this journal
Similar papers in this journal
- Towards Clinical Prediction with Transparency: An Explainable AI Approach to Survival Modelling in Residential Aged Care 92%
- A standardized analytics pipeline for reliable and rapid development and validation of prediction models using observational health data 92%
- SPELL-LLMs: A Scalable and Privacy-Compliant NLP Pipeline Using Locally Hosted Large Language Models for Clinical Information Extraction 90%
Similar papers in this journal
- Determining prescriptions in electronic health care (EHR) data: methods for development of standardised, reproducible drug codelists 95%
- Enhancing Research Data Infrastructure to Address the Opioid Epidemic: The Opioid Overdose Network (02-Net) 95%
- Development and Evaluation of Machine Learning Models for the Detection of Emergency Department Patients with Opioid Misuse from Clinical Notes 94%
"Similar papers" are the closest papers from that journal in the model's embedding space. They show what the match is built on, but the ranking comes mostly from a classifier over the whole training set, not from these examples alone.