Accepted for/Published in: JMIR Medical Informatics
Date Submitted: May 11, 2025
Date Accepted: Aug 4, 2025
(closed for review but you can still tweet)
Predicting Medical Task Waiting Times in a Pediatric Hospital by Machine Learning: A Comprehensive Real-World Study
ABSTRACT
Background:
The shortage of pediatric medical resources and overcrowding in children’s hospital are severe issues in China. Queue management systems that accurately predict waiting times could help optimize hospital operational efficiency.
Objective:
This study aims to develop machine learning models for various laboratory and radiology examinations waiting time prediction in a pediatric hospital.
Methods:
Medical tasks in this pediatric hospital were categorized into laboratory tests and radiology examinations. Laboratory test included two throat swab stations, blood sampling, and fever-specific laboratory testing. Radiology examinations encompassed CT, MRI, X-ray, laryngoscopy, ultrasound, and echocardiography. Timestamp data from laboratory and radiology examinations were retrospectively collected from a pediatric hospital information system over the period from November 1, 2024 to March 13, 2025. Two queue-related and four time-based predictors were extracted according to queue theory. Linear regression and nine machine learning models were trained to predict waiting times for each medical task. A 70/30 train-test split was used, and model performance was evaluated using mean absolute error (MAE), mean square error (MSE), root of mean square error (RMSE), and the coefficient of determination (R²). SHapley Additive exPlanations (SHAP) value or regression coefficient were used to evaluate feature importance.
Results:
A total of 326,701 timestamped records for medical tasks were collected, of which 230,864 were retained following data preprocessing. The median waiting time across all medical tasks was 5.65 minutes. Peak patient arrival rates and the number of queuing patient were observed at 10:00 a.m., 3:00 p.m., and 8:00 p.m., however, the first and second peaks in waiting time occurred earlier, around 7:00 a.m. and 12:00 p.m., with a third peak coinciding with the 8:00 p.m. In general, waiting times for radiological examinations were longer than those for laboratory tests. Among the evaluated models, LightGBM achieved the highest predictive accuracy for waiting time estimation in most of medical tasks, with RMSE ranging from 0.747 to 17.681. Linear regression also demonstrated acceptable performance, with RMSE values ranging from 1.291 to 16.567, and was selected for echocardiography and MRI. Feature importance analysis indicated that the number of queuing patients was the most influential predictor across all of medical task queues.
Conclusions:
To accurately predict waiting times for different medical tasks, it is more appropriate to construct task-specific predictive models. Guided by principles of QT, we identified and selected concise relevant predictors and construct machine learning model for each medical task waiting time prediction. Feature importance analysis indicated that queue-related predictors have a substantial impact on patient waiting times. Nonetheless, when designing strategies to optimize hospital operations, the temporal variations reflected by time-based predictors should also be carefully considered.
Citation
Request queued. Please wait while the file is being generated. It may take some time.