Patient Flow Control in Emergency Departments Using Simulation Modeling and The Random Forest Algorithm
Patient Flow Control in Emergency Departments Using Simulation Modeling and The Random Forest Algorithm
Random Forest is a machine learning algorithm that condition severity. The proposed method enhances wait-
belongs to the category of ensemble methods. It is used for time estimates by constantly updating and altering
both classification and regression tasks. In Random Forest, predictions based on patient and ED-specific data, resulting
a large number of decision trees are created and combined in more accurate probabilistic and point forecasts.
to make a prediction. Each decision tree is trained on a
subset of the training data, and at each split, a random Various approaches, including machine learning and
subset of features is selected to determine the best split. systems thinking, have been used to anticipate ED wait
This process is repeated for each tree, and the final times, as proven by Kuo et al. (2020) and Stagge (2020).
prediction is made by aggregating the predictions of all the
individual trees. The main advantages of Random Forest Arha (2017) and Curtis et al. (2018) used machine
are its ability to handle large datasets, its robustness to learning algorithms to forecast wait times for low-acuity
noise and outliers, and its ability to capture complex patients in the emergency department, taking into account
nonlinear relationships in the data. It also provides parameters such as arrival, service completion, and
estimates of feature importance, which can be used to examination. Studies on patient waiting time before
identify the most relevant features for the task at hand. treatment use quantile regression, but this study uses multi-
Random Forest has been successfully applied in a wide DL optimization strategies and extracts new predictors
range of domains, including finance, healthcare, and from patient joining, queue waiting time, and departure
marketing. However, it may not be the best algorithm for time. Because of long wait times and congestion in many
all tasks, and other algorithms such as support vector hospitals throughout the globe, the number of emergency
machines or neural networks may be more appropriate department visits in the United States is growing year after
depending on the specifics of the problem (Breiman, 2001). year (Di et al. 2015).
Some of the obstacles experienced by existing model According to the National Center for Health, 145.6
were the imbalanced nature of the dataset in the class million individuals visit the ED each year, with rising visits
variables. A need to balance the dataset, increase the and wait times. Since 2015, the Canadian Institute for
dataset size and use an advanced model for performance Health Information has documented considerable growth.
enhancement is necessary. The proposed model tries to These problems might be addressed by evaluating ER
take that measures for the betterment of the system. The efficiency. (Rasouli et al. 2019). By tracking patient arrival
remaining sections of the article are related work, method times, some hospitals utilize queuing models to enhance
findings and conclusion. staff allocation. (Kaushal et al. 2015; Sasanfar et al. 2020).
Predictive models are critical in the medical business for
Alenany & Cadi. (2020) combines machine learning anticipating patient wait times utilizing past data and
(ML) and simulation models to model patient flow in an efficiently handling seasonal arrival and wait times. (Ruben
emergency department (ED). The ML model predicts et al. 2010; Cai et al. 2016). Electronic Health Record EHR
whether a patient will be admitted to the inpatient unit after data is critical for uncovering hidden healthcare concerns
receiving treatment at the ED, based on patient data. The and improving queuing systems, especially in predictive
simulation model uses this output to assess the expected models for future behavior analysis. (Eiset et al. 2019).
reduction in patient length of stay (LOS) and door-to-
doctor time (DTDT) if patients are admitted directly to Machine learning approaches were used in the
inpatient units at an early stage of their ED journey. The research on queuing behavior projection, however their
study shows that using ML and simulation can help manage time series analysis on queue data prediction study is
ED patient flow and reduce congestion, with the potential faulty. (Srivastava 2016; Stagge 2020). According to Dong
for further improvements through increased data size and et al.'s 2019 research, ED waiting time is an important
the use of other ML models. However, the effect of other aspect people evaluate when selecting their medical care
related measures on patient quality should also be provider. The previously released data assists in operational
considered. Hence, the proposed model attempt to improve choices targeted at minimizing wait times and congestion in
this model using the Random Forest Algorithm instead of the Emergency Room. (Abir et al. 2019).
the Decision tree used in the existing model. The data size
will also be increased to enable an improvement in the Kroer et al. (2018) and Meersman and Maenhout
performance of the proposed model. (2022) investigated capacity allocation for elective and
emergency patients to decrease wait times and OR and
II. RELATED WORK overtime expenditures.
E James W. T. (2023) investigates the estimation of For allocating COVID-19 patients and speciality
patient waiting times in emergency rooms, emphasizing the teams, Arab Momeni et al. (2022) offered a mixed-integer
need for more precise and nuanced projections to increase mathematical programming technique, while Wang et al.
patient satisfaction and decrease abandonment. To produce (2016) employed a discrete simulation model.
probabilistic predictions from huge patient-level data sets, a
quantile regression forest machine learning technique was Tuwatananurak et al. (2019) used a 15,000 surgical
utilized, extracting predictor parameters such as calendar case data set to predict patient surgery duration using leap
influences, demographics, staff count, ED load, and patient Rail, a customized machine learning algorithm.
Fairley et al. (2019) forecasted PACU time using surgery scheduling. Machine learning models were helpful
machine learning, resulting in lower holdings and cost in OT scheduling.
reductions. Schiele et al. (2021) combined ORs and units to
schedule master operations. Shuvo et al. (2020) created a III. METHODOLOGY
deep reinforcement learning strategy.
The proposed model aims to optimize patient flow and
Luo and Wang (2019) used machine learning reduce waiting times in emergency departments using a
algorithms to identify canceled procedures, with the simulation model and random forest algorithm. The
random forest model proving to be the most successful, simulation model is used to simulate patient flow and
allowing preventative actions to be taken to lower predict patient volumes, acuity levels, and waiting times.
cancellation rates. To forecast surgical cancellations at The random forest algorithm is then used to analyze the
West China Hospital, Luo et al. (2016) used machine simulation results and make predictions based on patient
learning approaches such as boosting, Bayesian additive data, such as age, gender, and presenting complaint. The
regression trees, and random forest. performance of the model is evaluated using metrics such
as accuracy, specificity, and sensitivity. The goal is to
Erekat et al. (2020) and Zhao et al. (2019) employed improve patient flow and reduce waiting times in
data mining approaches to estimate surgery cancellations, emergency departments, ultimately leading to better patient
resulting in cost reductions and more efficient robotic outcomes and higher patient satisfaction.
A simulation model of the emergency department's emergency department's patient flow process to reduce
patient flow process will be developed using the Rockwell waiting times, improve patient flow, and predict if the
Arena simulator V15. The model includes; relevant patient patient can move to the Inpatient Unit or should stay in the
flow components, such as arrival patterns, triage, ED. The effectiveness of the optimization strategies is
registration, examination, diagnosis, treatment, and evaluated by comparing the simulation results before and
discharge. The developed model will be verified to ensure after applying the strategies.
that it accurately represents the actual emergency
department's patient flow process. Different scenarios are A. Proposed Model Dataset
created to simulate various patient flow process changes, The summary statistics provided in recent research
such as changes in staffing levels, triage processes, (for instance, Graham et al., 2018) served as an inspiration
examination processes, and treatment processes. The for the data gathered for the various aspects. There are
simulation model is run using the created scenarios to created 500 patient records with six characteristics. In order
generate data on patient flow and waiting times for each to build the prediction model, patient records that were
scenario. created and sent to the ED are summarized. The produced
data's rate of admitted and non-admitted patients is
The simulation output data is analyzed using the consistent with previous research (such as Graham et al.,
random forest algorithm to identify key factors that affect 2018), which is the same dataset used in the existing system
patient flow and waiting times in the emergency and shall be use by the proposed system to justify the
department. Based on the results of the data analysis, comparison.
optimization strategies can be developed and applied to the
Step 1: Start
Step 2: Problem Identification and Data Collection
Using the same dataset as in the existing Model
Step 3: Model Development: Using the Rockwell Arena
simulator V15
Includes the relevant patient flow components, such as
arrival patterns, triage, registration, examination,
diagnosis, treatment, and discharge.
Step 4: Model Verification and Validation
To represent the actual emergency department patient
flow
Compare the simulated result with the real result,
If accurate goto to step 5 else step 3
Step 5: Scenario Creation, Such as
Staffing levels
Triage processes
Examination processes, and
Treatment processes.
Step 6: Simulation Runs: With the created Scenario
To generate data on patient flow and waiting times for
each scenario.
Step 7: Data analysis: With Random Forest Model
The Simulation data is then analyzed to identify the key
factors in the effects patient flow process to reduce
waiting time
Step 8: Optimization: Best on the result of the analysed
in step 7,
To reduce waiting time
Improve patient flow
Step 9: Evaluation; Measure the model performance
With Accuracy, Sensitivity and Specificity
Step 10: Stop
The flowchart of the proposed system is depicted in
Figure 3.3.
C. Implementation and Evaluation Metric age as input factors that affect patient waiting times. By
The proposed model is an integration of the including the statistical distributions of these processes in
Simulation model and Machine learning technique (known the DES, accurate predictions of waiting times can be
as the Random Forest Algorithm). The System requirement obtained. The RF model, in particular, has shown good
of the model consists of the requirments of the simulation performance with low Root mean square error (RMSE),
Model (i.e Rockwell Arena simulator V15) and that of the Mean Square Error (MSE), Mean Absolute Error (MAE),
Machine learning model. The model is evaluated against and high R2 values. This integration of DES and ML
existing method using Accuracy, Sensitivity and models can help overcome various factors, such as
Specificity. satisfaction, cost, and quality, in service sectors with
dynamic structures.
IV. EXPERIMENTAL SETUP AND RESULTS
RMSE, MSE, and MAE serve as customary metrics or
The study attempts to Integrate a discrete event measures employed in the evaluation of the efficacy of
simulation (DES) model with machine learning (ML) predictive model precision, particularly within the
algorithms, such as random forest (RF), which had a framework of regression analysis. These metrics or
positive effect on patient flow and waiting times in the measures effectively gauge the disparity between
emergency departments (EDs). The DES model considers anticipated values and factual values, thereby furnishing a
factors such as length of stay, resource efficiency rates, metric indicative of the model's precision and its ability to
patient genders, walking distance, time of processes, and capture the inherent patterns within the data set.
The dataset comprised two distinct types: specifically, A. The Result of the Proposed System
the categorical attributes (comprising gender, arrival day, After the triumphant execution of the Random Forest
triage x-ray, and lab) were presented in Table 1, while the Classifier to diminish the duration of waiting, and refine the
numerical attributes consisted of patient registration movement of patients in a critical care center, Figure 2
number, age, and arrival time. portrays the random forest tree of the Innovative model.
The depiction bestows a profound understanding of how
the model arrives at conclusions grounded on various
attributes, which are recorded in Table 2.
The model's exceptional sensitivity, with a value of B. Graph of the Random Forest
0.99, showcases its remarkable ability to accurately predict Figure 2 embodies the ethereal Forest Tree Model
a whopping 99% of the actual positive instances. With a within a mesmerizing graph, showcasing the graceful dance
precision of 0.86, the model impressively identifies 86% of of patients as they traverse the labyrinthine corridors of the
the instances predicted as positive, which indeed proves its ATBU Teaching Hospital. A captivating masterpiece, it
proficiency. A remarkable F1-Score of 0.92 indicates a beckons the inquisitive mind to delve deeper into its
harmonious equilibrium between precision and recall, enigmatic depths, where limitless interpretations lie in wait,
solidifying the model's prowess. Furthermore, an accuracy ready to be unraveled in the forthcoming section.
of 0.85 signifies that the model astutely predicted 85% of
the instances, making it commendable in its capabilities.
Fig 3: Showcases the Manifesto Obtained from the Graphical Arrangement of the Proposed RF Model
Fig 4: The Comparative Analysis of the Proposed System with the Existing Systems
ACKNOWLEDGMENT [12]. Oh, S. H., Park, J., Lee, S. J., Kang, S., & Mo, J.
(2022). Reinforcement learning-based expanded
We wish to appreciate the expert support of our personalized diabetes treatment recommendation
supervisors Dr. F. U. Zambuk and Dr. B. I Ya’u towards using South Korean electronic health records.
the success of this research. Expert Systems with Applications, 206, 117932.
[13]. Razavi, S., de la Hoz, E., & Akhavan-Tabatabaei,
REFERENCES R. (2021). Optimizing Patient Flow in Emergency
Departments Using Discrete Event Simulation and
[1]. Alenany, E., & Cadi, A. A. E. (2020). Modeling Deep Reinforcement Learning. International
patient flow in the emergency department using Journal of Environmental Research and Public
machine learning and simulation. arXiv preprint Health, 18(9), 4722.
arXiv:2012.01192. https://doi.org/10.3390/ijerph18094722
[2]. Elalouf, A., & Wachtel, G. (2021, December).
Queueing problems in emergency departments: a
review of practical approaches and research
methodologies. In Operations Research Forum
(Vol. 3, No. 1, p. 2). Cham: Springer International
Publishing.
[3]. Finkelstein, S. M., Wong, E., Lin, H., & Li, Y.
(2021). Reducing Patient Waiting Time in
Emergency Departments Using Reinforcement
Learning and Queueing Theory. INFORMS
Journal on Applied Analytics, 51(3), 162–179.
https://doi.org/10.1287/inte.2020.1064
[4]. Haripriya, G., Abinaya, K., Aarthi, N., & Kumar,
P. P. (2021). Random Forest Algorithms in Health
Care Sectors: A Review of Applications.
[5]. Jarvis, P. R. E. (2016). Improving emergency
department patient flow. Clinical and experimental
emergency medicine, 3(2), 63.
[6]. Khalilnejad Tabari, M., Aghajari, S., &
Salahshour, S. (2022). Reinforcement Learning for
Scheduling in Emergency Departments. In 2022
IEEE International Conference on Healthcare
Informatics (ICHI) (pp. 10-16). IEEE.
[7]. Lee, H., Lee, J., Lee, H., Lee, J., Lee, Y., & Kim,
Y. (2021). Reducing Patient Waiting Time in
Emergency Departments Using Reinforcement
Learning and Multi-Agent Systems. Applied
Sciences, 11(8), 3429.
https://doi.org/10.3390/app11083429
[8]. Li, J., Cao, W., Yang, Y., Hu, S., & Wei, S.
(2021). Data-driven optimization of emergency
department operations using machine learning
algorithms. Health Care Management Science,
24(1), 32-46.
[9]. Liu, J., Xie, J., Cheng, X., Zhang, Z., Li, X., & Li,
Z. (2022). A Novel Reinforcement Learning
Algorithm for Emergency Department Patient
Flow Optimization. Journal of Healthcare
Engineering, 2022, 1-11.
[10]. Liu, Y., Liu, X., Li, Q., Zhu, Y., Ma, J., & Wang,
Y. (2021). An intelligent triage system for an
emergency department based on machine learning
and queuing theory. Journal of Medical Systems,
45(9), 1-10.
[11]. Mahesh, B. (2020). Machine learning algorithms-a
review. International Journal of Science and
Research (IJSR). [Internet], 9, 381-386.