Hybrid rule-based and on-premises LLM pipeline for extracting CMR and CPET metrics from free-text reports in repaired tetralogy of Fallot
AKBASLI, I. T.; Beck, K. L.; Liou, W.; Du, S.; Nemer, G.; Baloglu, O.; Latifi, S. Q.; Marino, B. S.; Albahra, S.; Tandon, A.
Show abstract
BackgroundPatients with repaired tetralogy of Fallot (rTOF) require lifelong surveillance with cardiovascular magnetic resonance (CMR) and cardiopulmonary exercise testing (CPET). However, results are frequently stored as unstructured free-text reports, hindering large-scale analysis and research. ObjectivesThis study aimed to develop and evaluate a privacy-preserving hybrid natural language processing pipeline combining regular expressions (regex) and an on-premises large language model (LLM) to accurately extract key CMR and CPET metrics from legacy free-text reports in patients with rTOF. MethodsWe retrospectively analyzed 430 CMR and 262 CPET reports (2005-2023) from patients with rTOF. A two-stage hybrid pipeline was implemented: regex rules were applied first, followed by targeted prompting of an on-premises Llama-3.1-8B-Instruct LLM only when regex failed or returned ambiguous results. Performance was compared against regex-only and LLM-only approaches using coverage, precision, recall, and F1-score. ResultsIn CMR reports, the hybrid pipeline achieved perfect coverage (1.00) and F1-score (1.00) versus 0.98 coverage and 0.93 F1-score with regex alone, while reducing computational cost by ~75% compared with LLM-only. In CPET reports, the hybrid approach improved F1-score from 0.74 (regex alone) to 0.98, with particularly large gains for semantically complex variables (e.g., peak VO {square}, test termination reason). ConclusionsA hybrid regex-on-premises LLM pipeline provides near-perfect, efficient, and HIPAA-compliant extraction of clinical metrics from unstructured cardiology reports, offering a scalable solution for retrospective research and quality improvement in congenital heart disease.
Matching journals
The top 6 journals account for 50% of the predicted probability mass.
Similar papers in this journal
Similar papers in this journal
Similar papers in this journal
- A Comparative Analysis of Privacy-Preserving Large Language Models For Automated Echocardiography Report Analysis 96%
- Biometric Contrastive Learning for Data-Efficient Deep Learning from Electrocardiographic Images 94%
- Analysis of Eligibility Criteria Clusters Based on Large Language Models for Clinical Trial Design 94%
Similar papers in this journal
- SPELL-LLMs: A Scalable and Privacy-Compliant NLP Pipeline Using Locally Hosted Large Language Models for Clinical Information Extraction 95%
- A standardized analytics pipeline for reliable and rapid development and validation of prediction models using observational health data 91%
- BRAVEHEART: Open-source software for automated electrocardiographic and vectorcardiographic analysis 91%
Similar papers in this journal
- Building Large-Scale Registries from Unstructured Clinical Notes using a Low-Resource Natural Language Processing Pipeline 92%
- Enriching Representation Learning Using 53 Million Patient Notes through Human Phenotype Ontology Embedding 91%
- Electrocardiogram Analysis of Post-Stroke Elderly People Using One-dimensional Convolutional Neural Network Model with Gradient-weighted Class Activation Mapping 91%
"Similar papers" are the closest papers from that journal in the model's embedding space. They show what the match is built on, but the ranking comes mostly from a classifier over the whole training set, not from these examples alone.