Development and validation of a machine learning model for classification of next glucose measurement in hospitalized patients

EClinicalMedicine. 2022 Feb 4:44:101290. doi: 10.1016/j.eclinm.2022.101290. eCollection 2022 Feb.

Abstract

Background: Inpatient glucose management can be challenging due to evolving factors that influence a patient's blood glucose (BG) throughout hospital admission. The purpose of our study was to predict the category of a patient's next BG measurement based on electronic medical record (EMR) data.

Methods: EMR data from 184,361 admissions containing 4,538,418 BG measurements from five hospitals in the Johns Hopkins Health System were collected from patients who were discharged between January 1, 2015 and May 31, 2019. Index BGs used for prediction included the 5th to penultimate BG measurements (N = 2,740,539). The outcome was category of next BG measurement: hypoglycemic (BG 70 mg/dl), controlled (BG 71-180 mg/dl), or hyperglycemic (BG > 180 mg/dl). A random forest algorithm that included a broad range of clinical covariates predicted the outcome and was validated internally and externally.

Findings: In our internal validation test set, 72·8%, 25·7%, and 1·5% of BG measurements occurring after the index BG were controlled, hyperglycemic, and hypoglycemic respectively. The sensitivity/specificity for prediction of controlled, hyperglycemic, and hypoglycemic were 0·77/0·81, 0·77/0·89, and 0·73/0·91, respectively. On external validation in four hospitals, the ranges of sensitivity/specificity for prediction of controlled, hyperglycemic, and hypoglycemic were 0·64-0·70/0·80-0·87, 0·75-0·80/0·82-0·84, and 0·76-0·78/0·87-0·90, respectively.

Interpretation: A machine learning algorithm using EMR data can accurately predict the category of a hospitalized patient's next BG measurement. Further studies should determine the effectiveness of integration of this model into the EMR in reducing rates of hypoglycemia and hyperglycemia.

Keywords: AUC, area under receiver operating curve; BG, blood glucose; BMI, body mass index; CGM, continuous glucose monitor; EMR, electronic medical record; ICD, International Classification of Diseases; ICU, intensive care unit; NLR, negative likelihood ratio; NPO, nil per os; NPV, negative predictive value; PLR, positive likelihood ratio; PPV, positive predictive value; T1DM, type 1 diabetes mellitus; T2DM, type 2 diabetes mellitus.