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. To 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. A 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. Key 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. Gradient 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.
Authors
- Bayou Tilahun Assaye (ORCID: https://orcid.org/0000-0002-4760-0818)
- Bekalu Endalew
- Tefera Mekuriaw Alemayehu
- Abraham Keffale Mengistu
- Andualem Enyew Gedefaw
- Kelemua Aschale Yeneakal
- Kerebih Getinet
- Abraham Teym
Institutions
- Bahir Dar University (ET)
- University of Gondar (ET)
- Debre Markos University (ET)
Publication Details
- Journal
- Discover Artificial Intelligence
- Published
- 2026-01-04
- DOI
- https://doi.org/10.1007/s44163-025-00794-9
- Primary Topic
- Sepsis Diagnosis and Treatment
- Type
- article
- Field-Weighted Citation Impact
- 0.00