Hong Kong Journal of Emergency Medicine (Aug 2025)
Predicting prolonged length of stay in the emergency medicine ward using machine learning
Abstract
Abstract Background Emergency Medicine Wards (EMWs) in Hong Kong focus on managing short‐stay patients with a length of stay (LOS) less than 72 h to alleviate the burden on medical wards. The ability to predict prolonged LOS provides valuable guidance on healthcare resource management. Objective To develop a machine learning (ML) model to predict whether EMW patients at Kwong Wah Hospital have an LOS less than or more than 72 h. Methods A retrospective cohort pilot study including 8653 patients admitted to the EMW from June 2023 to March 2025 with 31 features was used to develop five ML models. Model performances were evaluated with receiver operating characteristic (ROC) area under curve (AUC), accuracy, Kappa, sensitivity, specificity, positive and negative likelihood ratios, and F1 score. Variable importance analysis was done to identify predictors of LOS. Results The XGBoost model performed best with ROC AUC 0.79, accuracy 0.77, Kappa 0.42, sensitivity 0.60, specificity 0.83, positive likelihood ratio of 3.53, negative likelihood ratio of 0.48, and F1score 0.59. Albumin, age, and random glucose were the top three LOS predictors. Conclusion XGBoost was the best performing model and showed moderate results in its use for prediction of EMW LOS. It has limited applicability for clinical implementation currently but its utilisation could be further explored to improve healthcare resource allocation.
Keywords