Simulation Modeling for Evaluation of the Patients’ Queue System Performance at Emergency Department

Background: The aim of this article is to develop a metamodel using a simulation-based approach to analyze the performance of the Patients’ Queue system of the emergency department. Methods: In this study, the variables affecting on resource efficiency were identified and analyzed using inferential statistics and then one-way ANOVA to estimate the effects of effective factors. Furthermore, the ED performance was simulated using Visual Paradigm software. Then, the results obtained from the implementation of the simulation model were considered as the input of the experimental design. Results: The findings indicate that the non-linear regression model could predict the length of the queue. Also, this model, according to acceptable parameters, can be used to predict the dependent variable. Conclusion: Therefore, the minimum value of queue length based on the developed model is obtained when the minimum length of the queue is obtained when the number of ED secretaries is at a high level and the number of paramedics and nurses is at a low level. Trial registration:


1-Background
Hospitals are considered as one of the key units in the health care system which play an important role in providing health care and therapeutic services. Normally, 50-80% of public health budgets are spent on hospitals. The decisions related to emergency department resources is always regarded as an important activity due to the vital impact of the emergency department on the health of individuals in the community which has a significant impact on the performance of the department (1). The emergency department is of great importance as the heart of the hospital and is considered as one of the first points of contact for patients in the health care system. This department has an important and sensitive place in the health care system due to the need for fast, effective quality care and its numerous and complex processes. Its proper management and organization of processes today is considered as one of the most important priorities of the Ministry of Health.
Therefore, planning to find the strengths and weaknesses of improving the quality of emergency department through reviewing and analyzing its performance are considered as the important and valuable issues. Each wrong decision has irreparable consequences for the quality of services provided to patients. Therefore, the decision-maker should properly analyze the hospital system and resources, and then allocate them effectively. Such analysis is not easy in a system like the emergency department as the behavior of such an environment is random and the behavior of this system is time-dependent i.e. major changes in patient admission and service rates are observed over time. The process of using the emergency department as the main point of entry into the hospitals increased in recent years due to the significant growth of demand for various reasons such as population growth, leading to dissatisfaction among the clients (2)(3)(4)(5).
However, people's dissatisfaction with the hospital service despite their high capacities and costs and the increasing demand for health and treatment forced the related managers to reduce costs and increase efficiency and productivity by optimally allocating resources. Therefore, customer satisfaction is considered as one of the main and acceptable advantages in the service sectors (6)(7)(8)(9).
In addition, the enactment of state laws in countries, especially in Iran, based on the 2025 vision plan and the declaration of the second phase of the revolution in Iran, which is becoming a model country in the region, requires the health system to supply high-quality services to patients in the shortest possible time. Therefore, the combined service providers and scarce resources in the field of health in different parts of these centers to determine the desired performance criteria under certain conditions and restrictions are considered as an important issue which is considered by researchers in the field of optimal management of health centers to improve the current situation (10).
The simulation model, mathematical programming, and statistics are considered as the most important instruments for managers to analyze the system. Researchers and specialists use these instruments to dynamically analyze the system without interrupting the system operation (11)(12)(13).
Further, integrating real-world simulation models with designing experiment models is considered as a major challenge for a large number of professionals, researchers, and managers (14)(15)(16)(17)(18). The experiment design is used as a valuable set of mathematical techniques to statistically model and systematically analyze a problem with the desired response to optimize variables. This statistical technique is used to predict the model and evaluate the acceptable effects of queue system factors when integrated with the simulation (19).
A simulation-based experiment design model is beneficial for evaluating the performance of the emergency department queue system because making decisions at high levels of management in the service sectors is first considered as a serious challenge. Second, the performance of department services is affected by time, cost, and personnel constraints. Third, using various optimization process tools interrupts system operations (20)(21)(22).
The experiment design is considered as a mathematical, statistical, and systematic technique used to determine the relationship between the effects of factorial process and their output, i.e. it is used to identify the causality and distinguish between parameters which are impossible to determine. It is necessary to analyze the results of experiment design on the input management to optimize output. Cheng and Kleinen (2000) implemented an optimization model for experiment design. This model was implemented to solve the problem of deviation in refracting the manufacturing system process (23). Tsai (2002) evaluated and optimized the operation of the production system in steel plant in Taiwan through experiment design and simulation. He found that this approach can simultaneously evaluate and optimize the operational status in the multifunction systems (24). Ken Further, this method was implemented in semiconductor manufacturing systems and the total queue time was evaluated based on a set of designed data according to six basic performance criteria of manufacturing time (14). Daktova et al. (2019) simulated the queue system in the post office to optimize the costs. The queue system model was based on event-customer and customer service termination. In the simulation system, the minimum number of service counters was determined according to the conditions of the system, leading to saving and optimizing the system (26).
Based on the literature review, it is necessary to apply an integrated experiment design and simulation approach for analyzing the queue system on patient services. Therefore, experiment design and simulation-based integrated model for analyzing and optimizing the emergency department queue system was introduced by considering different scenarios to help managers evaluate the organization efficiency which mainly aimed to analyze the performance of the queue system to optimize the best combination of emergency department resources to reduce the queue length of the patient's admission. Therefore, a new idea was introduced by computer simulation to survey different scenarios and experiment design was introduced as the input of the simulation model.

2-Method
The present descriptive and analytical study was conducted in the first six months in 2017. The To validate the model, the absolute relative error value in different parts of the emergency department was calculated. The accuracy and validity of the simulated model can be predicted if this value is less than 5% (confidence interval). The results of ANOVA validation statistical tests and estimating the p-value criterion in Table 1, which was collected for quasi-model of the regression response level with different effects, indicated that the quasi-model with three different effects is selected as a candidate model as highlighted. Therefore, these types of patients need to receive services when they enter the emergency department. In addition, this department is considered in the process-based simulation due to the importance of resource planning to reduce the queue in the intensive-care unit. These key variables are identified through theoretical resources in the health literature (27). The ED in this study consists of one community health worker, two receptionists, three nurses, one cardiologist, and seven beds (5). In Table 2, Predetermined Parameter for each variable which were determined by managerial consideration are illustrated. About 40% of patients of this ED have heart problems and they should receive their services as soon as possible (27). Therefore, these types of patients need to receive medical treatment as soon as they enter the ward. Also, since resource planning (in order to reduce the queue) in the intensive care unit is also important, this sector is also

3-Findings
First, it is necessary to ensure the accuracy of the model. Therefore, the amount of deviation in the simulation and actual values of the system was calculated by generating simulated data and extracting the patients' archive data. Table 3 indicates the mean deviation of five simulation iterations for patient admission time as 1.136% (less than 5% of the allowable error). Therefore, the validity of the simulation model is acceptable. The results obtained from the simulation model were used for analyzing the experiment design which was used to build the model, analyze and optimize the performance of the emergency department. A complete factorial design with two levels (top and bottom) was used to determine the effects of queue length and patient admission parameters for the key factors in this department. Table 3 indicates the paramedics, emergency secretary, nurse, cardiologist and hospital bed along with their levels. The queue response level variable was measured after each experiment. Each experiment was repeated five times to verify the validity of the collected data and the mean replications were considered as the response level variable for the queue length.  Table 4 indicates the complete factorial design and the length of the queue measured in each experiment as the response variable. Only acceptable effects were identified in the model based on the auto-select feature of Design Expert Software. Then, the statistical analysis was performed for each effect. Table 5 indicates the results of the statistical analysis of the emergency department queue length. Since > is less than 0.05 according to the results of one-way analysis of variance, the estimated model is acceptable for the queue length, i.e. only the effect of paramedic variable ( 1 ) is acceptable among the main effects, unlike the other ones. However, since the objective was to determine the optimal value of these variables, which is considered as a decision variable, other main effects were deliberately considered in the final model. The two-way effects 2 4 , 3 5 , the three-way effects  In addition, there is a nonlinear relationship among the queue length factors. Therefore, the multiple regression equation for the experiment design was adjusted, and the 2 and PRESS statistics were reported to be optimal. Equation (1) shows the estimated acceptable factors along with the sentences and their coefficients. y = 4.78 + 1.38X 1 − 0.41X 2 + 0.22X 3 + 0.094X 4 + 0.53X 5 + 0.91X 2 X 4 + 1.22X 3 X 5 − 0.84X 2 X 3 X 5 − 1.09X 1 X 2 X 4 X 5 (1) Figure 2 displays the normal probability of residuals for the response level of the queue length.
Accordingly, the residuals are generally located around the right line, indicating a normal distribution error. Figure 3 shows the predictive points of the residuals. Accordingly, the data do not follow any specific pattern. Figure 4 shows the dependent variable of the estimated model, in which the optimal value of the queue length is 3~875.2 when the secretary factor is at its highest level. As the optimal resource values are replaced by the current conditions in the current system,    the data envelopment analysis in the emergency department of a public hospital in Jordan to determine the best distribution of nurses, increase their effective use and reduce the patients' waiting time (29). Further, Ahmed and Al-Khamis (2009) introduced a meta-heuristic method as a decision-making support tool for optimal resource allocation at a public hospital in Kuwait, resulting in improving the patients' waiting time (30).
One of the strengths of the present study is the researchers' efforts to analyze the emergency department using powerful simulation and experiment design instruments after identifying the factors influencing the waiting queue. Since simulation and statistical analysis are considered as the most important instruments which help managers analyze the system, creating integration between simulation and performing statistical analysis is always considered as a major challenge for the managers. The experiment design can evaluate the effective factors in a system well through performing related statistical analyses. Therefore, a simulation-based experiment design model can be useful for achieving the goal of evaluating the system performance such as a queue system in the emergency department. However, no matter how powerful the simulation instrument is, it is not considered as an optimization instrument to determine the exact amount of variables, and the approximate value of the variables is specified only with the experiment design tools.

5-Conclusion
The performance analysis of the emergency department queue system was conducted through simulation and experiment design. According to the proposed framework, the current system operations, layouts, and other constraints are unchangeable due to the integration between the simulation and experiment design. The proposed approach was used to determine the effect of the number of paramedics, secretaries, nurses, cardiologists and hospital beds on the waiting queue of those referred to the emergency department and accelerating the process of serving patients following reducing the queue length. Therefore, the simulation model of the emergency department was first developed and then the obtained data were used as an input in the experiment design. It was found that the factors affecting the queue length were identified and determined through the acceptable factors of the nonlinear regression model for the queue length. This nonlinear regression model can be used with good accuracy to predict the dependent variable (queue). The regression model is valid and reliable since the amount of obtained p is trivial. The reason why the validity of the regression model is high is that the deviation in the simulation values and the real system is low. According to the developed model, the lowest queue length is obtained when the number of emergency secretary factors is at the top level and paramedics and nurses is at their lowest level (Figure 4), leading to a reduction in the costs and time of providing services to patients. Considering what mentioned above and that the emergency department and its related costs play a vital role in patients and the system operating costs, the results of this optimization approach can be provided to hospital managers to redesign and control the admission process to increase productivity until the patient is discharged from the emergency department.
It is worth noting that the effect of uncontrollable variables such as human error is overlooked in simulating and developing the mathematical model. Therefore, it is recommended that this framework be used when there are uncontrollable variables as the main idea for future research. In addition, the mathematical problem be developed through applying managerial constraints such as cost to determine the exact value of all variables.

7-Acknowledgement
The authors would like to thank all of the individuals involved in data collection, field monitoring, and data analysis for this study. The authors also thank the managers and staff of Tehran's Modarres Emergency Department for their participation in this study and for gathering the necessary information, for survey feedback, and for overall help with the study.

Ethics approval and consent to participate
The ethical committee board of Tehran's Modarres Emergency Department has approved the proposal of this research. We asked for the informants' and respondents' informed consent after explaining the research. The necessity for obtaining informed consent was waived by the ethical committee board of Tehran's Modarres Emergency Department, due to the complete anonymity of the study data. Therefore, study data was in no way traceable to individuals.

Consent for publication
Not applicable.

Availability of data and materials
The datasets used and/or analyzed during the current study available from the corresponding author (A.B) on reasonable request. Figure 1 Patient simulated ow in the ED Figure 2 The normal probability of residuals Cube display of queue length