Electronic Health Record–Based Machine-Learning for Cardiac Arrhythmia Identification in Adults with High-Risk Chronic Disease: Model Development and Validation Study
Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
Cardiac arrhythmias may remain unrecognized in adults with chronic disease. Established risk scores primarily address atrial fibrillation.
Objective
To develop and internally evaluate an electronic health record (EHR)–based machine-learning model to identify patients more likely to receive a documented cardiac arrhythmia diagnosis.
Methods
We retrospectively evaluated EHR data (2018–2025) from one healthcare organization among adults with type 2 diabetes, chronic obstructive pulmonary disease, chronic kidney disease, or coronary artery disease. Logistic regression, random forest, and XGBoost were compared. XGBoost was selected using internal validation, reduced to 30 features using Shapley additive explanations, and evaluated in a holdout set with data ending one day before the index date. Sensitivity analyses excluded information recorded within 30, 90, or 180 days before the index date. An atrial fibrillation/flutter-specific analysis compared XGBoost with CHARGE-AF and HARMS 2 -AF.
Results
Among 30,356 patients, 6,835 (22.5%) had a qualifying arrhythmia diagnosis. In 3,051 holdout patients, XGBoost achieved an area under the receiver operating characteristic curve (AUROC) of 0.894 (95% CI 0.879–0.908) and an area under the precision-recall curve of 0.792 (95% CI 0.763–0.822). At a 0.5 threshold, sensitivity was 0.564, specificity 0.971, and precision 0.857. AUROC remained 0.896–0.897 across earlier cutoffs. In the common score-calculable atrial fibrillation/flutter subset ( n = 2,436), AUROCs were 0.883 for XGBoost, 0.712 for CHARGE-AF, and 0.554 for HARMS 2 -AF.
Conclusions
XGBoost demonstrated strong internal discrimination for documented arrhythmias. External validation and prospective evaluation are needed to assess generalizability and clinical utility.