223 American Academic Scientific Research Journal for Engineering, Technology, and Sciences ISSN (Print) 2313-4410, ISSN (Online) 2313-4402 http://asrjetsjournal.org/ Framework for Emergency Department Management: A Proposal Based on Process Mining and Simulation Fábio Pegoraro a *, Ana Caroline Costa Marques b , Geovana Maciel Lima c , Rise Consolação Iuata Costa Rank d , Nelita Gonçalves Faria de Bessa e , Francicero Rocha Lopes f , Karine Poletto g , Samara Tatielle Monteiro Gomes h , Jaqueline Cibene Moreira Borges i , Sara Falcão de Sousa j , Renata Oliveira Coelho k , Fernanda Wanka Laus l a Dr, Industrial and Systems Engineering, Department of Medicine, University of Gurupi (UNIRG), Brazil b Graduating in Business Administration, University of Gurupi (UNIRG), Brazil c Graduating in Medicine, University of Gurupi (UNIRG), Brazil d Dr. Department of Pediatric Dentistry, University of Gurupi (UNIRG), Brazil e,f,g,h,I,j Dr. Department of Medicine, University of Gurupi (UNIRG), Brazil k Physician Specialist in Clinical Medicine,, Brazil l M.Sc. Department of Medicine, Pontifical Catholic University of Paraná (PUCPR), Brazil a Email: fabiopegoraro@unirg.edu.br, b Email: anaccmarques@unirg.edu.br, c Email: geovanamlima@unirg.edu.br, d Email: riserank@yahoo.com.br, e Email: eduambiental@unirg.edu.br, f Email: francicero@unirg.edu.br, g Email: karinepoletto@unirg.edu.br, h Email: samaratatielle@unirg.edu.br, i Email: jaqueline.jcmb@gmail.com, j Email: sarafalcao@unirg.edu.br, k Email: renataoliveiracoelho@yahoo.com.br, l Email: ferwlaus@gmail.com Abstract An emergency department (ED) face random demands from patients with different needs, which may contribute to their overcrowding. therefore, the present study designed a framework to support decision making in ED management. The framework integrates simulation techniques supported by process mining. Simulation was used in this work because it contributes to capture the randomness and complexity of patient flow in the ED and support the decision-making process. However, the data to feed a simulation model is usually collected manually from the time between patient arrivals in the ED, time for triage, interviews with experts, among others. Nevertheless, use only these collection techniques may be error-induced because they are based on human perceptions, as well as they are long. In this sense, process mining contributed to the construction of the studied ED simulation model through the discovery of the real process and the historical data of the patients registered in the event log. ------------------------------------------------------------------------ * Corresponding author. http://asrjetsjournal.org/ American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2022)Volume 85, No 1, pp 223-234 224 Through process mining, little conceptual modeling effort was used for the simulation model, which may contribute to encouraging the use of simulation in hospital environments. Keywords: Simulation; Process Mining; Emergency Department; Decision-Making. 1. Introduction In an Emergency Department (ED) of a hospital, managers live with random demands of patient health complexity. This, combined with budgetary restrictions and strong interaction between hospital processes, makes the management of emergency care capacity play a strategic role in the recovery of the patient's health. In this context, hospital managers are under pressure to improve the quality of their decisions [1, 2, 3]. The decision-making process in the management of an ED is usually complex and requires methods and techniques that can help decision makers in selecting more effective actions and that better address the problem under study. Therefore, the evaluation of an intervention in the ED management before its actual implementation is essential [4]. Thus, the ED are adhering to the simulation technique due to the ability to consider the type of stochastic arrivals for cases of critical patient health complexity. It is possible, for example, in an ED environment, to verify whether the insertion of more human resources and equipment will significantly contribute to reducing the waiting time in line to start medical care [5]. Therefore, the simulation allows the decision maker to obtain a perception of the system's behavior in relation to different possible alternatives before committing resources and efforts [6, 7]. However, it is worth noting that the simulation requires modeling efforts and the results are usually based on statistical data collected manually through traditional forms such as: documentation, observations and interviews with experts that help to understand the process in the real world. Therefore, only using these techniques for data collection can be misleading, as they are based on human perception, in addition to being time-consuming [8, 9]. In this way, to approach the simulation, knowledge of the process is inevitable. And for hospital environments equipped with Information Systems (IS), the event log, which is information readily recorded and available in these systems in a sequential way, can contribute through process mining to the construction of simulation models with little or no effort additional modeling [8]. Therefore, process mining can become an ally in the construction of simulation models mainly because it presents how the system is working and not how the specialist or manager believes it is working [10, 11, 8, 12, 13, 14, 15, 16, 17, 18]. The mining of individual processes is already widely used in the health area, and its support for the construction of simulation models is a relatively new field according to [8, 14, 9, 16, 19, 20]. Thus, this work aims to conceive a Framework that addresses the simulation supported by the process mining to meet the management of the process of care and treatment of patients in ED units. The Framework was applied in a University Hospital (UH), located in the city of Curitiba, State of Paraná, Brazil. 2. Proposed Framework The approach is focused on carrying out the simulation supported by the process mining as shown in Figure 1. However, as it is a semi-automatic model, it is necessary to obtain support from the specialists of the patient care and treatment process through interviews that will give support for the construction and validation of the process model (conceptual model) and the computational simulation model. American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2022)Volume 85, No 1, pp 223-234 225 Figure 1: Proposed Framework. Concurrent with the interviews with specialists, the process mining actually begins. Patient data are recorded and stored in the Hospital Information Systems (HIS) and, from this data, an event log is designed, which needs to contain some information described as per Table 3. Table 3: Example of event log on a ED. Type of Information Information recorded in the log Patient information Identification (case ID), name, address, date of birth Hospital Hospital name Events Symptoms, arrival at the hospital, transport, triage, examination, discharge. Timestamp Start and end date and time of each event in the log eg start 05/20/2021 10:00 am, end 05/20/2021 10:35 am Transport Bus, samu/fire brigade, private ambulance, own vehicle, others. Resources Nurses, physicians, surgeons, managers patient conditions Blood pressure, temperature, oxygenation level. patient history Smoking, alcoholism etc. Triage color/treatment complexity Red, orange, yellow, green, blue Source: Adapted from [21]. In order to carry out the process mining, in this study, at least two steps must be followed. In the first, it is necessary to verify the quality of the data, eliminating noise and cases of incomplete patient care. Afterwards, with the data organized, it is exported to a process mining software. In the second stage, process mining algorithms are used in order to discover the process model that represents the best behavior of the actual process of care and treatment of patients in the ED. American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2022)Volume 85, No 1, pp 223-234 226 Thus, the process mining will provide information such as: discovery of the real process model, which in this case, will support the conceptual simulation model design. Historical data on the times between patient arrivals in the ED, time to perform patient triage, etc., are also provided by the process mining. These data will be used to identify statistical distributions to feed the simulation model. In this first moment of this research, the proposed Framework only attends patients who seek care at the ED on a voluntary basis (they arrive walking). In this model, patients arriving at the ED via land or air ambulances were not considered. 3. Application of the Framework The Framework was applied in an ED of a UH, in the city of Curitiba, State of Paraná. The UH is a reference in the care of medical urgencies and emergencies and caters exclusively to patients who have agreements with the Unified Health System (Sistema Único de Saúde - SUS), which institutes the incentive for hospital units that have the nature of legal entities governed by private non-profit law and that allocate the integrality of its services exclusively to SUS. This study was motivated by the fact that, according to the directors and specialists at the UH, the ED has been facing problems with overcrowding, long patient length of stay in the ED and long waiting lines. These problems can occur due to the lack of professionals (physicians, nurses, etc.), infrastructure that does not support the demand of patients and the lack of adequate management of available resources, which compromises the quality of care and treatment for the patient, and for its instead, on the efficiency of the ED. Faced with this situation, the board finds it difficult to conceive actions for improvement and decision- making that lead to better performance in the management of the care and treatment process for patients. In this way, the present Framework was made. Data were obtained through the HIS in August, 2021, and represent the care of 2701 patients, which comprise only the patient care in the department of reception and patient triage. These data were made available by the UH triage department in Comma Separated Values (CSV) format, which were organized for the construction of the event log in Microsoft Excel®. Then, the event log containing patient data was exported to the Disco® software to perform the process mining, as shown in Figure 2. American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2022)Volume 85, No 1, pp 223-234 227 Figure 2: Event log exported to Disco®. After organizing the event log, with the Fuzzy Miner process mining algorithm , it was possible to discover the real model of patient care, as shown in Figure 3. A simple causal network was defined, which represents the activities and relationships of the process patient care upon arrival at the ED, registration and triage. Thus, the main process is represented by the activities that are linked by the arcs evidenced by the thicker arrows that consist of: The numbers in parentheses signify the number of patients transitioning from one activity to another. Thus, it is worth noting that, in the Triage, patients can be directed to other activities without being registered, such as: "Guided to seek the UPA (Emergency Care Unit) (Unidade de Pronto Atendimento) or UBS (Basic Health Unit) (Unidade Básica de Saúde)", "Guided Mother, seek care at the HPP (Little Prince Hospital)", "Emergency care (which in this case are the patients identified in the triage who are in a state of urgency and emergency)", "Oriented to seek hospital of origin" and "Oriented to seek hospital of reference". 77 patients are also leaving the ED unattended (Triage password → End (77)). Figure 3: Model of the real process discovered by process mining. American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2022)Volume 85, No 1, pp 223-234 228 From the definition of the real model of patient care supported by process mining, and through interviews with experts, the conceptual model of simulation of the UH ED was obtained, which represents the sequence of activities of patients who arrive alone, as shown in Figure 4. In the UH ED there are two distinct forms of patient arrival. One is characterized by patients who are considered "emergency patients" and arrive via land or air ambulances and which was not considered in this work. The other way, the patient comes walking alone or accompanied to the ED voluntarily. The flow of activities in the care process for the patient who arrives walking to the ED (looks for the ED voluntarily) follows as follows: The patient arrives, goes to the reception and removes a password and waits in a waiting room to be screened. When the patient's password is called, which depends on the availability of the triage team, the patient goes to a room where he is evaluated by a triage nurse. Based on the patient's health condition through the assessment by the triage nurse, each patient receives a priority in care in the ED according to the Manchester Triage System (MTS) or Manchester Protocol. Once the priority is assigned to the patient, and noting a high priority (Red or Orange), he is already admitted to the ED resuscitation room where the physicians perform the first procedures. Otherwise (Yellow, Green or Blue) the patient goes to the reception to register. After registration, the patient waits in a waiting room until a physician is available in an appropriate treatment area based on each patient's care needs, ie. the patient screened in yellow has priority over green and green takes precedence over blue. Figure 4: Conceptual model of the UH ED. Thus, Table 1 presents the risk rating for patients who arrive alone at the ED, as well as the appropriate times for the beginning of medical treatment from the moment of the patient's admission to the ED, according to the MTS. It is noteworthy that the data in Table 1 were obtained through process mining together with the knowledge of specialists to validate this information. American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2022)Volume 85, No 1, pp 223-234 229 Table 1: Risk classification for patients treated in the ED and times for care defined by the MTS. The analysis of data obtained through process mining is used to identify the most appropriate statistical distributions to represent the randomness of the data, as the timestamps with the start and end date and time of each event are recorded in the event log. As an example, we used the arrival rates of patients arriving alone at the ED. One rate comprises the time between 7:00am to 11:00pm (see Figure 5a) and the other rate is between 11:00pm and 7:00am (see Figure 5b). Arrival rates were divided to more adequately represent the random phenomenon among patients' arrivals in the ED, which were determined and validated by the Kolmogorov Smirnov (KS) adherence test, with a significance level of 5%. Thus, the rate of patients entering the ED between 7:00am and 11:00pm follows an exponential distribution with an average time of 4.14 minutes represented by the expression E (4,14). Those arriving between 11:00pm and 7:00am follow a lognormal distribution with the lowest allowed value of 10 minutes, mean of 3.78 minutes and variance of 1.05 minutes represented by the expression 10. + L (3.78.1 .05). Figure 5a: Arrivals rate (7:00am - 11:00pm). Figure 5b: Arrivals rate (23:00h - 07:00h). The computational simulation model was built using the ProModel® software with the MedModel graphic library that presents forms that are friendly to the healthcare environment, as shown in Figure 6. The computational simulation model used to test the improvement actions is of the discrete type because it exists specific times in certain situations in ED. Computer simulation is also characterized as non-finite and stochastic because the UH ED works 24 hours a day, seven days a week and the simulation model receives random data as input, respectively. The simulation warm-up time was 24 hours, which was also the time chosen to simulate the UH ED and be able to buy the simulated results with real results as a form of model validation. To represent a Color of classification Percentage of patients serviced Waiting times established by MTS Green 63.87% 120 min Yellow 20.76% 60 min Blue 13.67% 240 min Orange 1.66% 10 min Red 0.04% 0 min Total 100% American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2022)Volume 85, No 1, pp 223-234 230 95% confidence in the simulation model, it was replicated 33 times. Statfit software was used to model the statistical distributions and verify the number of replications of the simulation model to represent a 95% confidence. Figure 6: Computer simulation model layout. The validation of the simulation model was conceived based on formal meeting with the ED managers. To this end, the output of the simulation model was compared with the output of the real system under similar conditions. For this, it was used as a criterion to evaluate the waiting time for the beginning of patient triage and the length of stay of the patient in the ED, as shown in Graph1. After evaluating Graph 1, the computational model was validated as being adequate to represent the process of care and treatment of patients in the UH ED. Figure 7: Validation of simulation results. Based on the results of the simulation model that represents the real scenario (AS-IS scenario) of the HU ED, two more scenarios that test improvement actions defined by the process specialists were derived as shown in Table 4. American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2022)Volume 85, No 1, pp 223-234 231 Table 4: Improvement actions (Scenarios) tested by the simulation. Scenarios Tested improvement actions Scenario 1 Increase a nurse and a triage room at times of greater demand for care Scenario 2 Scenario 1 and one more physician to meet the demand of blue and green patients 4. Results The improvement actions tested via simulation met the period of greatest demand from patients in the ED, which comprises the period between 07:00am and 11:00pm, as shown in Table 2. The actions generated significant effects, reducing the average waiting time for triage from 24.93 min to 1.3 min. The nurse's use rate decreased from 83.09% to 41.75%, as well as a significant reduction in the use of the triage room from 83.09% to 45.67%. This reduction in the use of nurses' human resources can trigger a more favorable work environment, as they will not be overloaded. The use of the waiting room for triage and the number of patients waiting to be screened also significantly reduced from 80.12% to 12.5% and 6 patients to 1 patient, respectively. It was evidenced that scenario 1 concatenated with the addition of 1 physician, which represents scenario 2, brings significant changes to the ED. The mean waiting time for the beginning of medical care and the mean length of stay of the patient in the ED was reduced from 125.86 min and 135.95 min to 63.35 min and 73.05 min, respectively, and with a reduction of patients in the waiting room from 30 to 15 patients. Considering that the MTS recommends less urgent and non-urgent patient care in up to 120 min and 240 min respectively, this scenario is extremely favorable to the ED. Table 2: Effects generated with the simulated improvement actions. Effects AS-IS Scene 1 Scenario 2 Average waiting time for triage (7:00 am - 11:00 pm) (min) 24.93 1.3 1.3 Average waiting time for triage (11:00 pm - 7:00 am) (min) 0 0 0 Nurse usage rate (7:00 am - 11:00 pm) 83.09% 41.75% 41.75% Nurse usage rate (11:00 pm - 7:00 am) 25.47% 25.47% 25.47% Triage room usage rate (7:00 am - 11:00 pm) 83.09% 45.67% 45.67% Triage room usage rate (11:00 pm - 7:00 am) 25.47% 25.47% 25.47% Triage room occupancy (7:00 am - 11:00 pm) 80.12% 12.50% 12.50% Triage room occupancy (11:00 pm - 7:00 am) 0% 0% 0% Average number of patients in the triage room (7:00 am - 11:00 pm) 6 1 1 Average number of patients in the triage room (11:00 pm - 7:00 am) 0 0 0 Waiting room usage rate (7:00 am - 11:00 pm) 100% 100% 100% Waiting room usage rate (11:00 pm - 7:00 am) 97.15% 97.15% 97.15% Average waiting time in the waiting room (7:00 am - 11:00 pm) (min) 125.86 125.86 63.35 Average waiting time in the waiting room (23:00h - 07:00h) (min) 25.44 25.44 25.44 Average number of patients in the waiting room (7:00 am - 11:00 pm) 30 30 15 Average number of patients in the waiting room (11:00 pm - 7:00 am) two two two Average length of stay in the ED (7:00 am - 11:00 pm) (min) 135.95 135.95 73.05 Average length of stay in the ED (23:00h - 07:00h) (min) 34.95 34.95 34.95 American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2022)Volume 85, No 1, pp 223-234 232 5. Conclusions and future work Process mining proved to be a satisfactory technique to support the construction of the simulation model, since it captured through the information available in the event log, how the service and treatment process in the UH ED is being executed. By understanding the execution of the process, the conception of the conceptual simulation model was facilitated, with little intervention from process specialists at this stage. From the data of patients registered in the HIS, process mining was relevant to identify the statistical distributions of random phenomena, avoiding manual collection, that is, by timing the times between patient arrivals in the ED, detached time to carry out the triage etc. Therefore, it facilitated the analysis of random phenomena at different times of the day, which can make the simulation model more realistic. In turn, through simulation, it was possible to carry out experiments and compare the improvement actions before implementing them in practice, which contributed so that the experiments that were carried out did not interfere in the daily operation of the ED. It is noteworthy that the proposed Framework was well received and accepted by specialists in the management of the care process and treatment of patients in the UH ED, as being a useful tool to aid in decision-making on the implementation of improvement actions. Therefore, further study opportunities are offered with this Framework. In this sense, it was recommended by specialists to model other processes of hospital units at the UH that affect the flow of patients, such as emergency arrivals and the processes of elective surgeries performed by the UH. Acknowledgements We would like to thank the UNIRG Foundation for the financial support through the scientific initiation scholarship. References [1]. H. Eskandari, M. Riyahifard, S. Khosravi, C. D. Geiger. Improving the emergency department performance using simulation and MCDM methods. In Proceedings of the 2011 winter simulation conference (WSC), IEEE, 2011, pp. 1211-1222. [2]. L. Vanbrabant, K. Braekers, K. Ramaekers, I. Van Nieuwenhuyse, I. Simulation of emergency department operations: A comprehensive review of KPIs and operational improvements. Computers & Industrial Engineering, 131, pp. 356-381, 2019. [3]. F. Pegoraro, E. A. P. Santos, E. D. F. R. Loures. A support framework for decision making in emergency department management. Computers & Industrial Engineering, 146, 106477, 2020. [4]. A. AROUA, G. ABDULNOUR, Optimization of the emergency department in hospitals using simulation and experimental design: Case study. In: Simulation Conference (WSC), 2017 Winter. IEEE, American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2022)Volume 85, No 1, pp 223-234 233 2017, pp.4511-4513. [5]. F. Pegoraro, E. A. P. Santos, E. D. F. R. Loures, F. W. Laus. A hybrid model to support decision making in emergency department management. Knowledge-Based Systems, 203, 106148, 2020. [6]. P. BOCCIARELLI, A. D'AMBROGIO, A. GIGLIO, E. PAGLIA. Simulation-Based Performance And Reliability Analysis Of Business Processes. In: Proceedings Of The 2014 Winter Simulation Conference, Piscataway, Nj, Usa. IEEE Press, 2014, pp. 3012-3023. [7]. P. LAJOIE, J, GAUDREAULT, V. LAVOIE, J. KENDALL. Using Simulation To Assess The Performance Of A Breakthrough Wood-Drying Technology. In: Proceedings Of The 2014 Winter Simulation Conference: Piscataway, Nj, Usa. IEEE Press, 2014, pp. 4158–4159 [8]. A. ROZINAT, M. T. WYNN, W. M. P. VAN DER AALST, A. H. TER HOFSTEDE, C. J. FIDGE. Workflow simulation for operational decision support. Data & Knowledge Engineering, vol. 68(9), pp 834-850, 2009. [9]. A. ROZINAT, R. S, MANS, M. SONG, W. M. P VAN DER AALST. Discovering simulation models. Information systems, vol. 34(3), pp. 305-327, 2009. [10]. R. S. MANS, W. M. P, VAN DER AALST, R. J. B, VANWERSCH. Process mining in healthcare: evaluating and exploiting operational healthcare processes. Heidelberg: Springer, 2015. [11]. H. A. REIJERS, W. M. P, VAN DER AALST. Short-term simulation: bridging the gap between operational control and strategic decision making. In Proceedings of the IASTED International Conference on Modeling and Simulation, 1999, pp. 417-421. [12]. M. ROVANI, F. M. MAGGI, M. Leoni, W. M. P. VAN DER AALST. Declarative process mining in healthcare. Expert Systems with Applications, vol. 42(23), pp. 9236-9251, 2015. [13]. W. M. P. VAN DER AALST, Process Mining – discovery, conformance and enhancement of business processes. Springer, 2011. [14]. I. KHODYREV, S. POPOVA. Discrete modeling and simulation of business processes using event logs. Procedia Computer Science, 2014, pp. 322-331. [15]. A. ROZINAT, M. WYNN, W. M. P. VAN DER AALST, A. H. TER HOFSTEDE, C. J. FIDGE. Workflow simulation for operational decision support using design, historic and state information. In International Conference on Business Process Management. Springer, Berlin, Heidelberg, 2008, pp. 196-211. [16]. M. T WYNN, M. DUMAS, C. J. FIDGE, A. H. TER HOFSTEDE, W. M. P. VAN DER AALST. Business process simulation for operational decision support. In International Conference on Business American Academic Scientific Research Journal for Engineering, Technology, and Sciences (ASRJETS) (2022)Volume 85, No 1, pp 223-234 234 Process Management. Springer, Berlin, Heidelberg. 2007, pp. 66-77. [17]. W. ABO-HAMAD, A. RAMY, ARISHA. A hybrid process-mining approach for simulation modeling. In: Simulation Conference (WSC), Winter. IEEE, 2017. pp. 1527-1538. [18]. F. PEGORARO, E. A. P. SANTOS, E. F. R. LOURES, G. DA SILVA DIAS, G. L. M. DOS SANTOS, R. O. COELHO. Short-Term Simulation in Healthcare Management with Support of the Process Mining. In: World Conference on Information Systems and Technologies, Springer, Cham, 2018, pp. 724-735. [19]. V. AUGUSTO, X. XIE, M. PRODEL, B. JOUANETON, L. LAMARSALLE. Evaluation of discovered clinical pathways using process mining and joint agent-based discrete-event simulation. In Proceedings of the 2016 Winter Simulation Conference, IEEE Press, 2016, pp. 2135- 2146. [20]. J. NAKATUMBA, M. WESTERGAARD, W. M. P. VAN DER AALST. Generating event logs with workload-dependent speeds from simulation models. In: International Conference on Advanced Information Systems Engineering. Springer, Berlin, Heidelberg, 2012, pp. 383-397. [21]. C. ALVAREZ, E. ROJAS, M. ARIAS, J. MUNOZ-GAMA, M. SEPÚLVEDA, V. HERSKOVIC, D. CAPURRO. Discovering role interaction models in the Emergency Room using Process Mining. Journal of biomedical informatics, vol. 78, pp. 60-77, 2018.