Large language models for extracting histopathologic diagnoses of colorectal cancer and dysplasia from electronic health records.

Brian Johnson, Tyler Bath, Xinyi Huang, Mark Lamm, Ashley Earles, Hyrum Eddington, Anna M Dornisch, Lily J Jih, Samir Gupta, Shailja C Shah, Kit Curtius
{"title":"Large language models for extracting histopathologic diagnoses of colorectal cancer and dysplasia from electronic health records.","authors":"Brian Johnson, Tyler Bath, Xinyi Huang, Mark Lamm, Ashley Earles, Hyrum Eddington, Anna M Dornisch, Lily J Jih, Samir Gupta, Shailja C Shah, Kit Curtius","doi":"10.1101/2024.11.27.24318083","DOIUrl":null,"url":null,"abstract":"<p><strong>Background: </strong>Accurate data resources are essential for impactful medical research, but available structured datasets are often incomplete or inaccurate. Recent advances in open-weight large language models (LLMs) enable more accurate data extraction from unstructured text in electronic health records (EHRs) but have not yet been thoroughly validated for challenging diagnoses such as inflammatory bowel disease (IBD)-related neoplasia.</p><p><strong>Objective: </strong>Create a validated approach using LLMs for identifying histopathologic diagnoses in pathology reports from the nationwide Veterans Health Administration database, including patients with genotype data within the Million Veteran Program (MVP) biobank.</p><p><strong>Design: </strong>Our approach utilizes simple 'yes/no' question prompts for following phenotypes of interest: any colorectal dysplasia, high-grade dysplasia and/or colorectal adenocarcinoma (HGD/CRC), and invasive CRC. We validated the method on diagnostic tasks by applying prompts to reports from patients with IBD (and validated separately in non-IBD) and calculated F-1 scores as a balanced accuracy measure.</p><p><strong>Results: </strong>In patients with IBD in MVP, we achieved F1-scores of 96.1% (95% CI 92.5-99.4%) for identifying dysplasia, 93.7% (88.2-98.4%) for identifying HGD/CRC, and 98% (96.3-99.4%) for identifying CRC. In patients without IBD in MVP, we achieved F1-scores of 99.2% (98.2-100%) for identifying any colorectal dysplasia, 96.5% (93.0-99.2%) for identifying HGD/CRC, and 95% (92.8-97.2%) for identifying CRC using LLM Gemma-2.</p><p><strong>Conclusion: </strong>LLMs provided excellent accuracy in extracting the diagnoses of interest from EHRs. Our validated methods generalized to unstructured pathology notes, even withstanding challenges of resource-limited computing environments. This may therefore be a promising approach for other clinical phenotypes given the minimal human-led development required.</p>","PeriodicalId":94281,"journal":{"name":"medRxiv : the preprint server for health sciences","volume":" ","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2025-04-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC12045448/pdf/","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"medRxiv : the preprint server for health sciences","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1101/2024.11.27.24318083","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Background: Accurate data resources are essential for impactful medical research, but available structured datasets are often incomplete or inaccurate. Recent advances in open-weight large language models (LLMs) enable more accurate data extraction from unstructured text in electronic health records (EHRs) but have not yet been thoroughly validated for challenging diagnoses such as inflammatory bowel disease (IBD)-related neoplasia.

Objective: Create a validated approach using LLMs for identifying histopathologic diagnoses in pathology reports from the nationwide Veterans Health Administration database, including patients with genotype data within the Million Veteran Program (MVP) biobank.

Design: Our approach utilizes simple 'yes/no' question prompts for following phenotypes of interest: any colorectal dysplasia, high-grade dysplasia and/or colorectal adenocarcinoma (HGD/CRC), and invasive CRC. We validated the method on diagnostic tasks by applying prompts to reports from patients with IBD (and validated separately in non-IBD) and calculated F-1 scores as a balanced accuracy measure.

Results: In patients with IBD in MVP, we achieved F1-scores of 96.1% (95% CI 92.5-99.4%) for identifying dysplasia, 93.7% (88.2-98.4%) for identifying HGD/CRC, and 98% (96.3-99.4%) for identifying CRC. In patients without IBD in MVP, we achieved F1-scores of 99.2% (98.2-100%) for identifying any colorectal dysplasia, 96.5% (93.0-99.2%) for identifying HGD/CRC, and 95% (92.8-97.2%) for identifying CRC using LLM Gemma-2.

Conclusion: LLMs provided excellent accuracy in extracting the diagnoses of interest from EHRs. Our validated methods generalized to unstructured pathology notes, even withstanding challenges of resource-limited computing environments. This may therefore be a promising approach for other clinical phenotypes given the minimal human-led development required.

从电子健康记录中提取结直肠癌和不典型增生的组织病理学诊断的大型语言模型。
背景:准确的数据资源对于有影响力的医学研究至关重要,但现有的结构化数据集往往不完整或不准确。开放重量大语言模型(llm)的最新进展能够从电子健康记录(EHRs)中的非结构化文本中更准确地提取数据,但尚未完全验证用于具有挑战性的诊断,如炎症性肠病(IBD)相关的肿瘤。目的:创建一种有效的方法,使用法学硕士来识别来自全国退伍军人健康管理局数据库的病理报告中的组织病理学诊断,包括百万退伍军人计划(MVP)生物银行中具有基因型数据的患者。设计:我们的方法对以下感兴趣的表型使用简单的“是/否”问题提示:任何结直肠异常增生、高级别异常增生和/或结直肠腺癌(HGD/CRC)和侵袭性结直肠癌。我们通过将提示应用于IBD患者的报告(并在非IBD患者中单独验证)来验证该方法在诊断任务中的有效性,并计算F-1分数作为平衡的准确性测量。结果:在MVP的IBD患者中,我们在识别非典型增生方面达到了96.1% (95% CI 92.5-99.4%),在识别HGD/CRC方面达到了93.7%(88.2-98.4%),在识别CRC方面达到了98%(96.3-99.4%)。在MVP无IBD的患者中,我们使用LLM Gemma-2识别结直肠癌的f1得分为99.2%(98.2-100%),识别HGD/CRC的f1得分为96.5%(93.0-99.2%),识别结直肠癌的f1得分为95%(92.8-97.2%)。结论:llm在从电子病历中提取感兴趣的诊断方面具有很高的准确性。我们的验证方法推广到非结构化的病理记录,即使面对资源有限的计算环境的挑战。因此,这可能是一个有希望的方法,为其他临床表型考虑到最小的人为主导的发展所需。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信