# Identification of Patients With Congestive Heart Failure From the Electronic Health Records of Two Hospitals: Retrospective Study

**Authors:** Daniel Sumsion, Elijah Davis, Marta Fernandes, Ruoqi Wei, Rebecca Milde, Jet Malou Veltink, Wan-Yee Kong, Yiwen Xiong, Samvrit Rao, Tara Westover, Lydia Petersen, Niels Turley, Arjun Singh, Stephanie Buss, Shibani Mukerji, Sahar Zafar, Sudeshna Das, Valdery Moura Junior, Manohar Ghanta, Aditya Gupta, Jennifer Kim, Katie Stone, Emmanuel Mignot, Dennis Hwang, Lynn Marie Trotti, Gari D Clifford, Umakanth Katwa, Robert Thomas, M Brandon Westover, Haoqi Sun

PMC · DOI: 10.2196/64113 · JMIR Medical Informatics · 2025-04-10

## TL;DR

This study developed a model to accurately identify patients with congestive heart failure using electronic health records from two hospitals, achieving high accuracy and generalization.

## Contribution

The novel contribution is a validated, cross-institutional model for CHF diagnosis using EHR data and machine learning.

## Key findings

- A logistic regression model combining ICD codes, medications, and NLP-extracted notes achieved an AUROC of 0.968 and AUPRC of 0.921.
- The model showed high external validity across two hospitals with AUROC values of 0.927 and 0.968.
- The estimated overall error rate in a random EHR sample was 1.6%.

## Abstract

Congestive heart failure (CHF) is a common cause of hospital admissions. Medical records contain valuable information about CHF, but manual chart review is time-consuming. Claims databases (using International Classification of Diseases [ICD] codes) provide a scalable alternative but are less accurate. Automated analysis of medical records through natural language processing (NLP) enables more efficient adjudication but has not yet been validated across multiple sites.

We seek to accurately classify the diagnosis of CHF based on structured and unstructured data from each patient, including medications, ICD codes, and information extracted through NLP of notes left by providers, by comparing the effectiveness of several machine learning models.

We developed an NLP model to identify CHF from medical records using electronic health records (EHRs) from two hospitals (Mass General Hospital and Beth Israel Deaconess Medical Center; from 2010 to 2023), with 2800 clinical visit notes from 1821 patients. We trained and compared the performance of logistic regression, random forests, and RoBERTa models. We measured model performance using area under the receiver operating characteristic curve (AUROC) and area under the precision-recall curve (AUPRC). These models were also externally validated by training the data on one hospital sample and testing on the other, and an overall estimated error was calculated using a completely random sample from both hospitals.

The average age of the patients was 66.7 (SD 17.2) years; 978 (54.3%) out of 1821 patients were female. The logistic regression model achieved the best performance using a combination of ICD codes, medications, and notes, with an AUROC of 0.968 (95% CI 0.940-0.982) and an AUPRC of 0.921 (95% CI 0.835-0.969). The models that only used ICD codes or medications had lower performance. The estimated overall error rate in a random EHR sample was 1.6%. The model also showed high external validity from training on Mass General Hospital data and testing on Beth Israel Deaconess Medical Center data (AUROC 0.927, 95% CI 0.908-0.944) and vice versa (AUROC 0.968, 95% CI 0.957-0.976).

The proposed EHR-based phenotyping model for CHF achieved excellent performance, external validity, and generalization across two institutions. The model enables multiple downstream uses, paving the way for large-scale studies of CHF treatment effectiveness, comorbidities, outcomes, and mechanisms.

## Linked entities

- **Diseases:** congestive heart failure (MONDO:0005009), Congestive heart failure (MONDO:0005009)

## Full-text entities

- **Diseases:** CHF (MESH:D006333)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12022513/full.md

## Figures

3 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12022513/full.md

## References

20 references — full list in the complete paper: https://tomesphere.com/paper/PMC12022513/full.md

---
Source: https://tomesphere.com/paper/PMC12022513