arXiv:2510.21027cs.AIcs.LG2025-10

用开源大模型统一提取不同医院药方数据,助力戒毒治疗研究

Customizing Open Source LLMs for Quantitative Medication Attribute Extraction across Heterogeneous EHR Systems

  • 定制开源大模型从异构电子病历中提取关键用药信息
  • 最高93.4%覆盖率与93.0%准确率,跨机构表现稳定
  • 支持本地部署,保护隐私,适合真实世界医疗研究

在异构电子健康记录(EHR)系统中,阿片类药物使用障碍(MOUD)的处方信息分散于不同格式字段和自由文本中,难以整合。本文提出一个实用框架,通过定制Llama、Qwen、Gemma和MedGemma等开源大语言模型,从各机构特有数据中统一提取包括处方日期、药物名称、疗程、总量、日剂量和复诊次数在内的关键属性,并计算标准化的“MOUD天数”指标。系统采用固定JSON模式处理,辅以轻量级归一化与跨字段一致性校验。在一项全国性OUD研究的五个诊所数据上评估,共包含25,605条记录(1,257名患者),以先前标注的10,369条记录(776名患者)为基准。结果表明:较大模型表现更优——Qwen2.5-32B达到93.4%覆盖率与93.0%精确匹配准确率,MedGemma-27B达93.1%/92.2%。简要错误分析揭示三类常见问题及修正方案:利用同药种剂量均值补全缺失项,根据给药周期设定月/周注射剂(如Vivitrol)疗程,增加单位检查防止误读(如“250 g”被误认为日剂量)。该方法避免了脆弱的机构定制数据转换流程,支持本地化、隐私保护部署,实现真实场景下对MOUD暴露、依从性和保留率的一致跨机构分析。

原文摘要 · Abstract (English)

Harmonizing medication data across Electronic Health Record (EHR) systems is a persistent barrier to monitoring medications for opioid use disorder (MOUD). In heterogeneous EHR systems, key prescription attributes are scattered across differently formatted fields and freetext notes. We present a practical framework that customizes open source large language models (LLMs), including Llama, Qwen, Gemma, and MedGemma, to extract a unified set of MOUD prescription attributes (prescription date, drug name, duration, total quantity, daily quantity, and refills) from heterogeneous, site specific data and compute a standardized metric of medication coverage, \emph{MOUD days}, per patient. Our pipeline processes records directly in a fixed JSON schema, followed by lightweight normalization and cross-field consistency checks. We evaluate the system on prescription level EHR data from five clinics in a national OUD study (25{,}605 records from 1{,}257 patients), using a previously annotated benchmark of 10{,}369 records (776 patients) as the ground truth. Performance is reported as coverage (share of records with a valid, matchable output) and record-level exact-match accuracy. Larger models perform best overall: Qwen2.5-32B achieves \textbf{93.4\%} coverage with \textbf{93.0\%} exact-match accuracy across clinics, and MedGemma-27B attains \textbf{93.1\%}/\textbf{92.2\%}. A brief error review highlights three common issues and fixes: imputing missing dosage fields using within-drug norms, handling monthly/weekly injectables (e.g., Vivitrol) by setting duration from the documented schedule, and adding unit checks to prevent mass units (e.g., ``250 g'') from being misread as daily counts. By removing brittle, site-specific ETL and supporting local, privacy-preserving deployment, this approach enables consistent cross-site analyses of MOUD exposure, adherence, and retention in real-world settings.

大模型应用医疗数据自然语言处理电子病历

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。