13
0

Scalable Medication Extraction and Discontinuation Identification from Electronic Health Records Using Large Language Models

Main:35 Pages
7 Figures
4 Tables
Abstract

Identifying medication discontinuations in electronic health records (EHRs) is vital for patient safety but is often hindered by information being buried in unstructured notes. This study aims to evaluate the capabilities of advanced open-sourced and proprietary large language models (LLMs) in extracting medications and classifying their medication status from EHR notes, focusing on their scalability on medication information extraction without human annotation. We collected three EHR datasets from diverse sources to build the evaluation benchmark. We evaluated 12 advanced LLMs and explored multiple LLM prompting strategies. Performance on medication extraction, medication status classification, and their joint task (extraction then classification) was systematically compared across all experiments. We found that LLMs showed promising performance on the medication extraction and discontinuation classification from EHR notes. GPT-4o consistently achieved the highest average F1 scores in all tasks under zero-shot setting - 94.0% for medication extraction, 78.1% for discontinuation classification, and 72.7% for the joint task. Open-sourced models followed closely, Llama-3.1-70B-Instruct achieved the highest performance in medication status classification on the MIV-Med dataset (68.7%) and in the joint task on both the Re-CASI (76.2%) and MIV-Med (60.2%) datasets. Medical-specific LLMs demonstrated lower performance compared to advanced general-domain LLMs. Few-shot learning generally improved performance, while CoT reasoning showed inconsistent gains. LLMs demonstrate strong potential for medication extraction and discontinuation identification on EHR notes, with open-sourced models offering scalable alternatives to proprietary systems and few-shot can further improve LLMs' capability.

View on arXiv
@article{shao2025_2506.11137,
  title={ Scalable Medication Extraction and Discontinuation Identification from Electronic Health Records Using Large Language Models },
  author={ Chong Shao and Douglas Snyder and Chiran Li and Bowen Gu and Kerry Ngan and Chun-Ting Yang and Jiageng Wu and Richard Wyss and Kueiyu Joshua Lin and Jie Yang },
  journal={arXiv preprint arXiv:2506.11137},
  year={ 2025 }
}
Comments on this paper