A two-stage framework for hospital-wide length of stay prediction using real-world inpatient data: prolonged-stay risk stratification and short-stay estimation

Hospital-wide length of stay (HWLOS) prediction is challenging because inpatient LOS is right-skewed and clinically heterogeneous, while prolonged-stay risk stratification and day-level estimation serve different operational needs. We developed and internally validated a two-stage HWLOS framework using real-world inpatient data. We analyzed 209,088 admissions from 104,245 patients in acute general beds at a medical center in Taiwan (2022–2024) using patient-grouped partitions. Stage 1 used calibrated XGBoost to classify prolonged stays (> 20 days); Stage 2 used a deep neural network (DNN) to estimate day-level LOS among short stays, with linear regression, random forest, and XGBoost as comparators. Single-stage comparisons, predicted routing, SHapley Additive exPlanations (SHAP), and sensitivity analyses of prolonged-stay cutoffs and information-restricted model specifications were evaluated. Stage 1 achieved an AUROC of 0.9479, 80.21% sensitivity, and 33.33% positive predictive value at the validation-selected threshold. On oracle-defined short stays, the DNN had the lowest mean absolute error (1.4609 days) and highest proportions within ± 1 and ± 2 days, whereas XGBoost had the lowest root mean squared error (2.4289) and highest R ² (0.6231); no model was uniformly best. Predicted routing sent 88.11% of admissions to Stage 2; on the same 37,199 routed admissions, there was no clear evidence of an MAE difference between two-stage and single-stage DNNs. Across prolonged-stay cutoffs of 14, 20, and 30 days, sensitivity remained near 80%, while alert burden increased and the Stage 2 short-stay population expanded. SHAP identified admission source, number of procedures, and physician-predicted LOS category as leading predictors. When discharge-finalized predictors were excluded, Stage 1 AUROC decreased from 0.9479 to 0.8555, and Stage 2 MAE increased from 1.4609 to 1.7400 days. The two-stage framework distinguishes complementary prediction tasks: prolonged-stay risk stratification to inform discharge-planning and case-management review, and day-level LOS estimation for predicted short stays to support anticipated bed turnover and capacity planning. Evaluation under predicted routing makes the associated trade-offs explicit. Prospective evaluation using predictor values available at the intended prediction time and multicenter validation are needed before clinical implementation.

Authors

Institutions

Publication Details

Journal
BMC Medical Informatics and Decision Making
Published
2026-11-12
DOI
https://doi.org/10.1186/s12911-026-03974-4
Primary Topic
Healthcare Operations and Scheduling Optimization
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

A two-stage framework for hospital-wide length of stay prediction using real-world inpatient data: prolonged-stay risk stratification and short-stay estimation

Ding‐Hsiang Huang, Tsai Hw, Chin‐Yin Huang, Meng-Hsun Lee
BMC Medical Informatics and Decision Making
Healthcare Operations and Scheduling Optimization
article

A two-stage framework for hospital-wide length of stay prediction using real-world inpatient data: prolonged-stay risk stratification and short-stay estimation

Ding‐Hsiang Huang, Tsai Hw, Chin‐Yin Huang, Meng-Hsun Lee
article en

Abstract

Hospital-wide length of stay (HWLOS) prediction is challenging because inpatient LOS is right-skewed and clinically heterogeneous, while prolonged-stay risk stratification and day-level estimation serve different operational needs. We developed and internally validated a two-stage HWLOS framework using real-world inpatient data. We analyzed 209,088 admissions from 104,245 patients in acute general beds at a medical center in Taiwan (2022–2024) using patient-grouped partitions. Stage 1 used calibrated XGBoost to classify prolonged stays (> 20 days); Stage 2 used a deep neural network (DNN) to estimate day-level LOS among short stays, with linear regression, random forest, and XGBoost as comparators. Single-stage comparisons, predicted routing, SHapley Additive exPlanations (SHAP), and sensitivity analyses of prolonged-stay cutoffs and information-restricted model specifications were evaluated. Stage 1 achieved an AUROC of 0.9479, 80.21% sensitivity, and 33.33% positive predictive value at the validation-selected threshold. On oracle-defined short stays, the DNN had the lowest mean absolute error (1.4609 days) and highest proportions within ± 1 and ± 2 days, whereas XGBoost had the lowest root mean squared error (2.4289) and highest R ² (0.6231); no model was uniformly best. Predicted routing sent 88.11% of admissions to Stage 2; on the same 37,199 routed admissions, there was no clear evidence of an MAE difference between two-stage and single-stage DNNs. Across prolonged-stay cutoffs of 14, 20, and 30 days, sensitivity remained near 80%, while alert burden increased and the Stage 2 short-stay population expanded. SHAP identified admission source, number of procedures, and physician-predicted LOS category as leading predictors. When discharge-finalized predictors were excluded, Stage 1 AUROC decreased from 0.9479 to 0.8555, and Stage 2 MAE increased from 1.4609 to 1.7400 days. The two-stage framework distinguishes complementary prediction tasks: prolonged-stay risk stratification to inform discharge-planning and case-management review, and day-level LOS estimation for predicted short stays to support anticipated bed turnover and capacity planning. Evaluation under predicted routing makes the associated trade-offs explicit. Prospective evaluation using predictor values available at the intended prediction time and multicenter validation are needed before clinical implementation.

BMC Medical Informatics and Decision Making
National Yang Ming Chiao Tung University (TW), Tunghai University (TW), Taichung Veterans General Hospital (TW)
Taichung Veterans General Hospital
Good health and well-being
Healthcare Operations and Scheduling Optimization
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