Study of the impact of the start time of work shift on the efficiency of an emergency system through a simulation model of discrete events

: This work uses a simulation model to analyze the use of ambulances present in emergency medical services (SAMUs) in relation to the schedule of beginning work shifts and the time patients wait in relation to shift start times. For the development of the model, information was collected from studies present in the literature and applied government recommendations for ambulances by inhabitant. The model was executed for different amounts of effective calls per day to analyze system congestion and the impact of changing shift start times on waiting times. The results demonstrate that the system has congestion with 25 effective calls per day, and shifts started at 8 am and 11 am have a shorter average waiting for patients for care. These results validate that the change in the start time of shifts improves system performance without increasing costs.


Introduction
With the increase in the population of cities, it is necessary to correctly size urgency and emergency care services, the correct types of vehicles and the correct allocation of resources in work shifts. In Brazil, there are two main public urgent and emergency medical care services: SAMU, 192, (Mobile Emergency Care Service) and the Fire Department, 193. In many cities, these services have different call centers without integration, and if there is an accident on a public road with some witnesses, it is possible that two witnesses call different services and request two care vehicles. In addition, these services have different configurations of ambulances, which can be of different types depending on the specific needs of each region, which makes the answering and classification of the call crucial for the proper functioning of the system and increased chance of survival of the citizen.
Public ambulances are used to care for people in cases of urgency and emergency and are also used in hospitals, emergency rooms, and health departments to meet the needs of the municipal health system for the internal needs of patient locomotion. Thus, an ambulance can be used to take patients to other cities to perform consultations or tests or be transferred from one hospital unit to another (Andrade, 2012).
The correct distribution of ambulances available in health systems is crucial for large cities to reduce the risk of death of patients due to the waiting time for care.
The correct number of available vehicles and their correct positioning is a critical factor of the urgency and emergency system, with the various types of ambulances and their configurations. Examples are (i) motolance, composed of a motorcyclist qualified with equipment necessary for initial care in cases where the individual's locomotion is not necessary; (ii) Basic Support Unit (UBS), composed of nurses and/or nursing technicians; (iii) Advanced Support Unit (USA), composed of doctor and nurse/nursing technician; and (iv) Mobile ICU, which are vehicles with higher technology and equipment for the most severe cases, usually the need for calls to the advanced support units and Mobile ICU are lower.
Critical factors in the care of emergency medical systems are the response time, the affordable number of ambulances and their location as problems that have been widely studied in the literature.

Contributions of the article
Studies in the literature analyze emergency medical care systems under two main aspects: i) Location of bases/vehicles, as can be found in Ciconet (2015), Souza et al. (2013) ii) Dimensioning the number of vehicles present in the system. Different techniques are used for the correct analysis of the systems to determine the best solutions for these environments. However, no study analyzes the relationship between the demand for care, which is highly variable, the dimensioning of resources and the start time of work shifts.
This study aims to analyze the volumes of demand, i.e., number of calls, for daily service, governmental ordinance no. 1.864, of September 29, 2003, when followed by the municipality, the results in satisfactory levels of service to the population in relation to the congestion of the system considering the number of vehicles available in the system and the start time of the lathes in the service system.
As in most service systems, at some time of the day, the demand for service can exceed the amount of available resources, and changing the start and end times of work shifts can facilitate the adjustment of demand curves and available resources without the need to increase the number of vehicles and professionals available in the system as a whole.
The main contribution of this study is to present an analysis of various times of beginning and end of work shifts for the profile of demand for care of the studies analyzed for data collection.
For this study, the amount of demand present in the system is gradually increased by 5 daily calls to the limit of 50 effective calls. The analysis is based on the increased demand for care and the provision of services by the public manager with the determination of the number of vehicles available in each work shift and the start and end times of the shifts.

Literature review
Simulation is the representation of the operation of a real-world process over time. It can be performed manually or with the aid of a computer. The simulation involves the generation of an artificial history based on real data collected from the system for an analysis of the process characteristics (Banks et al., 2014).
Nevertheless, according to Banks et al. (2014), the use of simulation allows the analysis of multiple experiments in complex environments, proposing new policies and resource allocation. Thus, the use of simulation is recommended for the analysis of urgent and emergency medical care systems because it is a complex system with highly variable demand and resources that may be unavailable during the day.
In the present study, all variables presented in Table 2 are used, with a difference in the focus of the study compared to the other studies. The main contribution in this study is the impact of the change in shift start times on the service capacity of the system and, consequently, the change in the waiting time of patients.
The response time of the SAMU was studied by Ciconet (2015), where data were collected from 1580 visits performed in 2013 in the city of Porto Alegre -RS. The author conducted a complete survey and treatment of data to classify the calls and determine the response time for the effective calls. The proportion of consultations that used advanced support vehicles was approximately 2.72% of the total. To analyze the number of effective calls per day, four periods were considered: dawn (0 h to 6 h), morning (6 h to 13 h), afternoon (13 h to 19 h) and night (19 h to 24 h), and the average proportions of calls per period were 10%, 32%, 37% and 21%, respectively.

The proposed simulation model
This study presents a discrete event simulation model that aims to describe the operation of the emergency response system for cities that use governmental ordinance no. 1,864 of September 29, 2003, which recommends one USB per 100 to 150 thousand inhabitants and one USA per 400 to 450 thousand inhabitants. Thus, for the system to have at least one advanced support unit available 24 hours a day, a city with 800,000 inhabitants was adopted as an example. Similarly, one can define any city size and number of vehicles present that respect the ordinance; for example, a city with 300 thousand inhabitants is expected to have at least 3 basic support units and 1 advanced support unit.
The spatial distribution, i.e., geographic distribution of the vehicles, is considered uniform according to the number of inhabitants, and thus, the model has 8 regions in which a vehicle will be responsible for the service. Two 12-hour work shifts are considered, in which the first shift has eight vehicles available and in the second work shift four of the vehicles.
The settings for the distribution of ticket arrival, service time at the regulatory center, travel time and service at the call site were made from state-of-the-art research using articles that present data from several cities. The arrival was considered exponential, and the other distributions were approximated by triangular distributions for greater proximity to the data observed in the articles. The experiments were performed with the objective of determining the number of effective calls per day that the system can handle without waiting for the patient to be longer than 15 minutes and to identify how the change in the start time of work shifts from 7 h to 8 h, 9 h, 10 h, 11 h or 12 h will affect the waiting time of patients. The relationship between the possible demand and the amount of available resources.
Based on the above, this study presents a discrete event simulation model that represents a city with 800,000 inhabitants that has a basic support ambulance for every 100,000 inhabitants and an advanced support ambulance for every 400,000 inhabitants. There is also the division of the city into regions with 100,000 inhabitants with one basic support vehicle per region. To represent the reduction of resources present in the service systems, during the night shift, only half of the vehicles will be available. At any time, a vehicle that is available in a region other than the originating call may travel for assistance. For the care of patients who require advanced support, the model considers two large regions with one vehicle in each region. The flowchart in Figure 1 represents the process of answering calls in the simulation model. Effective calls arrive at the system (T1), and then, a vehicle is assigned for service to a team that prepares for the exit and then moves to the location of the occurrence (T2). If necessary, initial care was performed at site T3, and the patient was referred to the hospital. At the hospital, the patient was moved to care, the vehicle stretcher was released, and the vehicle team sanitized the stretcher and the vehicle to return to the hospital. basis for new care (T4). The moment the vehicle leaves the hospital unit sanitized, it is available for new care.
For the insertion of data in the model, state-of-the-art surveys of the problems of locating bases and ambulances were performed, and the following assumptions were applied: • Vehicles: The city has 1 basic care ambulance per 100,000 inhabitants and 1 advanced care ambulance per 400,000 inhabitants, according to government regulations (Brasil, 2003); • Proportion of basic and advanced care: The type distribution in the model was 95% for basic support vehicles and 5% for advanced support vehicles. This division was determined from the average of the values of the articles studied; • Travel time to the location of the ticket: For the travel time, two variables are considered: 1) the vehicle belongs to the region of the ticket, triangular travel time (5; 8.27; 19); 2) the vehicle does not belong to the region of the ticket; for this case, an additional time of 5 minutes was considered to be triangular distribution, thus being triangular (10,13,27; 24). The triangular distribution was used based on the mean, minimum and maximum of the studies analyzed; • Local care and release: The time for local care and patient preparation for travel follows a triangular distribution with a minimum of 6, mode 11.9 and maximum of 38 minutes. The triangular distribution was used to represent the mean, minimum and maximum of the studies analyzed; • Displacement to the hospital and release of the vehicle: the times of sending the patient to the hospital, release of the stretcher, cleaning of the vehicle and return have a variation that can be represented by a uniform distribution with a minimum of 12 and a maximum of 38 minutes, considering the minimum times and maximum values of the studies analyzed; • Geographical distribution of calls: calls are evenly distributed among the 4 regions; • Work Shifts: The work shifts have a duration of 12 hours and are initially from 7:00 am to 7:00 pm (day) and from 7:00 pm to 7:00 am (night), and these shifts were set to start. of simulation as standards of urgent and emergency care services. The period from 7 am to 7 pm is called Shift 1, and the period from 7 pm to 7 am is called Shift 2; for Shift 2, a 50% reduction in the number of available vehicles is considered; • Variation in demand during the day: for the variation in demands, three periods during the day are considered: period 1 (night) from 00:00 to 8:00 with the arrival of 20% of the daily demand; period (morning) 2 from 8:00 am to 4:00 pm concentrating on meeting 35% of the demand and period 3 (afternoon) from 4:00 pm to 0:00 am with the receipt of 45% of the daily demand. To determine these proportions, the studies of Ciconet (2015), Silva (2010) and Maruyama LY and Souza RM (2018) were analyzed, and then the mean between the times found in these studies was used. • Change in shift start time: To analyze the variation in demand during the periods of the day and its relationship with the beginning of shifts, the beginning and end of the work shift was changed, and the impact on the maximum waiting time of the patient by the vehicle was analyzed. • Congestion of the system: To verify the service capacity for the different configurations of the system, an experiment was developed with the variation of the number of effective arrivals per day between 5 and 50 arrivals per day, as shown in Table 3. The variation of 5 arrivals is made only by simplicity and computational economy. The simulation model was developed and executed using FlexSim software version 2020.0.1 on a computer, Core i7-6700HQ 2.6 GHz with 16 GB of RAM, and the model execution range represents one month of system work for 24 hours per day. Thus, for each work shift analyzed, from the work shift starting at 7 am to the work shift starting at 12 pm, 30 samples are generated, and the results found are presented in the next section.

Results
The simulation model was initially performed with 5 effective calls per day. With this configuration, there is no generation of queues for basic support units. The system has waiting times for basic support units with 20 effective calls per day or more.
The results of the average waiting times for patients for the different work shifts are shown below. Thus, the waiting time for the daily demands presented was collected for the basic and advanced support units. The results of the average waiting times for the shift start times are shown in Table 4 below. The results of Table 4 show that congestion in the system is generated when there are more than 20 effective calls per day. The lowest average congestion of the system is found for the shifts that start at 9 am and 11 am, and the greatest congestion is in the shifts that start at 7 am and 12 pm. To verify the differences in the means between the shifts, two-way ANOVA was performed, and a statistical test was used to analyze the relationship between the variables present in a study, with the rows representing the arrival rates and the columns representing the start times of the studies. shifts. For the rows, the observed value of the F statistic was 16.96 for a critical value of 2.10, which validates the hypothesis of differences in demands (already proposed in the model). The F value observed for the columns was 3.17, greater than the critical value (2.42); therefore, the hypothesis of equality in the average service times is rejected, that is, there is a difference in the average waiting time for the advanced support vehicles with the change in the start time of the shifts. The same analysis can be performed for the advanced support units (USA). The results for the average waiting time are shown in Table 5. For the advanced support units (USA), the lowest mean waiting times were found with the beginning of the shift at 8 am and 11 am, and the highest means were found in the shifts beginning at 7 am and 10 am. The two-factor ANOVA test was performed for the average waiting times for advanced support units, the rows representing the daily demands and the columns with the shift start times. The F observed for the daily demands was 77.23 greater than the critical value of 2.09, and for the shift start times, the observed value of F was 1.02 greater than the critical F of 2.42. Thus, it is possible to affirm that there is no difference in the average waiting time per unit of advanced support with the change in the start time of the shifts.
To analyze the impact of the number of calls performed during the shifts, the average number of calls per hour was collected for each demand profile and for each shift start time.
The results of the average number of clients served per hour for the advanced support units are shown in Table 6. The average number of clients served per hour does not change significantly for any time of the beginning of the work shift for the basic support units. The results for the advanced support units are shown in Table 7. The results shown in Table 7 show that the average number of people served per day is not significantly altered by changing the shift start time for the advanced support units. Considering the customer waiting and service data, there is a reduction in the waiting time for the basic support units with the change of the start time of the shifts to 9 h or 11 h without affecting the customer service.
The change in the start time of the work shifts can generate differences in the peak moments of the system. To analyze the behavior of the system bottlenecks for each of the shifts, the average waiting times generated in each of the 30 days in the shifts were compared to 1 and 2.
The set of graphs below shows the times when bottlenecks appeared in the system for a daily demand of 50 effective calls; this demand already has congestion, resulting from the variability and unavailability of vehicles in shift 2. The Figure 2 show that in shift 1, which began at 7 am, a long waiting time was observed, reaching a maximum of almost one hour.
For shift 1 starting at 8 am, Figure 3, the waiting time generated is shorter than the previous one, with an outlier close to 50 minutes of waiting.  Study of the impact of the start ... Gestão & Produção, 29, e4421, 2022 11/15 For the simulation with shift 1 starting at 9 am, Figure 4, the average waiting times are shorter and the maximum waiting times are shorter, except for an outlier close to 50 minutes.
For shift 1 beginning at 10 am, Figure 5, there is an increase in the average waiting time with a maximum time exceeding 60 minutes.  Shift 1 starting at 11 am has a maximum waiting time, Figure 6, as low as the system with shift 1 starting at 9 am; however, the mean is naturally higher.
Finally, the Figure 7 shows that the work shift started at 12 o'clock with a maximum waiting time greater than 70 minutes.  Figure 8 below shows, in a static manner, a possible relationship between variation in demand for service during the day and the number of vehicles present in the system in a work shift started at 7 am. The demand curve is greater than the number of vehicles available in the system between 19:00 and 00:00. The average waiting time found in the simulation for this system configuration was 0.38 minutes.  Figure 9 below shows, in a static manner, a possible relationship between variation in demand for service during the day and the number of vehicles present in the system in a work shift starting at 9:00 am. For this scenario, the average waiting time found in the simulation for this system configuration was 0.12 minutes.

Analysis of the impact of the shift of work shifts
The empty space between the demand line and the blue region, which represents the available resources, is smaller for the shift started at 9:00 am. Thus, the waiting times for this shift are shorter. The results of the simulation validate the hypothesis that the waiting time can be reduced by changing the start time of work shifts.

Conclusion
This study aimed to analyze the impact of changing the start and end times of work shifts in an emergency medical care system in a city with 800,000 inhabitants, with a system configuration respecting government ordinance no. 1,864, dated 29 September 2003, which recommends the number of basic support units and advanced support units that should be available in the system. The shifts have a 12-hour amplitude with the proposed start at 7:00 am, 8:00 am, 10:00 am, 11:00 am and 12:00 pm, and the model was executed for one month of work considering the variables every 12 or 24 hours of work, i.e., amplitude of simulation of 30 samples.
The average waiting time found in the system is lower for the scenarios with the work shifts started at 9 am and at 11 am for the basic support vehicles, validated by ANOVA (observed F = 3.17 greater than critical F = 2.42). For the advanced support units, the test shows that there is no significant impact on the change in working hours (F observed = 1.01 less than critical F = 2.42).
The changes in the start time of the work shifts did not generate a significant change in the number of people assisted, as shown in Tables 6 and 7, i.e., the change in the start time of the shifts can generate a shorter wait time for the patients without impairment. in the performance of the system.
The maximum waiting times of patients, also important because more severe cases can result in cases of death, have a lower value for shifts starting at 9 am and 11 am, and it is therefore recommended to start shifts at these times for the system in question. analysis.
The results found for the average waiting time, number of clients served and maximum waiting times in each day and work shift show that the best times to start work shifts are 9 am and/or 11 am, generating a reduction in the mean time waiting times, maintenance of the number of clients served, and a shorter maximum waiting time.
For future studies, this project will be applied to a metropolitan region of the state of São Paulo with a different demand profile and configuration, and the impacts of different demand profiles for the same system will also be analyzed.
Booth authors worked on the conceptualization and theoretical-methodological approach. The theoretical review was conducted by Aníbal Azevedo. Data collection was coordinated by Rodrigo Gigante. Data analysis included Rodrigo Gigante. All authors worked together in the writing and final revision of the manuscript.