Introduction: Screening for previously undiagnosed diabetes in the emergency department (ED) can enhance early detection, which may particularly benefit patients with barriers to accessing primary care. To optimize use of limited ED resources, there is a need to identify ED patients who are at high risk.

Objectives: To improve identification of ED patients with undiagnosed diabetes using machine learning (ML) .

Methods: Diabetes screening by HbA1c was implemented in four EDs at an academic medical center. Patients aged 40 or older, with BMI > 25, no history of diabetes and no HbA1c result within 6 months were eligible for screening. Patients were stratified by screening result and compared across demographic and clinical characteristics, and local geographic measures of health and socioeconomic variables. ML classifier models predicting a positive screening result were trained, and were validated on a prospectively withheld subset of the cohort.

Results: In the first weeks after implementation, 2423 eligible patients were identified, and 1518 (62.6%) were screened, with 114 (7.5% of those screened) found to have previously undiagnosed diabetes. Patients with diabetes more often identified as male, Hispanic or Latino, Black, or Asian, had higher BMIs and blood pressures at triage, resided in neighborhoods with higher diabetes prevalence and poverty rates, and had less prior healthcare utilization, especially in the outpatient setting. The best performing classifier models were logistic regression with elastic net regularization (AUC 0.81) and gradient-boosted trees (AUC 0.77) . These models identified a high-risk subgroup consisting of 30% of eligible patients who accounted for over 80% of newly detected cases of diabetes.

Conclusions: ML models can reliably identify ED patients at high risk of having undiagnosed diabetes based on demographic, clinical, and local geographic risk factors, and could form the basis of a selective screening program.


I.Bohart: None. J.Caldwell: None. J.Swartz: None. P.E.Rosen: None. N.Genes: None. C.A.Koziatek: None. D.B.Neill: None. D.C.Lee: None.

Readers may use this article as long as the work is properly cited, the use is educational and not for profit, and the work is not altered. More information is available at