Received December 12, 2019, accepted December 18, 2019, date of publication December 30, 2019, date of current version January 15, 2020. Digital Object Identifier 10.1109/ACCESS.2019.2963049 An Intelligent Scheduling of Non-Critical Patients Admission for Emergency Department EVA BRUBALLA 1, ALVARO WONG 2, DOLORES REXACHS 2, AND EMILIO LUQUE 2 1 Escoles Universitaries Gimbernat (EUG), Computer Science School, Universitat Autonoma de Barcelona, 08193 Barcelona, Spain 2 Computer Architecture and Operating Systems Department, Universitat Autonoma de Barcelona Campus Bellaterra, 08193 Barcelona, Spain Corresponding author: Alvaro Wong (alvaro.wong@uab.es) This work was supported in part by the Agencia Estatal de Investigacion (AEI), Spain, in part by the Fondo Europeo de desarrollo Regional (FEDER) UE under Contract TIN2017-84875-P, and in part by a research collaboration agreement with the Fundacio Escoles Universities Gimbernat (EUG). ABSTRACT The combination of the progressive growth of an aging population, increased life expectancy and a greater number of chronic diseases all contribute significantly to the growing demand for emergency medical care, and thus, causing saturation in Emergency Departments (EDs). This saturation is usually due to the admission of non-urgent patients, who constitute a high percentage of patients in an ED. The Agent- based Model (ABM) is one of the most important tools that helps to study complex systems and explores the emergent behavior of this type of department. Its simulation more accurately reflects the complexity of the operation of real systems. Our proposal is the design of an ABM to schedule the access of these non- critical patients into an ED, which can be useful for the service management dealing with the actual growing demand for emergency care. We suppose that a relocation of these non-critical patients within the expected input pattern, provided initially by historical records, enables a reduction in waiting time for all patients, and therefore, it will lead to an improvement in the quality of service. It would also allow us to avoid long waiting times. This research offers the availability of relevant knowledge for Emergency Department managers in order to help them make decisions to improve the quality of the service, in anticipation of the expected growing demand of the service in the very near future. INDEX TERMS Agent-based modeling and simulation (ABMS), Emergency Department (ED), response capacity, decision support systems (SDS), length of stay (LoS). I. INTRODUCTION the patient enters until they are discharged, which is called Currently, the demand for emergency medical care is increas- Length of Stay (LoS). This is the most accepted parameter ing and therefore, a hospital’s management of Emergency in the literature, being used as an indicator of service quality. Departments (EDs) becomes more important. In particular, The aforementioned point of saturation can trigger a general one of the most important issues to deal with is the number discontentment among patients, including the feeling of being of patients who enter the service daily. This is becoming a abandoned without care, limited access to emergency care major problem in EDs worldwide, since it requires the use of and an increase in patient mortality [3]. a large amount of resources, both human and material, which One of the most complex areas of the hospital is the ED unfortunately are often very limited. In addition to the above, due to the dynamism and variability of the healthcare as well it should be stressed that the degree of coordination between as the attention times.The operation of the service is the result these resources must be very high [1]. The main consequence of the interaction among the elements (agents) of which it is of this situation is that the increase in the number of patients composed. The modeling and simulation of these systems, entering the service is at saturation point [2]. such as an ED, is one of the most powerful tools for their The result of this is that there has been an increase in the characterization. The simulation provides a better knowledge total time a patient spends in the service, from the moment of their operation and it can assist decision-making to set up techniques for an optimal system operation [4], [5]. The associate editor coordinating the review of this manuscript and The ultimate objective of modeling and simulating a real approving it for publication was Rashid Mehmood . system is to know more or find additional information This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see http://creativecommons.org/licenses/by/4.0/ VOLUME 8, 2020 9209 E. Bruballa et al.: Intelligent Scheduling of Non-Critical Patients Admission for ED about it. It is possible to achieve this through inference pro- records. The analytical model provides a way to measure the cesses in the system’s variables of interest to make predictions responsiveness of the healthcare staff, which will be used as about the behavior of these variables under different condi- a reference to carry out patient relocation. We validated the tions, based on the information obtained from the new data efficacy of the scheduling model based on the information generated [6], [7]. from the actual records from Tauli Hospital and using the In previous studies, we developed an ED simulator based simulation to evaluate the results of its implementation. on an Agent-Based Modeling (ABM). The ED simulator has The described research contributions offer the ED man- been validated within our research group in collaboration agers new knowledge about the behavior of the service, which with Tauli Hospital, Sabadell. This hospital is one of the may be relevant in decision-making, and of great interest with most important in Spain, attending over 160,000 patients per regards to the improvement of service quality, taking into year. The model developed describes the behavior of ED account the expected growth in demand of the service in the services from the interactions between agents, as well as very near future. their interaction with the physical environment. It has been The paper is organized as follows: Section 2 presents the developed in NetLogo, a multi-agent programmable model- research objectives. In Section 3 we describe the related ing environment for complex systems [8], [9]. works. Section 4 gives a description of the main features Based on historical records of non-critical patients from of the ED and the simulator’s capabilities. In Section 5 we Tauli Hospital, these types of patients do not require urgent describe the analytical model for the calculation of the attention and they represent a high percentage of the patients. response capacity in the ED. Section 6 describes the It has been observed that saturation in the ED service is scheduling model for non-critical patients’ admission. mostly due to the admission of these patients [10]. In Section 7 we present the experimental results. Finally, We propose scheduling policies for the entry pattern Section 8 closes the paper with our conclusions. of non-critical patients consisting of relocation. From the patients expected arrival time in the input pattern, initially II. RESEARCH OBJECTIVES predicted by the historical records, this relocation will pro- The overall objective of the research we propose is to develop vide an improvement in the waiting time affecting all patients, a methodology that enables us to enhance the best of attention and therefore, an improvement in service quality from the provided in a medical ED, with a view to lessening an affected point of view of the patient. person’s length of stay inside the service, via a model for The simulator is used as an evaluation tool of the result of programming the admission of non-critical patients within the application of the proposed model. In fact, simulation is the service. the only way to generate as much data as we want correspond- We outline this objective in the following specific ing to different situations generated by the application of objectives: the model, regarding the scheduled input of patients into the • Set suitable indicators of system behavior which allow system and the healthcare staff configuration. The analysis us to assess the impact of the proposed model. of this data is the way to show the improvement achieved. • Typify the system in line with the demand for attention It would not be feasible to validate the model for the different at every moment and for each viable situation. Decide on possible situations in the real system. This is the main reason the responsiveness of the healthcare staff configuration why we use simulation to obtain the necessary information in relation to this particular demand. for the model validation. • Develop a system to permit programming the admission As a first contribution of our research, we have developed of non-critical patients into the service, consistent with an analytical model [10], [11] to compute the throughput of attention capacity, and analyze the effect produced on the healthcare staff in an ED service, which is defined as the the quality of the service based on patients’ length of number of patients it can attend to per unit of time. The goal stay prediction obtained by using simulation. of the analytical model is to use the theoretical throughput We will be able to analyze the effect of the model’s appli- as an index to evaluate the responsive capacity of the Staff, cation, and corroborate its effectiveness, based on the values taking into account the configuration of the staff (admission of the defined indicators or different variables of interest such and triage staff, number of doctors and nurses), and patient as patients’ length of stay inside the service, calculated from flow throughout the ED. The analytical model is based on a the data generated by ED simulation. set of equations which takes into account not only the number of personnel, but also their level of experience and the care III. RELATED WORKS provided (additional tests or treatments). This model has also In the related literature there are studies which propose been validated by analysis based on records generated by reducing the LoS, and therefore, the time that the patient simulation of the real ED. is waiting to be attended(LoW). Some of the solutions The second contribution of this research is a proper defini- that have been implemented are defined as Fast Tra- tion of the scheduling model for non-critical patients’ admis- cks [13], [14], or other solutions known as See and Treat [15]. sion into the service [12], as well as by their relocation with Rachuba et al. [16] show that diagnostic imaging services respect to the initial flow pattern supplied by the hospital’s are essential to the diagnosis pathway for many patients. 9210 VOLUME 8, 2020 E. Bruballa et al.: Intelligent Scheduling of Non-Critical Patients Admission for ED Commonly, these patients need to be seen again by a doc- tor or emergency nurse after an X-ray has been taken to complete the diagnosis and determine the next stage in the patients’ pathway. Finally, Rachuba proposes process map- ping and assessing the reduction in patients’ length of stay in ED. Many studies try to find the elements that impact patients’ long periods of stay inside the service and its saturat- ion [17], [18]. Others show that saturation and long waits increase the proportion of patients who leave the service without being attended by a doctor (LWBS) [19], [20]. In our research group, we looked for the best healthcare staff con- figuration to decrease the patients’ LoS in the service, con- sidering constraints related to the cost of the configurations and the amount of available resources [21]. We highlight those references as well as the use of simulation to test the FIGURE 1. Operational structure of the ED. effectiveness of the proposed measures for improvement in the LoS of patients within the service [22]–[25]. Our proposal attempts to move a step forward by obtain- ing a particular method to reduce the LoS within the ED service. In this way, the improvement in the quality of the ED is achieved by changing the manner in which non-critical patients arrive at the ED and not as much by way of modifying the healthcare staff nor the physical resources. As explained in related papers, simulation gives us a way to measure quality improvement inside the ED by the application of the model. FIGURE 2. Classification of patients (Spanish Triage System). IV. EMERGENCY DEPARTMENT MODEL As seen in Figure 1, the ED operation consists of different stages which every patient goes through from their entry into the ED service until these patients are discharged from the service or admitted into the hospital. For the triage stage, patients are classified according to their acuity level and they are assigned a priority. The scale of urgency implemented in the Spanish Triage service is based on the Andorran Triage model (MAT) [26] as described in Figure 2. A statistical evaluation of these records validates that the great number of patients attending the ED are non- FIGURE 3. Patient flow in the Hospital Emergency Department. critical patients who do not need immediate attention or they can even be outpatients. The patients’ distribution by acuity level from historical tests and treatments. The agents have their own state that records is described in Figure 2. A statistical evaluation of will be modified by the interaction with other agents, these these records validates that the majority of patients attending interactions will be reflected in the global operation of the the ED service are non-critical patients who do not need ED service. immediate attention or they can even be outpatients. As shown in Figure 3, when the patient arrives at the If it were possible to give information about when it was service, the simulation runs according to the flow of patients. more advisable to go to the ED service, non-critical patients The admissions and triage stages are the same for all patients would probably do it when the likelihood of long waits entering the ED service. Then, patients with acuity levels 1, was lower. The main beneficiaries would be these types of 2 and 3 are treated separately from the non-critical patients patients, who could take advantage of a scheduling model for (levels 4 and 5), which means that they are attended by admission in the ED service. different doctors and nurses. There is also a low percentage of patients being referred to other hospital areas after the triage A. THE FLOW OF PATIENTS INSIDE OF THE ED SIMULATOR and others who leave the service without being seen by a We developed the ED simulator including the following doctor (due to waiting time). agents in Netlogo: admissions and triage staff, doctors for the In our proposal, we’re interested in analyzing the non- different hospital areas and assistant nurses for the additional critical patients, patients who can be relocated in time for VOLUME 8, 2020 9211 E. Bruballa et al.: Intelligent Scheduling of Non-Critical Patients Admission for ED their arrival at the ED service. We will take into account all PaTstagei defines the Patient Attention Time in stage i, and it patients for admissions and triage stages, but only patients is independent from the number of patients arriving at the ED with acuity levels 4 and 5 for the diagnosis and treatment service. It’s important to know that PaT is not a static value stage. In this stage, the patients go through an initial medical for all patients, as it depends on the path followed by each exploration (IE) phase. A percentage of them are immedi- patient (not all patients need additional tests or treatment). ately discharged and leave the ED service after this phase, It’s important to note that the parameter commonly used in as we have illustrated by a dashed line in Figure 3. The the literature as an indicator of service quality is the Length of remaining patients in the ED services go through a section of Stay (LoS), which is defined as the total time a patient spends complementary examinations and/or treatment carried out by in the ED service. Unlike the previous one, the LoS not only technical personnel and/or assistant nurses. After this, they depends on the Staff configuration but also on the number return to visit the same doctor, who analyzes the additional and type of patients admitted to the ED service, including the tests or/and treatments. Finally, the patients are discharged waiting time. Finally we use the Length of Wait (LoW) as an from the ED, as shown in the same Figure 3. indicator. This is defined as the total waiting time of a patient Each scenario of the ED simulation is identified through a throughout the service. Therefore: healthcare staff configuration and an input pattern of patients in the ED service (quantity and acuity level of the patients LoS − PaT = LoW and PaT ≤ LoS (2) per hour). We add sensors to the ED simulator in order to Additionally, the Equivalent Patient attention Time (EPaT) obtain completely temporalized information about the output for stage i (EpaTstagei ) is defined as the attention time of for each scenario, taking as a result information regarding the a patient, taking into account the possibility of working in number of attended patients, Patient attention Time (PaT) and parallel in that stage, and Equation 3 shows how it is com- waiting time (LoW) for each patient in any stage in the ED puted. The SSi and JSi in Equation 3 and 5 stand for the service. total number of senior/junior staff in stage i respectively, and the calculation corresponds for parallelization on a pipeline V. ANALYTICAL MODEL model. The level of satisfaction with emergency care is mostly condi- 1 tioned by the perception of waiting time. Furthermore, from EPaTstagei = SS JSi (3) i the standpoint of service operation. The throughput of the ED i + PaTSSi PaTJS is directly related to the number of patients attended and an The slowest stage of the staff configuration will represent efficient use of the ED facilities. the capacity at which patients can be attended in the ED We are proposing a model for service characterization. service, as well the stage which can saturate the service. It is, This model should provide knowledge and information to therefore, the inverse of the equivalent attention time of the make changes in the system in order to improve it. Such a slowest stage, which will determine the number of patients model is based on the definition of a set of service quality that a given configuration can treat per unit of time. We define indicators as well as a set of equations, allowing us to measure this index as Theoretical Throughput (ThP), which is the intrinsic elements of the system, such as staff activities and indicator for measuring patient attention capacity, which is patient flow, as shown in Figure 3. its response capacity for specific scenarios. The ThP is rep- The equations described in this section will enable us resented by Equation 4. to gain information (knowledge) about the capacity of the system with regards to the service resources. The objective is 1 ThP = (4) to use this knowledge to design a method for the distribution MaxEPaTi of non-critical patients, changing their current entry pattern, Indeed, the ThP for a specific stage i will be obtained by so that their arrival at the service should be in accordance with the inverse of Equation 3. the computed capacity of the service. SSi JSi ThPstagei = i + i (5) A. QUALITY SERVICE INDEXES PaTSS PaTJS We start defining an index named Patient attention Time (PaT) as the total time a patient is receiving attention through- B. THEORETICAL THROUGHPUT FOR THE DIAGNOSIS out the stages in the service (admissions, triage, doctors, AND TREATMENT STAGES additional tests or treatments) for a specific member of staff. Unlike previous stages, the diagnosis and treatment stages The PaT is calculated from the sum of the times in attention are the most complex stages due to their non-linearity. The in each stage, which is obtained from the ED simulator based patients first go through an initial medical exploration (IE), on the statistical records provided by the hospital (Eq. 1): which is their first contact with the doctor. There is a percent- age p1 of patients who need more tests after the IE phase and Stages X also a percentage p2 of patients who need some treatment, PaT = PaTstagei (1) which is applied and monitored by the nurses. After the i=1 test or treatment phase, the patients return to the doctor for a 9212 VOLUME 8, 2020 E. Bruballa et al.: Intelligent Scheduling of Non-Critical Patients Admission for ED FIGURE 5. Percentage of diagnostic times for non-critical patients FIGURE 4. Patient flow in test and treatment phases. (Area B). final diagnosis, after completing any additional examinations considered: (AR). The remaining patients will be discharged from the ED SDIE PIE SD = PaT DIE = Patients per minute for a SD in IE stage; S service directly after their first visit with the doctor. JDIE PIE JD = IE = Patients per minute for a JD in IE stage; Figure 4 details the flow of patients in this phase, accord- PaTJD SDAR ing to the abovementioned considerations. The number of PAR SD = AR = Patients per minute for a SD in AR stage; PaTSD assistant nurses, both Senior and Junior, in the staff service is PAR JDAR JD = AR = Patients per minute for a JD in AR stage. PaTJD presented as SN/JN respectively. The number of doctors, also Where SDIE , SDAR , JDIE , JDAR are unknown values. Senior or Junior, is represented by SD/JD, and it is important From the historical records provided by the hospital, we see to distinguish between: that the patients can go once or more times for the tests • SDIE /JDIE : Senior / Junior doctors in the Initial or/and treatments, and so they visit the doctor more than once, Exploration. as shown in Figure 5. The hospital statistics for non-critical • SDAR /JDAR : Senior / Junior doctors in the Analysis of patients show that the percentage of patients who need more Results. than one test or/and treatment is very low. In the ED services, the doctors prioritize the attention of There are two percentages for the complementary exam- patients after the IE, therefore, these patients will be treated inations. The first percentage p1 of patients who, after their when the doctor is available for the analysis of results (AR). first visit with the doctor, require tests and the second per- This prevents queues on the return of patients after the addi- centage p2 of patients that require treatment. Finally, there is tional tests or treatments. a percentage 1−(p1 +p2 ) of patients who are discharged from As we described before, the ThP has been defined as the ED service directly after their IE. an index of the response capacity for each stage. In order From the data presented in Figure 5, we can see that around to calculate the ThP in the diagnosis and treatment stage, 70% of non-critical patients leave the ED service directly it is important to consider the mean attention time of after the IE. Therefore, 30% of patients require additional each type of doctor. This time will depend on experience tests or treatment (p1 + p2 ). Thus, given these percentages (Junior or Senior), and also on the type of healthcare they and the flow of patients in Figure 4, we obtain the following are providing, the first step (IE), or the second, consisting of relations of continuity: the AR of a requested additional treatment. These times are obtained by the calibration of the ED simulator, and denoted PIE AR j SD · (p1 + p2 ) = PSD (6) by PaTi , which represents the mean of the Patient Attention Time for a doctor type i doing j. PIE JD· (p1 + p2 ) = PAR JD (7) Then we consider: SDIE + SDAR = SD (8) • PaTSD IE : Mean attention time of a Senior Doctor (SD) in JDIE + JDAR = JD (9) the IE phase. • PaTSD AR : Mean attention time of a Senior Doctor in the The result of this linear system of equations gives us the AR phase. values for SDIE , SDAR , JDIE , JDAR , and therefore, the values IE : Mean attention time of a Junior Doctor (JD) in • PaTJD for PIE AR IE AR SD , PSD , PJD , PJD , for the doctor staff considered. the IE phase. Once the diagnosis and treatment phases have been charac- • PaTJD AR : Mean attention time of a Junior Doctor in the terized, we can obtain the ThP for the doctors’ stage in the test AR phase. and treatment phases by the sum of patients who have only Given these times, their inverse will provide us with the been visited once by the doctor (PonlyIE ), those who have been number of patients that each doctor can treat per unit time required for complementary testing (PTest ), and the patients VOLUME 8, 2020 9213 E. Bruballa et al.: Intelligent Scheduling of Non-Critical Patients Admission for ED TABLE 1. Theoretical throughput for each stage of the ED service and Once the parameters for the Staff configuration have been simulation results for the validation. configured, and according to the results in the same Table 1, a constant and homogeneous input of patients was created to ensure that the system was continuously running homo- geneously to guarantee that the system has been in a steady state, after a warm-up period. We run the simulation for three different numbers of patients entering the ED service per hour, around the theo- retical ThP obtained as reference for the ThP for each stage from the system equations proposed. Afterwards, we carried out an analysis of the effect of the number of patients arriving into the service every hour using as an index the percentage of Staff time spent on attending or treating patients (which we defined as Occupancy) for each stage of the service. The obtained results are also shown in Table 1. These simulation needing additional treatments (PTreat ) (Eq. 10). results are in accordance with the ThP obtained with the analytical model (Table 1) for all stages of the service. ThPDoctors = PonlyIE + PTest + PTreat (10) The analytical model for the ThP calculation presented in this section will give us information for relocating non- where: critical patients, so that the theoretical ThP will be a manda- PonlyIE = (PIE IE SD + PJD ) · (1 − p1 − p2 ) (11) tory indicator for the relocation of non-critical patients. PTest = (PIE IE SD + PJD ) · p1 (12) VI. SCHEDULING MODEL FOR NON-CRITICAL PATIENTS PTreat = (PIE IE SD + PJD ) · p2 (13) The intention of the scheduling model presented in this We introduce equations (11) to (13) on (10) and we find: section is to dynamically adjust the current patient pattern coming into the service to its attention capacity, in order that ThPDoctorsstage = PIE IE SD + PJD (14) the flow of patients inside the service shall be in conformity so, with the healthcare staff available in the service at any time. The admissions scheduling model proposed must enhance SDIE JDIE ThPDoctorsstage = + (15) quality of care, optimize the quality perception of the atten- IE PaTSD IE PaTJD tion service in relation to the population, and contribute In addition, the ThP for the nurses in the treatment stage, to the sustainability of the current ED, ensuring better use within the diagnosis and treatment phase, will be calculated of available resources. Therefore, the idea aims to improve using Equation 16: the ED service, which is the principal entrance of patients in the healthcare services with regards to quality and user SN JN ThPtreatmentstage = + (16) satisfaction. PaTSN PaTJN The scheduling model for the entry of non-critical patients Finally, the ThP for the diagnosis and treatment will be the into the service is built based on the records extracted from the lowest value of the Equations 15 and 16, and the values of the historical records of the hospital. On the other hand, we have ThP will be the indicators for the capacity of the ED service defined as theoretical system throughput (ThP) the service for patient attention, supposing that the admission and triage characterization in terms of its response capacity to patients’ stages do not limit the ThP. attention. Its value is an indicator of the system capacity to According to the actual patient flow in the ED service, absorb the demand for the service and it is a constraint in we validated [10] the analytical model to calculate the val- our model. It is important to keep in mind that physical space ues of the ThP for admissions, triage, nursing and medical could become a bottleneck in the service, which is why we exploration stages. For the validation of the model, we used propose that, based on the throughput of the medical staff, the ED simulator based on an agent-based model of the we are able to define the capacity of the waiting rooms. system as a sensor of the real system. The output information The diagram in Figure 6 gives a global view of the cycle from ED simulation using different possible scenarios has required to dynamically acquire an appointment scheduling been analyzed in order to get the information for the model for the admission in the service, in keeping with the present validation. hourly demand. The validation of the analytical model consisted of using The idea is to have a recommendation plan concerning the ED simulator to see if the obtained values for the ThP the admission of non-critial patients into the ED service. for each stage in the ED service were in accordance with the We based the model on a patient scheduling algorithm. Fur- data generated by the ED simulator. The obtained values for thermore, we take into account the attention capacity of ED the ThP calculated from the equations are shown in Table 1. staff as a limitation, as well as the maximum delay time 9214 VOLUME 8, 2020 E. Bruballa et al.: Intelligent Scheduling of Non-Critical Patients Admission for ED TABLE 2. PaT average from Tauli Hospital. following hours after their arrival in the system because they FIGURE 6. Scheduling model for non-critical patients’ in the service. will be receiving or wating for attention occupying an area in the ED service. Figure 7 shows test and treatment propagated patients for specific input of patients in the Historical Entry for relocation of patients as a second restriction. We based Patients row, corresponding to input pattern for a particu- the knowledge of the system state hour-by-hour dynamically, lar day from the statistical records of Tauli Hospital. For which in turn is generated from the data obtained from the each patient we calculate the propagation time taking into historical records and the changes made to it according to the consideration the mean PaT (Table 2) and for each hour i actual demand of the ED, in relation to the access of patients Propagated Patients i = TestPatientsi−1 + TreatPatientsi−1 + and the kind of care received. TreatPatientsi−2 + TreatPatientsi−3 . Finally, the sum of Entry Patients and Propagated Patients A. DISTRIBUTION OF NON-CRITICAL PATIENTS: is represented in the System State row, which is the hourly dis- SYSTEM STATE tribution of patients in the system. Therefore, the number of We define the System State (SS) as the number of patients patients inside the system in hour i is the corresponding value within the service each hour and we focus on the Patient for SystemStatei = EntryPatientsi + PropagatedPatientsi . attention Time (PaT). PaT is given as the staff time (doctor, A graphical representation of the SS in Figure 7 is illustrated assistant nurse or technician) spent attending the patient and in Figure 8. the time for additional tests and/or treatments. Therefore, Here we consider that: the SS does not take into account the Waiting Time for The bars of the graph represent the patients in the system patients (LoW). This information provides us with a more at the arrival time as well as the hours of stay in the service. realistic representation of what occurs hour-by-hour in the ED We divided the patients that arrive and are discharged after service. the visit with the doctor (PaT: less than one hour) from the From the hospital’s historical records, we obtain the dis- patients who arrive and require additional treatments or tests, tribution of patients arriving in the ED service, which gives so we defined the latter as propagated patients according to us an initial approximation of the number of patients arriving the corresponding PaT, as shown in Table 2. As we men- each hour (historical entry patients in Figure 7). The patients tioned, the entry hour for non-critical patients is illustrated that do not need additional tests or/and treatments are dis- in the bars, first in the bar representing their arrival and the charged by the doctor after the Initial Exploration (IE) and the following bars representing the hours while they are being patients need less than 1 hour to be attended (Direct patients), attended by the doctor or performing the tests or/and treat- as shown in Figure 7). ments. We use the representation hour : patients in Figure 8. Besides that, there’s a mean of 4 hours for patients who It also helps to follow these types of patients in the bar chart. receive additional treatment, and 2 hours for those who need The horizontal non-contiguous lines seen in the Fig.8 indi- some tests. The SS is represented hour-by-hour, and for each cate three values that represent the attention capacity of the hour we obtain the number of these types of patients, (test system (ThP), which in turn show the ideal scenario regarding patients and treatment patients) as shown in Figure 7. The patient care. If patients per hour do not surpass the ThP, distribution probabilities of tests and treatments are provided then these patients should not have to wait to obtain medical by the hospital’s historical records. attention. The value of the ThP also indicates whether it is The values of the PaT have been calculated from the cal- possible or not to enhance the actual scenario by relocating ibration of the ED simulator using actual historical records patients, so that the number of patients to attend per hour from Tauli Hospital. Furthermore, it is important to note that becomes as homogeneous as possible and does not exceed the ED simulator contemplates a random exponential distri- the ThP limit value. Three possible scenarios may occur: bution to model the behavior of attention time by the staff, • If the value of the ThP is above the attention necessities, as well as the acuity level and the age of each patient [27]. the system is oversized, then there should be no satura- We carried out a statistical analysis using the output of the tion and no modifications are needed. simulation, which is given as the result of the mean PaT value • If the value of ThP is below minimal service necessities, for patients. This depends on whether or not they require there is no alternative for patients’ relocation under ThP additional treatments or tests, as we describe in Table 2. and the system cannot avoid saturation without modi- In accordance with the values of PaT in Table 2, we have fying resource availability. However, a possible option to contemplate the propagation of the patients through the for improving the scenario slightly is by trying to flatten VOLUME 8, 2020 9215 E. Bruballa et al.: Intelligent Scheduling of Non-Critical Patients Admission for ED FIGURE 7. System State (SS) computation. FIGURE 9. Representation of Initial hour, the critical hours and tentative patients for relocation (Step 1). FIGURE 8. System State chart of Monday input according to real historical records from the hospital. the curve, therefore reducing patients’ LoW inside the system. • An intermediate case in which there is the option of patient relocation is when we are able to act to enhance system attention. FIGURE 10. Patient relocation and calculation for SS update (step 2). In the last scenario, we use the ThP value as an index for the scheduling model and it will be a constraint in the patient scheduling model, enhancing their current arrival pattern in number of patients which surpass the value of the ThP) the system, so that their arrival at the service should result in in the calculated System State. We also identify Tenta- an SS in accordance with the calculated system capacity. tive Patients to be relocated (Figure 9). • Depending on the relocation range (6 hours) and the B. NON-CRITICAL PATIENTS SCHEDULING MODEL restriction of ThP, the algorithm removes the tentative The relocation of the patients consists of the movement of the patients from the Critical Hour to the corresponding patient with respect to their arrival hour in the ED service to hour for relocation and it creates holes, removing more minimize the waiting time of the patient and consequently the patients if possible. Then, the algorithm recalculates LoS for all patients in the service. Only non-critical patients patients’ propagation for the new scenario and updates can be relocated and we must take into account that ThP is the SS, as illustrated in Figure 10. the maximum number of patients that the system can attend • Once the Initial Hour is reached, the algorithm generates per hour without waiting times. The maximum delay time for an update of SS in all the hours, and also of Entry patient relocation is 6 hours with respect to arrival hour. When Patients, which is the Schedule Entry Patients in Fig.11. the ThP has been calculated, the algorithm begins in hour i = In the same Figure the Schedule Patient Limits indicates 23 and goes backwards until the initial Hour, which is the first the number of patients that should be admitted into the hour in the SS with a number of patients that surpasses the ED system per hour. ThP. The algorithm performs the following steps for patient • The Appointment Scheduling Table is created(Figure 12), relocation: which describes the appointment hour for the relocated • It determines holes (free locations for patients to move patients depending on their arrival time. to). Move backwards hour-by-hour, until identifying the The characterization of the SS and the creation of the first Critical Hour (the first hour in the day with a Appointment Scheduling Table have been developed as a 9216 VOLUME 8, 2020 E. Bruballa et al.: Intelligent Scheduling of Non-Critical Patients Admission for ED patients arriving each hour into the ED are calculated for each case study considered (called cases A, B and C), once the model for the admission has been carried out, that is to say, through the relocation of the patients, based on the System State calculated in each case. It is important to note that Area FIGURE 11. The System State updated (step 3). B in Tauli Hospital (the waiting room for non-urgent patients) was modeled according to the capacity of the room, in all cases defined by 52 patients (always greater than the ThP of the medical staff). In Tables 3 to 5, the average reduction of LoW in minutes (time) is specified, as well as the corresponding reduction percentage foreseen by the simulation data, with respect to the original LoW without relocation, for all the hours that have been affected by the relocation in which a minimum reduction of 10% has been obtained, which is more than 10 minutes. LoW reduction values are shown separately for patients who are discharged after their first consultation with a doctor and do not require any test or treatment (Direct Patients), patients who need additional tests (Test Patients) FIGURE 12. Appointment Scheduling for non-critical patients (step 4). and those who receive some type of treatment (Treatment Patients) respectively. The initial relocation hour is marked in ocher in each table. The relocation effect can be extended to the previous hours, in addition to the following hours. This is because relocation can affect the waiting times of the test and treatment patients who arrived in the hours previous to the initial hour, due to its propagation. If this propagation reaches the hours in which other patients have been relocated. Some hours with atypical values in the LoW have been detected for treatment patients. Due to the outliers, the results with a reduction in the LoW have been rejected. Finally, the expected patient input (historical input) and FIGURE 13. System recommendation for non-critical patients into the the input programmed by relocation (programmed input) are service. shown graphically for each case (Figures 14, 15 and 16). On the same graphs, the corresponding values of the average module for ED simulation. Therefore, they are new function- patient LoS (direct, test and treatment patients) in the service alities of the ED simulator, and thus the patient relocation at each hour are represented, without relocation and after algorithm runs in a dynamic way. If there are any changes patient relocation, respectively. in the entry pattern of patients, initially predicted by the historical records modifying the patient patterns, then the SS A. CASE A is updated again. At the same time, when the SS is updated, This case is characterized by a distribution of patients enter- the Appointment Scheduling Table is updated. ing the ED corresponding to that determined by the current As shown in Figure 12, the Appointment Scheduling Table data from the historical records of Tauli Hospital. contains recommendations for patient relocation, as well the Table 3 contains the details of the reduction in the LoW per Patient Limits Schedule. However, the policy of appointment hour for patients due to the relocation proposed by the model assignment is necessary and it will be based on a first come, in this case. The data analyzed to obtain these values are those first served basis. In Figure 13, it can be seen how the ED represented in Figure 14. system is able to admit patients per hour, as they arrive, up to In this case, the initial hour for relocation, is hour 10 and the limit of admission in the schedule. The remaining patients relocation has an effect on hour 8 to hour 18. The effective- will be advised to remain at home until their visiting time, ness of relocation is noticeable during all these hours, reach- taking it as a new admission into the Scheduling Table. ing the maximum reduction value in hour 12 for all patients. The reduction in the case of direct patients only exceeds the VII. EXPERIMENTAL RESULTS minimum value by 10 minutes in hour 12. Even so, those In this section we present the results of the simulation experi- hours with a reduction of 9 minutes are also shown, with these ments carried out and we summarize the information obtained reductions, in all cases, very close to 50% compared to the from these results. average LoW reduction values of the original LoW value. VOLUME 8, 2020 9217 E. Bruballa et al.: Intelligent Scheduling of Non-Critical Patients Admission for ED TABLE 3. Case A: Time (minutes) and percentage of average reduction in LoW due to patient relocation. TABLE 4. Case B: Time (minutes) and percentage of average reduction in LoW due to patient relocation. FIGURE 14. Case A: Patient input without relocation (historical input) and with relocation (scheduled input). Average LoS per hour for direct, test and treatment patients without relocation and with patient relocation. For test patients, the relocation of patients has an effect in the LoW value until hour 16 and for treatment patients the effect is extended until hour 18. In both cases, the effect of relocation on the previous hours to the initial hour is also FIGURE 15. Case B: Patient input without relocation (historical input) and with relocation (scheduled input). Average LoS per corresponding hour shown. The LoW for these test or treatment patients who for direct, test and treatment patients without relocation and with patient arrive in those previous hours could be reduced due to the fact relocation. that the subsequent hours have been modified by relocation of other patients, since they may be propagated in the system the model. The effect of relocation focuses on the 6 hours for two, three or four hours. This effect is observed in Table 3 following the initial relocation hour, and it also affects the for hours 8 and 9. previous hours for treatment patients admitted to the system Finally, the graphs in Figure 14 show the effect of reloca- during those hours. tion on the entry of patients and their length of stay (LoS). As already mentioned, the effect for treatment patients in The relocation of patients and the consequent scheduling of these previous hours to the initial relocation hour is due to the their admission entails a redistribution in the arrival of these fact that these patients remain in the service during the hours patients to the service according to the system’s attention in which relocation of other patients has been carried out and capacity. This new situation results in an improvement in the that reduces their wait. An average reduction of more than length of stay of the patients in the service, as can be observed 50% is achieved in all hours between hour 9 and hour 12 for in the LoS lines represented on the graphs of the Figure 14. the three types of patients. Once again, the positive effect of patient relocation is confirmed in this case, precisely in the B. CASE B central hours of the day for which the entry of patients has Case B is characterized by an input distribution of patients been considered greater. with a high concentration of patients in the central hours The graphs in Figure 15 show the effect of relocation on the of the day. Table 4 contains the details of the reduction in entry of patients and on their total time in the service (LoS). LoW per hour for patients due to the relocation proposed by In this case, the effect of relocation is more noticeable than in 9218 VOLUME 8, 2020 E. Bruballa et al.: Intelligent Scheduling of Non-Critical Patients Admission for ED TABLE 5. Case C: Time (minutes) and percentage of average reduction in LoW due to patient relocation. These experimental results, obtained through the anal- ysis of simulation data of the three case studies consid- ered, demonstrate the positive effect of the patient relocation method and, therefore, validate the scheduling model for the admission of non-critical patients into the ED. With its application through the relocation of these patients, the LoW improves in all cases, and consequently the LoS of the patients and, therefore, the quality of care provided in the ED. Table 5 contains the details of the reduction in LoW per hour for patients due to the relocation proposed by the model for this case. VIII. CONCLUSION The main contribution of this research has been the definition of an analytical model for the calculation of the response capacity of a certain healthcare staff configuration in an ED. We have seen how this characterization of the system, through its ability to absorb the demand of the service, indicates the ideal situation of the state of the system in each hour and it is a reference for measuring system performance. FIGURE 16. Case C: Entry of patients with 17 more patients due to an We proposed a scheduling model for non-critical patients accident at hour 13 without relocation (historical input) and with relocation (scheduled input). Average LoS per corresponding hour for which provides a method to enhance the quality of the health- direct, test and treatment patients without relocation and with patient care service and it is a useful tool for the service admin- relocation. istration in order to attend the current growing demand for emergency services. the previous case, given the greater saturation of the service in The implementation of the model in the ED simulator the central hours of the day without relocation. In the case of and the results produced by the analysis of simulation data direct patients, the LoS curve flattens out almost completely. validate the effectiveness of the model and improve patient For test patients, LoS with patient relocation is maintained waiting times in the system globally and, as a result, improve between 150 and 200 minutes from hour 9 (initial relocation the quality of healthcare. It is also important to mention that hour), and for treatment patients, LoS with patient relocation the implementation of the model inside a real ED service remains below 300 minutes. will be efficient to the extent that the proposed scheduler system performs on the real entry of patients, which will be C. CASE C dependent on the patients’ or health service users’ decisions. In this case, we have experimented with a scenario charac- terized by an influx of patients with an unexpected increase REFERENCES in patients at a certain time of day, simulating a possible [1] F. Kadri, S. Chaabane, and C. Tahon, ‘‘A simulation-based decision support accident. The scenario contemplates an entry of 17 patients system to prevent and predict strain situations in emergency department systems,’’ Simul. Model. Pract. Theory, vol. 42, pp. 32–52, Mar. 2014. in hour 13. [Online]. Available: http://www.sciencedirect.com/science/article/pii/ The graphs in Figure 16 show the effect of relocation on the S1569190X13001767 entry of patients and the total time of their stay in the service [2] A. Boyle, K. Beniuk, I. Higginson, and P. Atkinson, ‘‘Emergency depart- ment crowding: Time for interventions and policy evaluations,’’ Emergency (LoS) for this case. The relocation of patients, before and after Med. Int., vol. 2012, pp. 1–8, Feb. 2012, doi: 10.1155/2012/838610. the arrival of the patients by the simulated accident, manages [3] P. C. Sprivulis, J. Da Silva, I. G. Jacobs, A. R. L. Frazer, and G. A. Jelinek, to improve the times of all patients in the hours affected by ‘‘The association between hospital overcrowding and mortality among patients admitted via Western Australian emergency departments,’’ Med. the accident. In return, the hours furthest from the hour of J. Aust., vol. 184, no. 12, pp. 208–212, Jun. 2006. the accident, used for scheduling relocated patients to avoid [4] A. M. Mancilla, ‘‘Simulation: A tool for the study of real systems,’’ saturation in critical hours, suffer an increase in waiting times. Departamento de Ingenieria de Sistema, Universidad del Norte, Barran- quilla, Colombia, Tech. Rep., 1999, vol. 6, pp. 104–112. [Online]. Avail- Even so, the results show a global improvement in patient able: http://rcientificas.uninorte.edu.co/index.php/ingenieria/article/view/ waiting times. 2226/1443 VOLUME 8, 2020 9219 E. Bruballa et al.: Intelligent Scheduling of Non-Critical Patients Admission for ED [5] J. Pavón, M. Arroyo, S. Hassan, and C. Sansores, ‘‘Simulation [23] J. Wang, J. Li, K. Tussey, and K. Ross, ‘‘Reducing length of stay in of social systems with software agents,’’ in Proc. Actas del Cam- emergency department: A simulation study at a community hospital,’’ pus Multidisciplinar en Percepcion e Inteligencia (CMPI), Universi- IEEE Trans. Syst., Man, Cybern. A, Syst., Humans, vol. 42, no. 6, dad de Castilla-La Mancha, 2006, pp. 389–400. [Online]. Available: pp. 1314–1322, Nov. 2012. http://samer.hassan.name/files/CMPI [24] K. W. Tan, H. Lau, and F. C. Y. Lee, ‘‘Improving patient length-of-stay [6] L. R. Izquierdo, J. M. Galán, J. I. Santos, and R. Del Olmo, ‘‘Complex in emergency department through dynamic queue management,’’ in Proc. systems modelling through agent based simulation and systems dynam- Winter Simulations Conf. (WSC), Dec. 2013, pp. 2362–2373. ics,’’ Empiria, Revista de Metodologia de Ciencias Sociales, vol. 16, [25] D. J. Medeiros, E. Swenson, and C. Deflitch, ‘‘Improving patient flow pp. 85–112, 2008. in a hospital emergency department,’’ in Proc. Winter Simulation Conf., [7] M. Gul and A. F. Guneri, ‘‘A comprehensive review of emergency depart- Dec. 2008, pp. 1526–1531. ment simulation applications for normal and disaster conditions,’’ Com- [26] W. Soler, M. Gómez Muñoz, E. Bragulat, and A. Alvarez, ‘‘Triage: A key put. Ind. Eng., vol. 83, pp. 327–344, May 2015. [Online]. Available: tool in emergency care,’’ Anales del Sistema Sanitario de Navarra, vol. 33, http://www.sciencedirect.com/science/article/pii/S0360835215000972 pp. 55–68, Jan. 2010. [8] M. Taboada, E. Cabrera, M. L. Iglesias, F. Epelde, and E. Luque, [27] Z. Liu, D. Rexachs, F. Epelde, and E. Luque, ‘‘A simulation and opti- ‘‘An agent-based decision support system for hospitals emergency mization based method for calibrating agent-based emergency depart- departments,’’ Procedia Comput. Sci., vol. 4, pp. 1870–1879, May 2011. ment models under data scarcity,’’ Comput. Ind. Eng., vol. 103, [Online]. Available: http://www.sciencedirect.com/science/article/pii/ pp. 300–309, Jan. 2017. [Online]. Available: http://www.sciencedirect. S1877050911002614, doi: 10.1016/j.procs.2011.04.203. com/science/article/pii/S0360835216304685 [9] A. Arisha and G. Bobashev, Eds., A Generalized Agent-Based Model to Simulate Emergency Departments. Nice, France: IARIA, Oct. 2014. EVA BRUBALLA is currently an Associate Pro- [Online]. Available: http://www.thinkmind.org/index.php?view=article& fessor with the Computer Science School, Escoles articleid=simul_2014_3_30_50128 Universitaries Gimbernat i Tomàs Cerdà, Univer- [10] E. Bruballa, M. Taboada, A. Wong, D. Rexachs, and E. Luque, ‘‘An analyt- ical model to evaluate the response capacity of emergency departments in sity Autonoma of Barcelona (UAB), and an Asso- extreme situations,’’ in Proc. 7th Int. Conf. Adv. Syst. Simulation (SIMUL), ciate Researcher with the Computer Architecture 2015, pp. 12–16. and Operating System Department, UAB, Spain. [11] E. Bruballa, A. Wong, D. Rexachs, E. Luque, and F. Epelde, ‘‘Evaluation She has coauthored eight fully reviewed articles. of response capacity to patient attention demand in an emergency depart- Her research is on the use of simulation to improve ment,’’ Int. J. Adv. Syst. Meas., vol. 10, nos. 1–2, pp. 11–22, 2017. [Online]. emergency departments’ operation. Available: http://www.iariajournals.org/systems_and_measurements/ sysmea_v10_n12_2017_paged.pdf [12] E. Bruballa, A. Wong, D. Rexachs, E. Luque, and F. Epelde, ‘‘Schedul- ALVARO WONG is currently an Associate ing model for non-critical patients admission into a hospital emer- gency department,’’ in Proc. Winter Simulation Conf. (WSC), Dec. 2017, Researcher with the Computer Architecture pp. 2917–2928. and Operating System Department, University [13] M. Sanchez, ‘‘Effects of a fast-track area on emergency department perfor- Autonoma of Barcelona, Spain. He has worked mance: Determinants of effectiveness and quality of care,’’ Acad. Emer- in performance prediction of HPC applications in gency Med., vol. 11, no. 5, p. 460, May 2004. the ITEA 2 European Project No. 09011, research [14] S. W. Rodi, M. V. Grau, and C. M. Orsini, ‘‘Evaluation of a fast track centers and industries. He has coauthored a total unit: Alignment of resources and demand results in improved satisfaction of 35 fully reviewed technical articles in journals and decreased length of stay for emergency department patients,’’ Qual. and conference proceedings. Manage. Health Care, vol. 15, no. 3, pp. 163–170, Jul. 2006. [15] R. Davies, ‘‘‘See and treat’ or ‘see and treat’ in an emergency department,’’ in Proc. Winter Simulation Conf., Dec. 2007, pp. 1519–1522. DOLORES REXACHS is currently an Asso- [16] S. Rachuba, K. Knapp, L. Ashton, and M. Pitt, ‘‘Streamlining ciate Professor with the Computer Architecture pathways for minor injuries in emergency departments through and Operating System Department, University radiographer-led discharge,’’ Oper. Res. Health Care, vol. 19, pp. 44–56, Autonoma of Barcelona (UAB), Spain. She has Dec. 2018. [Online]. Available: http://www.sciencedirect.com/science/ been the supervisor of 12 Ph.D. theses and has article/pii/S2211692317300619 been an Invited Lecturer with Universities in [17] P. Yoon, I. Steiner, and G. Reinhardt, ‘‘Analysis of factors influencing length of stay in the emergency department,’’ Can. J. Emergency Med., Argentina, Brazil, Chile, and Paraguay. She has vol. 5, pp. 155–161, May 2003. coauthored more than 90 fully reviewed technical [18] N. R. Hoot and D. Aronsky, ‘‘Systematic review of emergency department articles in journals and conference proceedings. crowding: Causes, effects, and solutions,’’ Ann. Emergency Med., vol. 52, Her research interests include parallel computer no. 2, pp. 126–136, Aug. 2008. architecture, parallel I/O subsystem, fault tolerance in parallel computers, [19] L. M. Stock, G. E. Bradley, R. J. Lewis, D. W. Baker, J. Sipsey, and tools to evaluate, predict, and improve the performance in parallel computers. C. D. Stevens, ‘‘Patients who leave emergency departments without being seen by a physician: Magnitude of the problem in Los Angeles County,’’ EMILIO LUQUE is currently an Emeritus Profes- Ann. Emergency Med., vol. 23, no. 2, pp. 294–298, Feb. 1994, doi: 10. sor with the Computer Architecture and Operat- 1016/s0196-0644(94)70043-5. ing System Department, University Autonoma of [20] T. E. Day, A. R. Al-Roubaie, and E. J. Goldlust, ‘‘Decreased length of Barcelona, Spain. He was an Invited Lecturer with stay after addition of healthcare provider in emergency department triage: universities in the USA, South America, Europe, A comparison between computer-simulated and real-world interventions,’’ Emerg. Med. J., vol. 30, no. 2, pp. 134–138, Feb. 2013. [Online]. Available: and Asia, a Key Note Speaker in several confer- https://emj.bmj.com/content/30/2/134 ences, and a Leader in several research projects [21] E. Cabrera, M. Taboada, M. L. Iglesias, F. Epelde, and E. Luque, funded by the European Union (EU), Spanish ‘‘Simulation optimization for healthcare emergency departments,’’ Government, and different industries. He has Procedia Comput. Sci., vol. 9, pp. 1464–1473, Jan. 2012. supervised 24 Ph.D. theses and coauthored more [Online]. Available: http://www.sciencedirect.com/science/article/pii/ than 300 technical articles in journals and conference proceedings. His S1877050912002827 major research areas are: parallel and distributed simulation, performance [22] W. S. Armel, S. Samaha, and D. W. Starks, ‘‘The use of simulation to prediction and efficient management of multicluster-multicore systems, and reduce the length of stay in an emergency department,’’ in Proc. Winter fault tolerance in parallel computers. Simulation Conf., vol. 2, Dec. 2003, pp. 1907–1911. 9220 VOLUME 8, 2020