Routine to Emergency: A Machine Learning Approach for Predicting ED Visits Among Patients with T2D

Abstract Background: Emergency department (ED) visits among patients with type 2 diabetes (T2D) are frequent and costly. A substantial proportion of ED visits arising from T2D complications are potentially preventable. Yet most high-risk patients are identified only after an acute event has already occurred. This study develops and evaluates machine learning (ML) models to predict ED utiliza-tion among patients with T2D across multiple time horizons. This may enable proactive and timely clinical intervention. Methods: Longitudinal electronic health record data from the HealthShare Exchange (HSX) were used. A sliding-window framework was applied across three prediction periods (0–30, 30–60, and 60–90 days). A total of 185 features spanning demographics, diagnoses, vital signs, and SDoH were used. These were com-bined into a unified patient-level feature set. Six ML models were developed and compared. These were Logistic Regression (LR), K-Nearest Neighbors (KNN), Random Forest (RF), and Extreme Gradient Boosting (XGB). The others were Graph Neural Network (GNN) and Feature Tokenizer-Transformer (FTT). Mod-els were evaluated using area under the receiver operating characteristic curve (AUC ROC), accuracy, precision, recall, and F1 score. Results: A total of 51,603 patients were included in the analytic cohort across all prediction windows. The cohort had a median age of 68 years and was 50.8%female. It was racially diverse, with the largest groups being White (48.1%) and Black or African American (37.8%). Based on AUC ROC, XGB and FTT achieved the strongest discriminative performance among the six models. XGB reached 0.847, 0.868, and 0.857 across the 0–30, 30–60, and 60–90 day windows, respectively. FTT closely matched this (0.849, 0.864, 0.858), with AUC ROC differences between the two models of 0.004 or less. RF (0.840, 0.852, 0.842), LR (0.834, 0.850, 0.844), GNN (0.836, 0.851, 0.844), and KNN (0.747, 0.756, 0.746) followed. Once evaluated at a matched decision threshold, FTT achieved the highest recall and F1 score in two windows: 0–30 and 60–90 days. XGB achieved the highest recall and F1 score in the 30–60 day window. Healthcare utilization and vital sign variables were the most consistently important predictors. Decision curve analysis confirmed that FTT provided the highest net benefit in the 30–60 and 60–90 day windows. FTT and XGB performed comparably in the 0–30 day window. Fairness evaluation revealed consistent performance across sex subgroups. Discrimination and recall were lower for Hispanic or Latino patients in the 0–30 day window. Discrimination was similar across ethnicity subgroups in the later windows, and recall varied across racial and ethnic groups. Ablation analysis identified vital signs and diagnoses as the most contributory feature groups. Conclusions: The ML models demonstrate strong and reliable predictive per-formance for ED utilization among patients with T2D. These findings suggest that these models can support proactive clinical decision-making and targeted interventions to reduce ED visits.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-11-04
DOI
https://doi.org/10.21203/rs.3.rs-11603655/v1
Primary Topic
Machine Learning in Healthcare
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Routine to Emergency: A Machine Learning Approach for Predicting ED Visits Among Patients with T2D

Gabriel S. Tajeu, Huanmei Wu, Javad Alizadeh, Ilene L. Hollin et al.
Research Square
Machine Learning in Healthcare
preprint

Routine to Emergency: A Machine Learning Approach for Predicting ED Visits Among Patients with T2D

Gabriel S. Tajeu, Huanmei Wu, Javad Alizadeh, Ilene L. Hollin, Mukesh Kumar Patel, Rosemary Nagy, Syeda Maryam Abidi
preprint en

Abstract

Abstract Background: Emergency department (ED) visits among patients with type 2 diabetes (T2D) are frequent and costly. A substantial proportion of ED visits arising from T2D complications are potentially preventable. Yet most high-risk patients are identified only after an acute event has already occurred. This study develops and evaluates machine learning (ML) models to predict ED utiliza-tion among patients with T2D across multiple time horizons. This may enable proactive and timely clinical intervention. Methods: Longitudinal electronic health record data from the HealthShare Exchange (HSX) were used. A sliding-window framework was applied across three prediction periods (0–30, 30–60, and 60–90 days). A total of 185 features spanning demographics, diagnoses, vital signs, and SDoH were used. These were com-bined into a unified patient-level feature set. Six ML models were developed and compared. These were Logistic Regression (LR), K-Nearest Neighbors (KNN), Random Forest (RF), and Extreme Gradient Boosting (XGB). The others were Graph Neural Network (GNN) and Feature Tokenizer-Transformer (FTT). Mod-els were evaluated using area under the receiver operating characteristic curve (AUC ROC), accuracy, precision, recall, and F1 score. Results: A total of 51,603 patients were included in the analytic cohort across all prediction windows. The cohort had a median age of 68 years and was 50.8%female. It was racially diverse, with the largest groups being White (48.1%) and Black or African American (37.8%). Based on AUC ROC, XGB and FTT achieved the strongest discriminative performance among the six models. XGB reached 0.847, 0.868, and 0.857 across the 0–30, 30–60, and 60–90 day windows, respectively. FTT closely matched this (0.849, 0.864, 0.858), with AUC ROC differences between the two models of 0.004 or less. RF (0.840, 0.852, 0.842), LR (0.834, 0.850, 0.844), GNN (0.836, 0.851, 0.844), and KNN (0.747, 0.756, 0.746) followed. Once evaluated at a matched decision threshold, FTT achieved the highest recall and F1 score in two windows: 0–30 and 60–90 days. XGB achieved the highest recall and F1 score in the 30–60 day window. Healthcare utilization and vital sign variables were the most consistently important predictors. Decision curve analysis confirmed that FTT provided the highest net benefit in the 30–60 and 60–90 day windows. FTT and XGB performed comparably in the 0–30 day window. Fairness evaluation revealed consistent performance across sex subgroups. Discrimination and recall were lower for Hispanic or Latino patients in the 0–30 day window. Discrimination was similar across ethnicity subgroups in the later windows, and recall varied across racial and ethnic groups. Ablation analysis identified vital signs and diagnoses as the most contributory feature groups. Conclusions: The ML models demonstrate strong and reliable predictive per-formance for ED utilization among patients with T2D. These findings suggest that these models can support proactive clinical decision-making and targeted interventions to reduce ED visits.

Research Square
University of Alabama at Birmingham (US), Temple University (US)
Machine Learning in Healthcare
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon