Machine learning predicts prolonged patient length of stay in a resource constrained Ethiopian hospital
摘要
Patient Length of Stay (LOS) is a critical indicator of hospital efficiency, impacting resource allocation, costs, and care quality. Predicting LOS is especially challenging in resource-limited settings due to data skewness, outlier sensitivity, and imbalanced datasets. Machine learning (ML) offers potential solutions but requires validation in low-resource contexts.
ObjectiveTo develop and evaluate ML models for predicting prolonged LOS (≥ 6 days) at Debre Markos Comprehensive SpecializedHospital, Ethiopia, using electronic health records (EHRs) to optimize operational planning.
Methods and materialsA retrospective analysis of 27,268 patient records (2017–2024) from four hospital wards was conducted. Data preprocessing included feature engineering, one-hot encoding, and addressing class imbalance (20,768 “Not Prolonged” vs. 6,500 “Prolonged”) using the Synthetic Minority Oversampling Technique (SMOTE). Eight ML models (Logistic Regression, Decision Tree, Random Forest, Gradient Boosting, MLP, SVM, KNN, Naïve Bayes) were trained (80% training, 20% testing with 5-fold cross-validation) and evaluated using accuracy, precision, recall, F1-score, and AUC-ROC. Feature importance was assessed via permutation analysis.
ResultsKey demographics: 62.3% rural patients, peak age 29–49 years (26.8%), with a sharp hospitalization decline post-2021 (regional conflict impact). SMOTE significantly improved model performance, particularly in terms of recall and F1-scores. Gradient Boosting outperformed others (AUC: 0.70, Accuracy: 81%, Precision: 72%, Recall: 63%, F1-score: 0.76). Top predictors of prolonged LOS were ward type (Medical/Surgical/Pediatrics), age (29–65 years), pregnancy-related conditions, respiratory/digestive diagnoses, and rural residence.
ConclusionGradient Boosting with SMOTE effectively predicts prolonged LOS in resource-constrained settings using EHR data. Implementation of ML-driven LOS prediction can enhance bed management, staffing, and resource allocation, aligning with Ethiopia’s Health Sector Transformation Plan (HSTP) goals for efficient healthcare delivery. Future work should focus on real-time validation and integration into hospital systems.