Abstract: We collaborate with a large teaching hospital in Shenzhen, China and build a high-fidelity simulation model for its ultrasound center to predict key performance metrics, including the distributions of queue length, waiting time and sojourn time, with high accuracy. The key challenge to build an accurate simulation model is to understanding the complicated patient routing at the ultrasound center. To address the issue, we propose a novel two-level routing component to the queueing network model. We apply machine learning tools to calibrate the key components of the queueing model from data with enhanced accuracy.
Introduction
Predicting patient wait times in hospital environments is notoriously difficult due to extreme heterogeneity in exam types, equipment capabilities, and technician skill levels. In a typical ultrasound center, routing is often discretionary; nurses assign patients to rooms based on a complex mix of medical urgency and real-time equipment availability.
Conventional queueing models often rely on stylized rules like "First-Come, First-Served" (FCFS) or "Join the Shortest Queue" (JSQ). However, these models fail to capture the nuances of human decision-making and operational "gap times"—such as technician breaks or patient transit times—leading to significant discrepancies between simulated and empirical results. As shown in baseline simulations, standard models often fail to capture critical peaks in arrival patterns and the true shape of wait time distributions.
Methodology
To address these challenges, we developed a "white-box" hybrid simulation that replaces rigid mathematical rules with data-driven components. The core innovation is a two-level hierarchical routing policy calibrated via machine learning:
- Level 1 (Medical Factor): A Random Forest classifier determines the appropriate room group (categorized into four types) based on patient demographics and specific exam items.
- Level 2 (Operational Factor): A secondary model selects the specific room within that group based on real-time data, such as current queue lengths and room status.
Furthermore, we utilized Gaussian Mixture Models to cluster 189 different exam items into six manageable categories and modeled "Gap Times" using empirical distributions to ensure the simulation clock matched the real-world pace of the clinic.
Datasets and Calibration
The study utilized a massive dataset from Luohu Hospital in Shenzhen, China, comprising 175,702 records from 2018. The data merged patient IDs, department information, and critical timestamps (arrival, service start, and service end). We used 80% of the data to train the routing and availability models, with the remaining 20% reserved for out-of-sample validation.
Key Results
The high-fidelity model significantly outperformed conventional multi-class queueing models across all key performance indicators (KPIs). The most notable improvement was in the Waiting Time Distribution, where the Kolmogorov-Smirnov (KS) difference—a measure of distributional deviation—dropped from 0.371 in conventional models to just 0.058 in our high-fidelity model. This represents a nearly 7x improvement in capturing the "long tail" of patient waits.
Additionally, the error in mean queue length was reduced from 16.49% to 6.73%, and the mean waiting time error improved from 21.25% to 19.34%. While the average wait time improved slightly, the primary success lies in the model's ability to accurately reflect the operational reality of the hospital, including peak periods and queue fluctuations.
Conclusion
By integrating machine learning with traditional queueing theory, we have created a simulation tool that captures the "human discretion" gap often missing in operational models. While the current model prioritizes accuracy over mathematical simplicity, it provides a robust foundation for real-time decision support. Future work will focus on developing live dashboards to allow hospital managers to perform "what-if" scenarios, such as reassigning technicians during peak hours to optimize patient flow.
Summary updated