Research papers

← vista completa

Use of discrete event simulation and genetic algorithms to estimate the necessary resources to respond in a timely manner in the Medical Emergency System in Bogotá

Uso de simulación de eventos discretos y algoritmos genéticos para estimar los recursos necesarios para responder oportunamente en el sistema de emergencias médicas en Bogotá

Abstract

Introduction Bogotá has a Medical Emergency System of public and private ambulances that respond to health incidents. However, its sufficiency in quantity, type and location of the resources demanded is not known.

Objective Based on the data from the Medical Emergency System of Bogotá, Colombia, we first sought to characterize the prehospital re- sponse in cardiac arrest and determine with the model which is the least number of resources necessary to respond within eight minutes, taking into account their location, number, and type.

Methods A database of incidents reported in administrative records of the district health authority of Bogotá (2014 to 2017) was obtained. Based on this information, a hybrid model based on discrete event simulation and genetic algorithms was designed to establish the amount, type and geographic location of resources according to the frequencies and typology of the events.

Results From the database, Bogotá presented 938 671 ambulances dispatches in the period. 47.4% high priority, 18.9% medium and 33.74% low. 92% of these corresponded to 15 of 43 medical emergency codes. The response times recorded were longer than expected, especially in out-of-hospital cardiac arrest (median 19 minutes). In the proposed model, the best scenario required at least 281 ambulances, medicalized and basic in a 3:1 ratio, respectively, to respond in adequate time.

Conclusions Results suggest the need for an increase in the resources that respond to these incidents to bring these response times to the needs of our population.

Main messages

  • Pre-hospital response times for out-of-hospital cardiac arrest in Bogotá were longer than internationally recommended.
  • Discrete event simulation and genetic algorithms are tools used to optimize resources and improve the performance of emergency medical services.
  • The analyzed information only considered public ambulance dispatches from the emergency medical system.
  • It is necessary to include combined response times in future studies.

Introduction

Changes in the population pyramid – characterized by a higher percentage of adults and associated comorbidities, among other factors – have changed population needs from emergency medical services [1]. Polytrauma and out-of-hospital cardiac arrest have a high morbimortality, cost, and prevalence and have become tracer entities or performance indicators of emergency medical services worldwide [2],[3]. With a defibrillator and cardiopulmonary resuscitation, response intervals of less than five minutes in these scenarios can avoid one death for every eight cases attended on time (NNT = 8) [2].

Emergency response time has become the leading performance indicator of emergency medical services. It is defined as the time between incident notification and ambulance arrival at the incident site. The National Fire Protection Association (NFPA), through the Emergency Medical Operations Standard (NFPA 1710) and the Response Time Criteria Standard (NFPA 1720), as well as several studies, have proposed eight minutes or less as the ideal emergency response time [3],[4].

The actual response time is varied worldwide and is related to the different characteristics of emergency medical service, ranging from 4 to 28 minutes. Some places in Asia, Latin America, and Africa have a response time higher than eight minutes. Cities such as Belo Horizonte (21 minutes), Athens (29 minutes), Sao Paulo (27 minutes), Baltimore (25 minutes), Chicago (10 minutes), Seattle (6 minutes), Melbourne (8 minutes), and Amsterdam (15 minutes) stand out [1],[5].

Bogotá (the capital of Colombia) has an estimated population of 7 333 415 inhabitants, and the emergency medical services include public and private ambulances. The public ambulance system operates through the Single Security and Emergency Number (NUSE123) using the 123 emergency line. It transfers calls to the operational center of the Directorate of Urgencies and Emergencies in Health (DUES) with a code that typifies the incident and pre-establishes the code in three priority levels (high, medium, or low). Of the 96 pre-hospital typing codes of the Single Security and Emergency Number (for October 2017), 43 correspond to health incidents typed when a call is received to the emergency medical services, referring it to the Directorate of Urgencies and Emergencies in Health. According to the health incident and patient’s assessment, the needed resources are assigned and dispatched.

Today, the response times to polytrauma and out-of-hospital cardiac arrest of the emergency medical services in Bogotá and the number of ambulances needed to respond in the expected time is unknown. For this reason, it is essential to estimate the resources needed to respond within the emergency medical services and help generate optimal performance. This performance is ideally achieved if each patient is attended by ambulances from the nearest station. However, in real situations, the demand fluctuates over time and space.

Discrete event simulation (DES) models are a form of computer-based modeling methodology that intuitively and flexibly simulate dynamic behaviors of complex systems and interactions between individuals, populations, and their environments [6]. These simulations provide objective information about systems and policies, generating possible models that mimic reality [1].

This study aimed to characterize the response of the public ambulance system – mainly polytrauma and out-of-hospital cardiac arrest – and determine the number of basic and medical ambulances needed by the emergency medical services to respond on time. The research question was: What is the number of resources needed by the emergency medical services of Bogotá to respond to emergencies on time (within eight minutes), considering the location, number, and type of resources? In all, this project seeks to establish the necessary resources to respond to emergencies on time, optimize emergency medical services, and reduce pre-hospital response times.

Methods

A computer-based simulation was carried out using all health incident reports from the public emergency medical services. The information was obtained from the current incident typing guide and the databases between 2014 to 2017 of the Integrated Security and Emergency Systems of Bogotá, dispatching at least one resource defined as a medical or basic ambulance. The program used for discrete event simulation and genetic algorithms was Python version 3.7. According to the Unique Security and Emergency Number (Annex 1), pre-hospital response times were analyzed from the beginning of care to the arrival at the incident site.

The measured variables were: type of ambulance, number of available ambulances, date and time of call entry to the Emergency and Security Single Number, response time, travel time to the scene, pre-hospital care time (including care from the beginning until the end of care), time spent at the scene, travel time, and time spent at the hospital.

Due to the geographic extension of Bogotá and the dispersion of emergency incidents, there is no specific pattern through which inferences of the spatiotemporal dynamics of emergency events can be constructed. Therefore, we used a spatial dissection based on polygons called zonal planning units to build a robust basis to capture the dynamics and incidence of events in the different areas of the city. This tool is an administrative division used by the district to develop public intervention measures and strategies. The response times of the tracer indicators were described and analyzed according to the prehospital code. The basic unit of geographic analysis was the zonal planning unit.

Based on the statistics collected in each zonal planning unit, an exploratory analysis of the actual data was performed. From this behavior, the generation of random events was proposed, through which all emergencies in the district could be generated, preserving the behavior patterns presented in the real data. Therefore, a model with multiple pseudo-random scenarios was generated, considering spatiotemporal factors such as averages of incidents for each year and time of day. Likewise, relative frequencies were calculated by the hour, type of incident, and priority to reproduce these calculations from the emergency medical services in each zone. These frequencies help us simulate separate and discrete events or activities occurring at a moment in time (often subject to specific probability values), altering the system’s state. Notably, this technique is used to allocate ambulances and simulate emergency incidents to reduce response times of the emergency medical services from the definition of an optimal geographical location of ambulances [7],[8], or redesign of the emergency medical system of the city from the results obtained by the simulation [9].

In addition to the above, it was necessary to establish a system that prioritizes care according to the urgency that emergency medical services should respond to each situation. This involved assigning the best-equipped ambulances to the most severe and complex incidents and basic units to attend minor incidents. Since this was a simulation of a real system, it was necessary to consider essential elements regarding the allocation of resources. In other words, if there was an incident with a higher degree of severity, and there were no ambulances available with the best equipment, the simulation model assigned the following available resource with the best capacity to attend care. Otherwise, it searched successively until the inventory of medical units was exhausted.

When an ambulance is designated, the simulation establishes an average care time (data taken from spatial-temporal analysis of incidents by zonal planning unit), where a unit can not be reassigned until the cycle of activities related to its previous assignment is complete. As a high number of incidents were generated, it was necessary to establish a central control strategy that adequately managed the assignment of ambulances. Therefore, events were stacked to assign ambulances according to the priority of attention they required. As the ambulances were vacated, they were immediately directed to needed areas.

The queuing theory principles [10],[11],[12] were used, including the FIFO (First In, First Out) principle, where the first emergency incident generated was the first to be attended by available ambulances. The queuing theory and its stacking process infer from the average stacking time per incident and the standard care time [10],[11] and estimate the number of missing units to meet the quality of care. The queuing theory application in this simulation model allowed us to establish the proportions of ambulances (basic and medical), minimize the average number of stacked incidents, and reduce the average care time according to the standards of the emergency medical services [12].

The allocation of ambulances in the simulation was performed according to the priority of the incidents. The medical ambulances were assigned to high priority incidents, basic ambulances for medium priority, and no resource for low priority incidents. If there was no resource available to meet the priority of the incident, another type of ambulance was sent if available. From the arrival at the scene, the ambulance had the remaining time to close the incident (i.e., having the resource available again) from the average time of the Directorate of Urgent and Emergency Health Care records. Transfers to hospital facilities were not simulated but were included to complete each incident.

The travel time was calculated considering the distance between the ambulance and the incident, according to the average speed established by the District Mobility department (27 kilometers per hour) of Bogotá. Breakdowns, abnormal events, shift changes, lunch hours, or maintenance of the resources are not considered. The discrete event simulation was run for the week with the highest volume of incidents. For each time unit in the simulation, the status of the incident, occurrence of new incidents, assignment to the queue, time of assignment and arrival, and the calculation of the completion time was verified. When the event was terminated, the status of the resource was changed to available for a new assignment.

In addition to the discrete event simulation model, an optimization process controlled by genetic algorithms [13] was used to validate the suitability of the simulated scenarios resulting from the discrete event simulation. This validation process involves applying the crossover operator in a paired manner to 20 simulated replicates or scenarios generated by the discrete event simulation. From each pairing, a scenario is obtained that mixes the best values for arrival time, assignment effectiveness, number of unattended events, and average number of incidents attended per ambulance – where the best values are those with the highest similarity and most negligible dispersion with the real data. Therefore, the algorithm selected the scenario with the best parameters and repeated this process until all combinations were completed and until the most suitable scenario was obtained, comparing 2000 scenarios with different combinations or configurations [14]. The configuration that best fitted the weighted criteria of the entire simulation was selected as the optimal solution to the problem.

This project received no external funding. Considering the nature of the research, only the approval of the research committee of the Secretaría Distrital de Salud in Bogotá was necessary.

Results

In Bogotá between January 2014 and October 2017, resources were dispatched through the Directorate of Urgencies and Emergencies in Health to 938 671 incidents (Table 1) that needed an ambulance. Of these incidents, 47.4% were considered high priority, 18.9% medium priority, and 33.7% low priority.

Figure 1 shows the accumulated events, which had a similar trend in their behavior for each year in most of the codes. Of the 96 codes used to typify the safety and emergency incidents in the Unified Safety and Emergency Number, 43 corresponded to health incidents. Of the latter, 15 codes accounted for 91.3% of all health events in the period of interest. These were used for the discrete event simulation model (Figure 2).

An exploratory data analysis was performed regarding the behavior between 2014 to 2017 of pre-hospital code 613, which represents polytrauma and out-of-hospital cardiac arrest. We obtained a similar pattern of incidents between quartiles one and three from kurtosis and skewness analysis. Similarly, Figure 3 shows kurtosis getting smaller over time, indicating that the system is becoming more and more dispersed in the response times to this code. Also, there is an increasing trend in the median, which was 19 minutes in 2017.

Regarding the methodology of discrete-event simulation and genetic trees, 2000 configurations were generated, evaluated, and combined until the optimal model was obtained. Thus, a 3:1 ratio was achieved for medical and basic ambulances (Figure 4).

Once the configuration was created, the event was stored in the stack designed with queuing theory (following the First In, First Out principle). An event selection ranking was carried out under this same principle, where the distribution in quartiles of the times of each stored incident was established. Thus, from the median and inter-and intra-quartile analysis, the number of ambulances required to reduce the stacking in the queue of incidents was obtained. From these results, it could be inferred that the care time required to attend at least half of the population requiring high priority care (according to the emergency) is below eight minutes and that 120 ambulances would be needed. Likewise, the number of ambulances for queued incidents up to quartile three would be 140, and 281 ambulances would be needed to attend more than 90% of the high-priority incidents (Table 2).

Incidents by zonal planning unit accumulated in Bogotá from 2014 to 2017.
Full size
Distribution of the main pre-hospital health codes in Bogotá from 2014 to 2017.
Full size
Box plot showing the response time behavior from 2014 to 2017 for code 613 unconscious/cardiac arrest.
Full size
Distribution of incidents of the average year generated by simulation and ambulance bases used.
Full size
Priority of incidents according to year, period from 2014 to 2017.
Full size
Ambulances needed according to the percentage of inhabitants with high priority covered in less than eight minutes.
Full size

Discussion

In high-priority patients, it has been shown that survival is higher with decreased response times and timely interventions, finding significant differences in those receiving basic or advanced resuscitation interventions [4]. Likewise, reducing ambulance response times to five minutes could nearly double the survival rate of cardiac arrests not witnessed by ambulance crews [15]. Other authors have found this benefit in interventions in less than four minutes [16].

We found that the response times found in polytrauma patients and out-of-hospital cardiac arrest were higher than recommended in Bogotá. A median of 19 minutes suggests the need to review the emergency medical services and search for

strategies to improve this response. It should be noted that the registry only included ambulances that were successfully sent. However, this analysis may underestimate incidents because we did not have information over unsuccessful calls or highpriority cases unmet due to unavailable resources. Although not measured, the overcrowding of institutions may be associated with a late release of ambulances from institutions. Consequently, their change in availability status may have influenced the greater need for ambulances in the models. A significant percentage of low-priority patients was also identified in emergency calls, which may represent an opportunity to educate on the proper use of emergency resources when calling the Single Security and Emergency Number.

This substantial variability in the response time of cities with large populations has already been identified [5]. In Lima, 13% of high-priority cases had pre-hospital response times of less than eight minutes, with an average of 24 minutes [17]. This variability phenomenon was seen in multiple cities (as previously described) and should lead to the individual analysis of their processes and the components of each emergency medical service. Every aspect that influences the reduction of response times should be considered. These processes include reception of calls, emergency medical services organization, telephone triage, available resources, ambulance dispatch, and arrival time. Moreover, the emergency medical services should consider an adequate number of ambulances to respond ideally to 90% of the projected incidents, with the response time according to their priority (eight minutes). Indeed, emergency care is not a luxury of rich countries. Adequate emergency medical services can significantly reduce disability and death in lowand middle-income countries [18]. In emergency medical services, efficient communication and rapid transport are critical and interdependent to achieve efficiency in improving survival. Innovations are needed to provide better use of these resources. Discrete event simulation models and algorithms are tools that can help complement the assumption that more specialized ambulances translate in better response time and care, especially in those realities where budgets are low. Considering that resources are limited, we must define the amount, which, and where these resources should be allocated to respond adequately to emergencies.

The geospatial distribution of resources as a strategy to reduce response times are tools used worldwide [19]. As evidenced in other studies, emergency medical services have been optimized by multiple models [20]. Through simulation of discrete events a methodology that has been increasing in recent years [6],[21] states have created strategies to expand the ambulance fleet with optimal dispatch according to demand [22],[23], geolocalize cardiac arrests [24], and dynamically localize ambulance base sites to respond to incidents [25]. This paper sought help achieving optimal location and quantity scenarios by comparing and evaluating multiple scenarios.

Limitations

Although the discrete event simulation methodology and genetic algorithms give a flexible approach that allows simulating dynamic behaviors of complex systems and interactions, this study has several limitations that should be acknowledged. For example, only public ambulance dispatches from the emergency medical services were analyzed in the city. Since information from the private component was not included in the analysis, the combined response times are unknown. Likewise, only the population that received ambulance care was analyzed, and therefore, the proportion of incident calls requiring a resource but did not complete the dispatch process is unknown. Similarly, many – but not all – variables were included to generate the discrete event simulation. Unmeasured variables that may be relevant include unforeseen events, breakdowns or abnormal resource events, personnel shift changes, lunch hours, and maintenance. Likewise, arrival at the scene does not imply being at the patient’s side to initiate care, so each "vertical response time" should be considered in the records [26]. Ambulances that performed inter-agency transfers outside their function within the emergency medical services were not considered, nor was traffic considered a factor that significantly influences response times.

The total incident time is continuous and ends when the ambulance is released from the hospital. It is necessary to consider the overcrowding and availability of resources in the reception of ambulances as it may better predict the availability of resources when hospital care ends. These variables directly impact the allocation of resources and the number of ambulances required to obtain response times at adequate levels. More studies that aid decision-making and include essential variables in the emergency response should be conducted.

Conclusions

The response times to polytrauma and out-of-hospital cardiac arrest in the period analyzed surpassed the recommended time.

In order to achieve adequate pre-hospital response times in Bogotá, the discrete event simulation methodology with genetic algorithms helps better estimate the mobile resources needed for health incidents in the city.

This type of strategy is a necessary aid in identifying health needs. These findings warrant further studies to improve political decision-making and reduce pre-hospital care times. 

Notes

Contributor roles
LGAM, RRR, JCR, JOB, and JMR contributed equally to the conceptualization, methodology, data analysis, initial document preparation, review, and editing.

Acknowledgments
Special thanks to the Directorate of Health Emergencies and Emergencies of the District Health Secretariat of Bogotá. We also thank the Command, Control, Communications, and Computing Center of the District Secretariat of Security, Coexistence, and Justice of Bogotá.

Competing interests
The authors completed the ICMJE conflict of interest statement and declared that they did not receive funds for this article; they have no financial relationships with organizations that may have an interest in the published article; and they have no other relationships or activities that may influence the publication of the article. Forms can be requested by contacting the responsible author or the Editorial Board of the Journal.

Funding
No funding was provided for this work.