DOI: 10.1093/eurheartj/ehag785.4304 ISSN: 0195-668X

Reclassification of the unspecified heart failure data phenotype in electronic health records

C J Hayward, R Nadarajah, F Shuweihdi, Y Nakao, J Wu, C Gale

Abstract

Background

Heart failure (HF) is common and associated with morbidity and mortality. Treatment for HF with guideline-directed medicines improves prognosis and reduces the risk of HF hospitalisation [1]. Treatments for HF differ by ejection fraction phenotype. However, diagnostic codes in electronic health records (EHRs) infrequently reflect this, and individuals where HF is not coded as preserved (HFpEF) or reduced ejection fraction (HFrEF), herein referred to as ‘unspecified HF’, less frequently receive guideline-directed medicines and experience worse outcomes [2].

Objective

To develop an algorithm in EHR data to reclassify individuals with ‘unspecified’ heart failure to HF with HFpEF or HFrEF.

Methods

We used primary care EHR data from individuals aged ≥40 years with a HF diagnostic code in the UK Clinical Practice Research Datalink-AURUM dataset between January 1998 and December 2021. We took the subpopulation with diagnostic codes consistent with HFpEF or HFrEF, divided into a training and testing dataset (80:20). We trained machine learning algorithms to predict HFpEF or HFrEF using 20 variables including demographic factors, comorbidities and medicines, chosen using a supervised binary search of the predictor space [3]. Prediction performance was evaluated with area under the receiver operating characteristic curve (AUROC). Prediction thresholds for HFpEF and HFrEF reclassification were selected using the likelihood ratio for a predefined probability of correct HF classification. Individuals with unspecified-HF were reclassified to either HFpEF or HFrEF using the best-performing model and derived thresholds.

Results

Of a cohort of 3,537,285 individuals, 28,832 (0.8%) were recorded as having HFpEF; 122,972 (3.5%) as HFrEF; and 580,793 (16.4%) as unspecified-HF (Table 1). Compared to the HFrEF cohort, the HFpEF cohort were older, more commonly women, and had a higher BMI. Among the trained models, XGBoost showed the best prediction performance (AUROC: XGBoost, 0.706 (95% CI 0.699-0.714); random forest, 0.702 (95% CI 0.695-0.709); logistic regression, 0.698 (95% CI 0.691-0.706)). Of the individuals diagnosed with unspecified-HF, XGBoost was able to reclassify 143,389 (24.7%) to HFpEF and 133,386 (23.0%) to HFrEF at a 75% probability of correct classification for both groups (Figure 1). Using stricter thresholds corresponding to a 90% probability of correct classification, 7,947 (1.4%) individuals with unspecified-HF were reclassified to HFpEF and 23,445 (4.0%) to HFrEF.

Conclusion

Supervised machine learning approaches in EHRs can be used to reclassify data phenotypes to more closely align with clinically actionable phenotypes. This model could be used at scale in UK primary care data to identify individuals with HF whose care can be improved through appropriate recognition of their HF phenotype.

More from our Archive