Background and purpose: Oral anticoagulation is generally indicated for cardioembolic strokes, but not for other stroke causes. Consequently, subtype classification of ischemic stroke is important for risk stratification and secondary prevention. Because manual classification of ischemic stroke is time-intensive, we assessed the accuracy of automated algorithms for performing cardioembolic stroke subtyping using an electronic health record (EHR) database.
Methods: We adapted TOAST (Trial of ORG 10172 in Acute Stroke Treatment) features associated with cardioembolic stroke for derivation in the EHR. Using administrative codes and echocardiographic reports within Mass General Brigham Biobank (N=13 079), we iteratively developed EHR-based algorithms to define the TOAST cardioembolic stroke features, revising regular expression algorithms until achieving positive predictive value ≥80%. We compared several machine learning-based statistical algorithms for discriminating cardioembolic stroke using the feature algorithms applied to EHR data from 1598 patients with acute ischemic strokes from the Massachusetts General Hospital Ischemic Stroke Registry (2002-2010) with previously adjudicated TOAST and Causative Classification of Stroke subtypes.
Results: Regular expression-based feature extraction algorithms achieved a mean positive predictive value of 95% (range, 88%-100%) across 11 echocardiographic features. Among 1598 patients from the Massachusetts General Hospital Ischemic Stroke Registry, 1068 had any cardioembolic stroke feature within predefined time windows in proximity to the stroke event. Cardioembolic stroke tended to occur at an older age, with more TOAST-based comorbidities, and with atrial fibrillation (82.3%). The best model was a random forest with 92.2% accuracy and area under the receiver operating characteristic curve of 91.1% (95% CI, 87.5%-93.9%). Atrial fibrillation, age, dilated cardiomyopathy, congestive heart failure, patent foramen ovale, mitral annulus calcification, and recent myocardial infarction were the most discriminatory features.
Conclusions: Machine learning-based identification of cardioembolic stroke using EHR data is feasible. Future work is needed to improve the accuracy of automated cardioembolic stroke identification and assess generalizability of electronic phenotyping algorithms across clinical settings.
Keywords: atrial fibrillation; dilated cardiomyopathy; electronic health records; natural language processing; secondary prevention.