Kenji Fujita, Marion Matheson, Bhavya Valecha, Sarah N Hilmer
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.
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.