Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Apr 2;6(4):783-796.
doi: 10.1093/ehjdh/ztaf030. eCollection 2025 Jul.

Automated transformation of unstructured cardiovascular diagnostic reports into structured datasets using sequentially deployed large language models

Affiliations

Automated transformation of unstructured cardiovascular diagnostic reports into structured datasets using sequentially deployed large language models

Sumukh Vasisht Shankar et al. Eur Heart J Digit Health. .

Abstract

Aims: Rich data in cardiovascular diagnostic testing are often sequestered in unstructured reports, limiting their use.

Methods and results: We sequentially deployed generative and interpretative open-source large language models (LLMs; Llama2-70b, Llama2-13b). Using Llama2-70b, we generated varying formats of transthoracic echocardiogram (TTE) reports from 3000 real-world reports with paired structured elements. Using prompt-based supervised training, we fine-tuned Llama2-13b using sequentially larger batches of generated TTE reports as inputs, to extract data across 18 clinically-relevant echocardiographic fields. We evaluated the fine-tuned model, HeartDX-LM, on distinct datasets: (i) different time periods and formats at Yale New Haven Health System (YNHHS), (ii) Medical Information Mart for Intensive Care (MIMIC) III, and (iii) MIMIC IV. We used accuracy and Cohen's kappa as evaluation metrics and have publicly released the HeartDX-LM model. HeartDX-LM was trained on 2000 synthetic reports with varying formats and paired structured labels. We identified a lower threshold of 500 unstructured reports-structured data pairs required for fine-tuning to achieve consistent performance. At YNHHS, HeartDX-LM accurately extracted 69 144 of 70 032 values (98.7%) across 18 fields in the contemporary test set where paired structured data were available. In 100 older YNHHS reports, HeartDX-LM achieved 87.1% accuracy against expert annotations. In external validation sets from MIMIC-III and MIMIC-IV, HeartDX-LM correctly extracted 615 of 707 available values (87.9%) and 201 of 220 available values (91.3%), from 100 random, expert-annotated reports from each set.

Conclusion: We developed and validated a novel approach using paired large and moderate-sized LLMs to transform free-text echocardiographic reports into tabular datasets.

Keywords: Echocardiograph; Large language models; Machine learning; Natural language processing.

PubMed Disclaimer

Conflict of interest statement

Conflict of interest: R.K. is an Associate Editor of JAMA and is a co-founder of Ensight-AI. R.K. receives support from the National Heart, Lung, and Blood Institute of the National Institutes of Health (under awards R01HL167858 and K23HL153775) and the Doris Duke Charitable Foundation (under award 2022060). He receives support from the Blavatnik Foundation through the Blavatnik Fund for Innovation at Yale. He also receives research support, through Yale, from Bristol-Myers Squibb, BridgeBio, and Novo Nordisk. In addition to 63/346,610, R.K. is a co-inventor of U.S. Pending Patent Applications WO2023230345A1, US20220336048A1, 63/484,426, 63/508,315, 63/580,137, 63/619,241, 63/346,610, 63/562,335, and 18/813,882. R.K., E.K.O., and S.V.S. are co-inventors of the US patent application 63/606,203. R.K. and E.K.O. are co-founders of Evidence2Health, a precision health platform to improve evidence-based cardiovascular care. E.K.O. receives support from the National Heart, Lung, and Blood Institute of the National Institutes of Health (under award F32HL170592). He is a co-inventor of the U.S. Patent Applications 18/813,882, 17/720,068, 63/619,241, 63/177,117, 63/580,137, 63/606,203, 63/562,335, US11948230B2, and US20210374951A1. He has been a consultant for Caristo Diagnostics Ltd and Ensight-AI Inc., and has received royalty fees from technology licensed through the University of Oxford. S.V.S. works as a data scientist at Evidence2Health (outside the current work). G.N.N. is a founder of Renalytix, Pensieve, and Verici and provides consultancy services to AstraZeneca, Reata, Renalytix, and Pensieve. He also has equity in Renalytix, Pensieve, and Verici.

Figures

Graphical Abstract
Graphical Abstract
Figure 1
Figure 1
Model development approach and study design. YNHHS, Yale New Haven Health System; MIMIC, Medical Information Mart for Intensive Care.
Figure 2
Figure 2
Accuracy of HeartDX-LM for label extraction across the four datasets. AVA Cont VTI, aortic valve area calculated by velocity time integral; AVA Index, aortic valve area index; AV Mn Grad, aortic valve mean gradient; AIPHT, aortic insufficiency pressure half-time; AV Pk Vel, aortic valve peak velocity; AV Regurgitation, aortic valve regurgitation; AV Stenosis, aortic valve stenosis; AV Structure, aortic valve structure; GLS, global longitudinal strain; IVSd, interventricular septum thickness; LV Diastolic Function, left ventricular diastolic function; LVOT Pk Grad, left ventricular outflow tract peak gradient; LVOT Pk Vel, left ventricular outflow tract peak velocity; LV Wall Thickness, left ventricular wall thickness; MV Regurgitation, mitral valve regurgitation; MV Stenosis, mitral valve stenosis; MV Structure, mitral valve structure.
Figure 3
Figure 3
Performance of models fine-tuned with varying number of paired unstructured reports and structured tables for tabulation of clinical variables from unstructured reports. AVA Cont VTI, aortic valve area calculated by velocity time integral; AVA Index, aortic valve area index; AV Mn Grad, aortic valve mean gradient; AIPHT, aortic insufficiency pressure half-time; AV Pk Vel, aortic valve peak velocity; AV Regurgitation, aortic valve regurgitation; AV Stenosis, aortic valve stenosis; AV Structure, aortic valve structure; GLS, global longitudinal strain; IVSd, interventricular septum thickness; LV Diastolic Function, left ventricular diastolic function; LVOT Pk Grad, left ventricular outflow tract peak gradient; LVOT Pk Vel, left ventricular outflow tract peak velocity; LV Wall Thickness, left ventricular wall thickness; MV Regurgitation, mitral valve regurgitation; MV Stenosis, mitral valve stenosis; MV Structure, mitral valve structure.

Update of

Similar articles

References

    1. Sangha V, Nargesi AA, Dhingra LS, Khunte A, Mortazavi BJ, Ribeiro AH, et al. Detection of left ventricular systolic dysfunction from electrocardiographic images. Circulation 2023;148:765–777. - PMC - PubMed
    1. Khunte A, Sangha V, Oikonomou EK, Dhingra LS, Aminorroaya A, Mortazavi BJ, et al. Detection of left ventricular systolic dysfunction from single-lead electrocardiography adapted for portable and wearable devices. NPJ Digit Med 2023;6:124. - PMC - PubMed
    1. Dhingra LS, Shen M, Mangla A, Khera R. Cardiovascular care innovation through data-driven discoveries in the electronic health record. Am J Cardiol 2023;203:136–148. - PMC - PubMed
    1. Consultant HIT. Why Unstructured Data Holds the Key to Intelligent Healthcare Systems. Atlanta (GA): HIT Consultant; 2015.
    1. Hashir M, Sawhney R. Towards unstructured mortality prediction with free-text clinical notes. J Biomed Inform 2020;108:103489. - PubMed

LinkOut - more resources