Hospitalization Forecast to Inform COVID-19 Pandemic Planning and Resource Allocation Using Discrete Event Simulation

: Purpose: This study aims to address the pressing need for accurate forecasting of healthcare


Introduction
In 2020, the World Health Organization (WHO) declared COVID-19 a public health emergency of international concern (World Health Organization).Since then, it has turned out to be the most important pandemic in a century.From an economic standpoint, numerous studies report staggering impacts.In Spain, a study in six long-term care facilities estimated that direct medical costs amounted to EUR 276,281 per month during the epidemic (, Mas-Romero, Avendaño-Céspedes, Tabernero-Sahuquillo, Cortés-Zamora, Gómez-Ballesteros, Alfaro et al., 2020).In another study in Madrid, the cost of medical treatments reached EUR 440,000 per 1000 hospitalized patients.Nevertheless, the 10.8% drop in the gross domestic product (GDP) is the most demonstrative figure of the economic fallout from the pandemic (INE).In the USA, total direct medical costs throughout the pandemic have been estimated to range from USD 163.4 to USD 654 billion, depending on the total amount of people finally infected (Bartsch, Ferguson, McKinnell, O'Shea, Wedlock, Siegmund et al., 2020).Similar repercussions have been reported in Turkey, Switzerland, and China or Italy (Li, Jin, Zhang, Deng, Shu, Qin et al., 2020;Oksuz, Malhan, Gonen, Kutlubay & Keskindemirci, 2021;Olivieri, Palù & Sebastiani, 2021;Vernaz, Agoritsas, Calmy, Gayet-Ageron, Gold, Perrier et al., 2020).
The pandemic has also had unprecedented impacts on global health systems, with administrators and doctors struggling to allocate sufficient resources to meet the demand for services (Emanuel, Persad, Upshur, Thome, Parker, Glickman et al., 2020).During the first wave in early 2020, hospital capacity was dramatically overwhelmed, not only in Spain but worldwide (Condes & Arribas, 2021;Griffin, Karas, Ivascu & Lief, 2020).To cope with the deficit of resources, planning and preparation measures to scale up hospital resources were implemented.Surgical theatres were transformed into intensive care units (ICU), while meeting rooms, libraries, and rehabilitation gyms were all refitted to serve as conventional wards.The stressful working conditions brought on by the pandemic also provoked substantial mental health problems among health care workers (Lai, Ma, Wang, Cai, Hu, Wei et al., 2020).
In an effort to help support hospital administrators in resource planning for real short-term future pandemic-related needs, our group created a predictive tool based on local data.The aim of this study is to assess the predictive capacity of this local tool based on the real evolution of the pandemic in two similar Spanish hospitals.

Theoretical Framework
The public health crisis put enormous pressure on administrators, who had to search for more medical resources and supplies, including conventional hospital beds, ICU beds, ventilators, protective personal equipment, and health care staff (Marin-Garcia, Garcia-Sabater, Ruiz, Maheut & Garcia-Sabater, 2020).Over the successive waves, administrators have also been challenged with decisions on when and how to scale down the deployment of organizational resources in order to return to normal activity levels as soon as possible.
Mathematical models have been widely used to inform public health policy during the pandemic (Ferguson, Laydon, Nedjati-Gilani, Imai, Ainslie, Baguelin et al., 2020;Xiang, Jia, Chen, Guo, Shu & Long, 2021).Various epidemiological models have been developed (Davies, Kucharski, Eggo, Gimma, Edmunds, Jombart et al., 2020;Flaxman, Mishra, Gandy, Unwin, Mellan, Coupland et al., 2020;Fuente, Hervas, Rebollo, Conejero & Oliver, 2022;Keeling, Hill, Gorsich, Penman, Guyver-Fletcher, Holmes et al., 2020;Lozano, Orts, Piñol, Rebollo, Polotskaya, Garcia-March et al., 2021).Those papers analyze the evolution of COVID-19 outbreaks in several regions.The models were validated with real data and aim to support evidence-driven policy-making during the pandemic.It seems that most outbreaks are controlled within two weeks using non-pharmaceutical interventions (Fuente et al., 2022) and also it is possible to estimate the percentage of population being infected during a period of time (Flaxman et al., 2020).However, these models address the dynamics of the pandemic at a regional or national level, so they are of limited use at the local or center level, where daily activity is organized.
Models to predict the need for specific hospital resources have also been developed in the USA, Chile, and Europe (Baas, Dijkstra, Braaksma, van Rooij, Snijders, Tiemessen et al., 2021;Goic, Bozanic-Leal, Badal & Basso, 2021;Olshen, Garcia, Kapphahn, Weng, Wesson, Rutherford et al., 2021;Qian, Alaa & van der Schaar, 2021).Baas et al. (2021) developed a mathematical model that provides real-time forecasts of COVID-19 bed occupancy in hospital wards and Intensive Care Units (ICUs).Their model uses predicted inflow of patients, Length of Stay (LoS) in the ward and ICU, and patient transfers between the two.The algorithm was tested during the first COVID-19 peak in the Netherlands and showed high accuracy.It is currently being used in several Dutch hospitals during the second peak.Goic et al. (2021) focused on short-term forecasting of ICU bed demand during the COVID-19 crisis in Chile.They combined autoregressive, machine learning, and epidemiological models to provide regional-level forecasts.Their predictions achieved low average forecasting errors of 4% and 9% for one-and two-week horizons, respectively, outperforming other models.Nguyen, Turk and McWilliams (2021) explored the use of local COVID-19 infection incidence data to develop a forecasting model for the COVID-19 hospital census.They used a multivariate time-series framework and found that it effectively predicted the hospital census.The model had a very good 7-days-ahead forecast performance and outperformed the traditional autoregressive integrated moving average (ARIMA) model.Olshen et al. (2021) developed an autoregressive model combined with a parametric bootstrap approach to forecast COVID-19 hospitalizations in the short term (two to four weeks).Their data came on San Francisco Bay Area hospitalizations and found that it outperformed other USA models in terms of accuracy.Qian et al. (2021) developed a machine learning-based system for hospital resource planning.The model was successfully deployed at individual hospitals and across regions in the UK.
These studies demonstrate various modeling approaches that aim to forecast COVID-19 hospital metrics at different time scales.They often show improvements in accuracy compared to baseline methods, emphasizing the significance of precise forecasting in terms of bed occupancy for effective resource planning and capacity management during the pandemic.
However, these articles also shed light on the challenges associated with implementing such models in real-world settings.One notable challenge is the requirement for infrastructure and technical skills, which can be a significant barrier for most hospital management teams, particularly in the Spanish context where the majority of these teams consist primarily of healthcare personnel.
The need for specialized technical knowledge and resources can pose prohibitive obstacles for hospitals, potentially limiting their ability to leverage advanced forecasting models.It is crucial to recognize and address these challenges to ensure that hospitals have the necessary support and resources to implement effective forecasting strategies and optimize resource allocation.By overcoming these implementation barriers, hospitals can enhance their capacity to effectively manage COVID-19 patient loads, allocate resources efficiently, and ultimately provide better care to their communities.
Simulation models have been widely used in research articles focusing on hospital bed management (Ahmad et al., 2014;Clissold et al., 2015;Hajlasz & Mielczarek, 2020;He et al., 2019;Helbig et al., 2015;Holm et al., 2013;Khanna et al., 2016;Landa et al., 2017;Mallor & Azcarate, 2014;Monks et al., 2016;Oliveira et al., 2020;Qin et al., 2017;Seymour et al., 2015;Varney et al., 2019).These computer-based tools mimic real-world systems and processes and are particularly useful for predicting and analyzing patient flow and resource utilization in hospital settings.Ahmad, Ghani, Kamil and Tahar (2014) discusses the use of a hybrid simulation model combining discrete event simulation and system dynamics in the context of emergency departments.The model developed using AnyLogic software study patient's flows and interactions among hospital resources.Khanna, Sier, Boyle and Zeitz (2016) focus also on the emergency department in a large hospital's and used discrete event simulation to assess discharge scenarios.They found that discharging 80% of patients before 11 a.m. or spreading the discharge target between 10 a.m. and 2 p.m. resulted in similar improvements in performance, reduced bed occupancy, and shorter hospital length of stay.In another work related to emergency departments, Landa, Sonnessa, Resta, Tanfani and Testi (2017) addressed the problem of patient boarding due to the lack of available stay beds in inpatient hospital wards.They proposed a hybrid simulation framework that combined System Dynamics and Discrete Event Simulation.The framework was applied and validated using data from a medium-size public hospital in Italy.Clissold, Filar, Qin and Ward, (2015) present a Markov Decision Process model for optimizing patient flow in Australian hospitals.By analyzing historical bed occupancy data and using a weekly time horizon, the authors propose policies to reduce congestion and improve the quality of care.Hajlasz and Mielczarek (2020) conducted a case study using discrete event simulation to predict hospital admissions and bed utilization in a Polish district hospital.The study found that a 6% reduction in admissions to the pediatric ward resulted in a decrease in average bed utilization from 57.90% to 54.06%, while a 12% increase in admissions to the geriatric ward led to an increase in bed utilization from 68.88% to 75.59%.Helbig, Stoeck and Mellouli (2015) focused on improving hospital efficiency by clustering softened patient arrival peaks and reduced bed bottlenecks.Holm, Luras and Dahl ( 2013) developed a simulation model using discrete event simulation to minimize crowding and improve bed utilization in a Norwegian general hospital.Mallor and Azcarate (2014) developed a simulation model to study bed occupancy levels in an Intensive Care Unit (ICU).They proposed generalized regression models to capture the high variability of patients' length of stay and proposed a hybrid method that combines optimization with simulation to estimate the model parameters.The model was validated using data from a Hospital Navarra.Monks, Worthington, Allen, Pitt, Stein and James (2016) highlight the limitations of simple average-based estimates and analyse the capacity requirements for stroke services using a discrete-event simulation model.They find that planning by average occupancy fails and propose a simulation-based approach for assessing future bed numbers and organization of services.Qin, Thompson, Bogomolov, Ward and Hakendorf (2017) demonstrate that strategies such as 24-hour discharge or discharge/relocation of long-staying patients can significantly reduce overcrowding and improve occupancy rates.Seymour, Alotaik, Wallace, Elhabashy, Chhatwal, Rea et al. (2015) using simulation found that regionalization based on prehospital triage of critically ill patients can allocate high-risk patients to referral hospitals without adversely affecting ICU occupancy or prehospital travel time.Varney, Bean and Mackay (2019) discussed the self-regulating nature of occupancy in intensive care units (ICUs).They highlighted the link between admission and discharge behaviors, such as bumping or premature discharge, which can create a correlation between the arrival process and length of stay distribution.They demonstrated the problems this correlation structure can cause in capacity models based on queueing theory and discrete event simulation.They also provided methods to test for and account for this correlation structure when simulating ICU occupancy.Oliveira, Bélanger, Marques and Ruiz (2020) develop a mathematical model to assign surgery sessions to surgeons and patients to surgeons, aiming to maximize the total utility while considering practical requirements in a Urology Department in Quebec City.
The studies mentioned above highlight the value of simulation techniques in predicting and managing occupancy levels in hospitals, particularly in emergency departments and intensive care units.These studies offer valuable insights into the use of simulation models for predicting hospital admissions, optimizing bed utilization, and improving decision-making in hospital bed management.Simulation models are widely employed to understand and manage resource capacity, optimize patient flow, support short-term planning during epidemics, and enhance decision-making in ICU management.In fact, He, Madathil, Oberoi, Servis and Khasawneh (2019) found in their systematic review on inpatient bed management that simulation modeling is the dominant technique utilized in bed management.
Garcia-Vicuna et al. ( 2020), developed a management dashboard for an Intensive Care Unit (ICU), which serves as a learning and training tool for analyzing physician decision-making related to patient admission and discharge.They used a discrete event simulation model that mimics real admission and discharge processes in ICUs, incorporating real clinical data to recreate the health status of patients.The tool has been validated by ICU physicians and nurses from four hospitals.The paper highlights the variability among physicians in decisionmaking, particularly regarding the last available ICU bed and the admission and discharge of patients as the ICU reaches capacity.In another paper, the same authors (Garcia-Vicuna et al., 2022) present a discrete event simulation model for hospital preparedness during epidemics, focusing on the COVID-19 pandemic.The simulation model supports decision-making for short-term planning of hospital resource needs, particularly ICU beds.The model includes stochastic modelling of patient admission and patient flow processes.The patient arrival process is modelled using a Gompertz growth model, which provides a better fit to pandemic-related data and superior prediction capacity compared to other models.The paper reports on the application of the simulation model in two Regions of Spain during the COVID-19 waves in 2020, where the model was used daily to inform regional healthcare planning teams.Le Lay et al. (2020) propose a data-driven discrete-event simulation model to predict bed requirements in a healthcare centre during the COVID-19 pandemic.The model is based on data from a French university hospital and aims to provide a decision-aid tool for hospital managers to determine bed and staff requirements.Overall, these papers highlight the use of discrete event simulation models in healthcare settings to support decision-making and improve hospital preparedness during epidemics, such as the COVID-19 pandemic.

Methods
This study took place in two hospitals in Alicante, Spain.The Hospital Universitario San Juan de Alicante serves 223,962 inhabitants and has 386 hospital beds, of which 16 are ICU beds.The Hospital Vega Baja has a catchment population of 167,149 inhabitants and has 350 total beds and 14 ICU beds.
We aimed to predict new hospital admissions and the need for hospital beds and ICU beds for patients infected with COVID-19.The study included all people in the hospital catchment area with a positive microbiological COVID-19 test from 10 July 2020 to 10 January 2022.No exclusion criteria were applied.
To model the length of stay on a conventional ward, the data for the length of stay at the Hospital Universitario San Juan de Alicante was used.The length of stay was fitted to a Weibull distribution using Neld-Meld optimization method as implemented in the R stats package.To model the length of stay in the ICU, the same procedure was undertaken.
A discrete event simulation model was programmed in R using the simmer package (R core team, 2020; Ucar, Smeets & Azcorra, 2019).The model was fed by the generator.Length of hospital and ICU stay were modelled using the cited distributions.The code is available at https://github.com/pwjpwj/COVIDupon reasonable request to the corresponding author.
To assess the performance of the predictions, the absolute difference between predicted and observed occupancies were measured and reported as the median absolute difference (MAD) with their interquartile range (IQR).Real data on admissions, hospital bed occupancy, and ICU bed occupancy were obtained from the hospital system's electronic medical records.

Results
Figure 1 shows the complete patient pathway.Briefly, the admissions generator determines whether a COVID-19 patient that tests positive is likely to need hospitalization.Once admitted, they may or may not need ICU admission and then are finally discharged (dead or alive) (Marin-Garcia, Ruiz, Julien & Garcia-Sabater, 2021; Redondo, Nicoletta, Bélanger, Garcia-Sabater, Landa, Maheut et al., 2023).We developed a two-step Markov model to predict the likelihood of hospitalization in the general population with a microbiologically confirmed COVID test (either PCR or antigen test).A Markov model is a mathematical model used to predict the probability of transitioning from one state to another over time.In the context of predicting hospitalizations, these states might be 'Not Hospitalized' and 'Hospitalized'.In the case of hospitalizations, two new states emerge: 'Ward bed needed' or 'ICU bed needed'.The two-step model means that it considers a sequence of two states to make its prediction.
To this end, the age-adjusted probabilities of hospitalization as reported by Verity, Okell, Dorigatti, Winskill, Whittaker, Imai et al. (2020) were used.Age is a known risk factor for COVID-19 severity.Younger people typically have a lower risk of severe outcomes (like hospitalization), whereas older individuals have a higher risk.By age-adjusting the probabilities, the model can make more accurate predictions based on a person's age.
In plain words, the process followed is as follows: a) The model takes into account a patient's age and the positive result of their COVID test; b) It determines the hospitalization probability for the patient's age group; c) Using a two-step sequence of states, the model predicts the likelihood of the patient moving to the next state.This prediction is based on the initial state, the transition probabilities (which may be influenced by age-adjusted hospitalization risk and other factors or data incorporated into the model); d) The model provides an output, which is the likelihood of hospitalization (ward or ICU).
The probability of admission was multiplied by the number of positive tests within each age group.Infected patients who need admission are usually hospitalized around the seventh day of symptoms (Marin-Garcia et al., 2021), so assuming that the test is done on the first day of symptoms onset and that all the patients tested in the area served by the hospital are processed at its Microbiology Department, it is possible to estimate the number of patients that need hospitalization one week in advance.
Due to variability in the natural course of the disease in each patient as well as a weekend effect in the testing chain, the total number of hospitalizations was calculated on a weekly rather than daily basis.This allowed us to predict the expected number of total hospitalizations from one week to the next.
As of 15 December 2021, the probability of hospitalization fell by 70%, corresponding with the risk reduction due to vaccination; this figure was adjusted for a vaccination coverage of 80% (Collie, Champion, Moultrie, Bekker & Gray, 2022).
From 10 July 2020 to 10 January 2022, the model was used to guide hospital policy and informed by a continuous and simultaneous validation of results.To evaluate whether other hospitals could make use of the tools, a second test was conducted at the Hospital Vega Baja during the same period.
The admissions generator was programmed in R and validated through visual inspection of the predictions and comparison to real admissions, as shown in Figure 2. As a metric of accuracy, the MAD between prediction and reality was 6 admissions/week (IQR 2-11).Blank columns correspond to periods without admissions The hospitalization pathway was modelled as discrete event simulation in R. Length of stay in a conventional ward and in the ICU was modelled using a Weibull distribution (Table 1).
Real and predicted bed occupancy was very close (Figure 3A).As a metric of accuracy, the MAD between prediction and reality was 20 beds/day (IQR 5-43), corresponding to 5% of total hospital beds.Real and predicted ICU bed occupancy was also evaluated (Figure 4 A), yielding a MAD of 4 beds (IQR 2-7), or 25% of ICU capacity.
A second assessment of the model was performed for Hospital Vega Baja (Figure 3B and 4B).In this case, the admissions generator showed a MAD of 2.42 admissions/week (IQR 1.02-7.41).The hospitalization pathway simulator showed a MAD of 18 total hospital beds/day

Discussion
Previous models described in the literature (Goic et al., 2021;Olshen et al., 2021) have achieved better accuracy for predicting admissions, but they are considerably more complicated to implement than our approach (Nguyen et al., 2021;Qian et al., 2021).The very simple method of multiplying the number of COVID-19 positive tests by the age-stratified probability of hospitalization yielded useful estimates of future admissions at one week.
Additionally, the use of a discrete event simulation model to predict not only new admissions, but also the total beds needed (through a complex dynamic composite calculation of new admissions, patients already on the ward, and patients discharged) is the most original feature of our work.Previous reports have used this approach (Caro, Jörgen, Santhirapala, Gill, Johnston, El-Boghdadly et al., 2021), but validation was not reported as in our model.Recently, a discrete event simulation model similar to our approach has been described (Garcia-Vicuna et al., 2022).However, it modeled two entire autonomous regions in Spain and did not focus on a specific hospital.That study used a population growth Gompertz model to simulate patient admissions.This would preclude the need for patient-level microbiology data, which can be challenging to obtain in some settings.
The accuracy of our model is not perfect, and, for admissions, it does not perform as well as other models (Olshen et al., 2021).Moreover, the precision for ICU beds is worse than that for the total number of beds.However, our administrators considered it useful for improving planning and preparation.

Conclusions
Using a prospective model based on the positive COVID-19 test results in the hospital's catchment population, we were able to predict, one week in advance: 1) new hospitalizations, 2) the expected total number of hospital beds needed to attend these patients, and 3) the number of ICU beds needed.This information was used to plan and prepare the local resources needed in advance.The validity of the model was confirmed at a second hospital.
One strength of the tool is that it is data-driven, making it less prone to errors.Also, the tool was developed at one centre and validated at another, showing that the results are quite robust and work well in more than one setting.This external validation, together with its simplicity, makes it easy to scale up and apply elsewhere, with few infrastructure needs.The admissions generator can be implemented on an open-source spreadsheet.The discrete event simulation model tool, although somewhat more elaborate, can also be implemented with free software.
From a practical point of view, our model supported hospital resource planning on planning on a local scale during successive COVID-19 waves.Additionally, it might also aid decision-making around when and how to reactivate elective surgical procedures suspended during peak epidemic periods.
In conclusion, the tool presented here enables the prediction of regular and ICU hospital admissions one week in advance for COVID-19 patients at a hospital level.The tool has been useful for improving planning and resource allocation at our centers and has been a source of reassurance for hospital staff in the face of the psychological stress of the unknown.Future developments will be needed to adjust for vaccine efficacy and coverage and emergence of new variants as well as to refine the tool's precision and develop an admissions generator that does not rely on laboratory test results.Additionally, it would also be interesting to refine the accuracy of the ICU beds.
COVID-19 is the strongest pandemic of this century.Planification and adaptation to the new scenario are important and tools to help guide this process are needed.We have evaluated a simple forecasting tool to predict the hospitalization beds and intensive care unit beds needed to attend COVID-19 patients at a local level in Spain and found very interesting results with the use of freely available software.We were able to predict one week in advance the need of normal hospital ward beds and intensive care unit beds needed to attend COVID-19 patients, with a level of precision that was deemed useful by our managers.The tool was used to scale up and scale down the hospital beds and staff allocated to treat COVID-19 patients as well as to decide when to stop and to start again the performance of programmed surgeries.

Figure 1 .
Figure 1.Schematic representation of the forecast tool.ICU: intensive care unit; LOS: length of stay

Figure 2 .
Figure 2. Comparison of predicted weekly number of admissions and actual admissions over the observation period in the Hospital Universitario de San Juan (A) and the Hospital Vega Baja (B).Time is represented as weeks since 1 September 2020.Blank columns correspond to periods without admissions

Figure 3 .
Figure 3.Comparison between predicted hospital bed occupancy and actual occupancy.A) Hospital Universitario San Juan de Alicante, B) Hospital Vega Baja

Figure 4 .
Figure 4. Comparison between predicted ICU bed occupancy and actual occupancy.A) Hospital Universitario San Juan de Alicante, B) Hospital Vega Baja