Automated Transformation of Unstructured Cardiovascular Diagnostic Reports into Structured Datasets Using Sequentially Deployed Large Language Models
Preprint
Abstract
Background Rich data in cardiovascular diagnostic testing are often sequestered in unstructured reports, with the necessity of manual abstraction limiting their use in real-time applications in patient care and research. Methods We developed a two-step process that sequentially deploys generative and interpretative large language models (LLMs; Llama2 70b and Llama2 13b). Using a Llama2 70b model, we generated varying formats of transthoracic echocardiogram (TTE) reports from 3,000 real-world echo reports with paired structured elements, leveraging temporal changes in reporting formats to define the variations. Subsequently, we fine-tuned Llama2 13b using sequentially larger batches of generated echo reports as inputs, to extract data from free-text narratives across 18 clinically relevant echocardiographic fields. This was set up as a prompt-based supervised training task. We evaluated the fine-tuned Llama2 13b model, HeartDx-LM, on several distinct echocardiographic datasets: (i) reports across the different time periods and formats at Yale New Haven Health System (YNHHS), (ii) the Medical Information Mart for Intensive Care (MIMIC) III dataset, and (iii) the MIMIC IV dataset. We used the accuracy of extracted fields and Cohen’s Kappa as the metrics and have publicly released the HeartDX-LM model. Results The HeartDX-LM model was trained on randomly selected 2,000 synthetic echo reports with varying formats and paired structured labels, with a wide range of clinical findings. We identified a lower threshold of 500 annotated reports required for fine-tuning Llama2 13b to achieve stable and consistent performance. At YNHHS, the HeartDx-LM model accurately extracted 69,144 out of 70,032 values (98.7%) across 18 clinical fields from unstructured reports in the test set from contemporary records where paired structured data were also available. In older echo reports where only unstructured reports were available, the model achieved 87.1% accuracy against expert annotations for the same 18 fields for a random sample of 100 reports. Similarly, in expert-annotated external validation sets from MIMIC-IV and MIMIC-III, HeartDx-LM correctly extracted 201 out of 220 available values (91.3%) and 615 out of 707 available values (87.9%), respectively, from 100 randomly chosen and expert annotated echo reports from each set. Conclusion We developed a novel method using paired large and moderate-sized LLMs to automate the extraction of unstructured echocardiographic reports into tabular datasets. Our approach represents a scalable strategy that transforms unstructured reports into computable elements that can be leveraged to improve cardiovascular care quality and enable research.Keywords
All Related Versions
- Published version: European Heart Journal - Digital Health, 6 (4), 783.
This publication has 25 references indexed in Scilit:
- A Multimodal Video-Based AI Biomarker for Aortic Stenosis Development and ProgressionJAMA Cardiology, 2024
- CROSS-MODAL VALIDATION OF AN ARTIFICIAL INTELLIGENCE VIDEO-BASED APPROACH FOR THE AUTOMATED RISK STRATIFICATION OF AORTIC STENOSISJACC, 2024
- Creation and Adoption of Large Language Models in MedicineJAMA, 2023
- Cardiovascular Care Innovation through Data-Driven Discoveries in the Electronic Health RecordThe American Journal of Cardiology, 2023
- Author Correction: MIMIC-IV, a freely accessible electronic health record datasetScientific Data, 2023
- Towards unstructured mortality prediction with free-text clinical notesJournal of Biomedical Informatics, 2020
- Information extraction from Italian medical reports: An ontology-driven approachInternational Journal of Medical Informatics, 2018
- Clinical information extraction applications: A literature reviewJournal of Biomedical Informatics, 2018
- Natural language processing systems for capturing and standardizing unstructured clinical information: A systematic reviewJournal of Biomedical Informatics, 2017
- Rule-based information extraction from patients’ clinical dataJournal of Biomedical Informatics, 2009