Predicting Waiting Times for Medical Tasks in a Pediatric Hospital Using Machine Learning: Comprehensive, Retrospective, Real-World Study
Open Access
- 29 September 2025
- journal article
- quality improvement
- Published by JMIR Publications Inc. in JMIR Medical Informatics
- Vol. 13 (1) , e77297
Abstract
Background: The shortage of pediatric medical resources and overcrowding in children’s hospitals are severe issues in China. Accurately predicting waiting times can help optimize hospital operational efficiency. Objective: This study aims to develop machine learning models to predict waiting times for various laboratory and radiology examinations at a pediatric hospital. Methods: Time stamp data from laboratory and radiology examinations were retrospectively collected from the pediatric hospital information system between November 1, 2024, and March 13, 2025. Two queue-related and 4 time-based features were extracted using queue theory. Linear regression and 8 machine learning models were trained to predict waiting times for each medical task. Hyperparameters were fine-tuned using randomized search and 10-fold cross-validation, and the bootstrap method was used for model evaluation. Mean absolute error, mean square error, root mean square error, and the coefficient of determination (R²) were used as evaluation metrics. Shapley additive explanations values were used to assess feature importance. Results: A total of 230,864 time-stamped records were included after data preprocessing. The median waiting time was 4.817 (IQR 1.867-12.050) minutes for all medical tasks. Waiting times for radiology examinations were generally longer than those for laboratory tests. Tree-based algorithms, such as random forest and classification and regression trees, performed best in predicting laboratory test waiting times, with R² values ranging from mean 0.880(SD 0.003) to mean 0.934 (SD 0.003). However, the machine learning models did not perform well in predicting radiology examination waiting times, with R2 ranging from 0.114 (SD 0.005) to 0.719 (SD 0.004). Feature importance analysis revealed that queue-related predictors, especially the number of queuing patients, were the most important in predicting waiting times. Conclusions: Task-specific prediction models are more appropriate for accurately predicting waiting times across various medical tasks. Guided by queue theory principles, we developed machine learning models for the waiting time prediction of each medical task and highlighted the importance of queue-related predictors.Keywords
This publication has 28 references indexed in Scilit:
- Predicting Ambulance Patient Wait Times: A Multicenter Derivation and Validation StudyAnnals of Emergency Medicine, 2021
- Queuing Theory and Modeling Emergency Department Resource UtilizationEmergency Medicine Clinics of North America, 2020
- An Integrated Approach of Machine Learning and Systems Thinking for Waiting Time Prediction in an Emergency DepartmentInternational Journal of Medical Informatics, 2020
- Machine Learning for Predicting Patient Wait Times and Appointment DelaysJournal of the American College of Radiology, 2018
- Seasonality of Common Pediatric Infectious DiseasesPediatric Emergency Care, 2018
- Seasonal variation of diseases in children: a 6-year prospective cohort study in a general hospitalEuropean Journal of Pediatrics, 2015
- Time Series Modelling and Forecasting of Emergency Department OvercrowdingJournal of Medical Systems, 2014
- Forecasting Demand of Emergency CareHealth Care Management Science, 2002
- Modeling and forecasting monthly patient volume at a primary health care clinic using univariate time-series analysisComputer Methods and Programs in Biomedicine, 1998
- Ten-year follow-up of ARIMA forecasts of attendances at accident and emergency departments in the Trent regionStatistics in Medicine, 1997