COVID-19 Impact Estimation on ICU Capacity at Andalusia, Spain, Using Artificial Intelligence

The objective of this article is to evaluate the spread of the virus and estimate the cases of infected population in need of urgent hospitalization, in order to provide sufficient resources to public health. To this end, a deep learning tool based on deep neural networks (DNN) was developed to predict COVID-19 infection and the need for urgent hospitalization in some of the infected patients. We associated the available resources of public hospitals and evaluated the need to increase them after the possible substantial increase caused by SARS-CoV-2 by provinces in the regions of Andalusia, Spain.


Introduction
In early 2020, the world began to watch with caution the spread of an outbreak of pneumonia associated with a new coronavirus, called severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2), which originated in late December 2019 in Wuhan City, Hubei Province, China. The rapid spread of this outbreak meant that in just one month more than 33 countries were infected with more than 85,200 cases [3]. On January 30, 2020, the World Health Organization (WHO) declared the outbreak a Public Health Emergency of International Concern (PHEIC) [9]. On February 12, 2020, WHO named the disease caused by the novel coronavirus as Coronavirus Disease 2019 (COVID-19) [8]. As of April 2020, the new coronavirus COVID-19 has already infected more than 1.3 million people and caused more than 76,000 confirmed deaths worldwide [3].
The global impact of COVID-19 represents a threat to the public health systems of the affected countries. In order to curb the number of infections, individual countries have established a first phase of control based on drastic population-based measures to reduce the number of reproductions, i.e. the average number of secondary cases generated by each case to less than 1, and thus reduce the number of cases to low levels or eliminate human-to-human transmission. The next phase of epidemic control is mitigation through drugs or vaccines that are not yet available [15].
COVID-19 disease has serious clinical manifestations including death. In Spain, according to data from the Ministry of Health, on 7 April 2020 there were 140.510 positive cases and 13.798 deaths [4]. Of all the positives, 7069 were admitted to Intensive Care Units (ICU). Among the problems associated with serious health manifestations in patients who contract the disease is the urgent need for hospital care. In times of pandemics, public health services are insufficient to treat critical patients, and it is difficult to provide adequate protective equipment and its correct use. In Italy, doctors have proposed to allocate crucial resources, such as intensive care beds and ventilators, to those patients who can most benefit from treatment [11]. In South Korea there was a shortage of hospital beds and some patients died at home while waiting for admission. In the United Kingdom, protective equipment requirements for health workers have been reduced, leading to condemnation of providers. The rapid imbalance between supply and demand for medical resources in many countries raises an inherently regulatory question: how can medical resources be allocated during a Covid-19 pandemic?
The objective of this article is to evaluate the spread of the virus and estimate the cases of infected population in need of urgent hospitalization, in order to provide sufficient resources to public health. To this end, a deep learning tool based on deep neural networks (DNN) was developed to predict COVID-19 infection and the need for urgent hospitalization in some of the infected patients. We associated the available resources of public hospitals and evaluated the need to increase them after the possible substantial increase caused by SARS-CoV-2 by provinces in the regions of Andalusia, Spain.

Evolution in Spain
The first case in Spain was detected on January 31 st with an isolated case in Las Islas Canarias with six cases reported by the 24 th of February. A second case was detected in Baleares on the 9 th of February.
Until March 24 th there was no official record of the virus outside the Spanish islands, however the following day the virus was detected in different cities in Spain, i.e. Madrid and Catalonia.
Madrid and Catalonia are the two provinces that COVID-19 spread radically possible due to the population, density and interaction with other cities. The majority of the provinces that had only a few cases where protected by the strict measures put in force by the government. For instance, in Spain measures started on the 15 th of March [10].

Evolution in Andalusia
Andalusia is the most populated region of Spain with 8.1 million inhabitants, followed by the Capital of Spain, Madrid, with 6.6 million inhabitants [5]. However, despite having the largest number of inhabitants, Andalusia is the fifth most affected region in Spain with 8.301 cases [4].
The first case of SARS-CoV-2 in Andalusia was detected on March 10th in Almeria, where the virus began to spread. The second cases in other region was in reported in Cadiz on March 13th. After that, the rest of regions were infected until today.
Subsequently, from then on the number of cases within Spain started to grow exponentially. In Figure 1 the evolution of COVID-19 is depicted for each Andalusia region [1]. According to this figure, Malaga and Seville are the two regions that COVID-19 spread radically, possible due to the high population and density.
The evolution of infected cases has been more prominent in Malaga, Seville and Granada where the infected cases are higher than 1.000 cases in each province. It can be seen in Figure 2.
Following the same tendency described above, in Figure 3 to Figure 5 the number of ICU, deaths and recovered number of people are higher in the provinces who has higher number of infected people such as the provinces of Malaga, Granada and Seville. In 4.3 are explained the relations between these tendencies in the different provinces.

Evolution of COVID-19 in Spain
The Spanish Government, through its Health Alert and Emergency Coordination Centre, makes a daily statement which gives information on the evolution of cases of coronavirus [4]. This dataset contains information about: 1. Positive COVID-19 cases, hospitalization, admission to ICU, deaths and recovered cases in each Autonomous Community.
2. Distribution of cases: Gender and age.
3. Historian of the pandemic in Spain and in each Autonomous Community.

Evolution of COVID-19 in Andalusia
The Andalusian Government, through its Health and Family Council, makes a daily statement in digital format which gives information on the evolution of cases

Medical Resources in Spain
The Spanish Government, through its Ministry of Health, Consumer Affairs and Social Welfare, offers a national hospital catalogue with information of their resources. In this document is discomposed the resources of the hospitals in each province [7].

Estimation of ICU Resources at Andalusia
The Andalusian Government, through its Health and Family Council, has facilitated the figures of their Intensive Care Units, ICU [2]. The information given by the Andalusian Government is the following: 1. ICU resources per Andalusian Province.

The SIR Model
The SIR (Susceptible-Infected-Recovered) model is a mathematical model commonly used in epidemiology since it is capable of capturing many of the typical characteristics of epidemic outbreaks. The simplicity of this model is based on three assumptions. Firstly, the population is fixed during the analysis. Secondly, there is no any socioeconomic characteristic that could influence in the probability of being infected [14]. Thirdly, there is no inherited immunity [12]. SIR model consists of three ordinary differential equations, where S(t) represents the susceptible people, I(t) represents the infected people and R(t) represents the recovered people. β and γ are the infection and recovery rate parameters, respectively.
Using numerical integration techniques, these equations (1) -(3) are solved for a pre-specified period of time.
A epidemiological threshold ratio is commonly studied in the evolution of a disease, being this one as a key indicator in the evolution of the COVID-19. It is defined as the relation between β and γ: Last but not least, it is important to mention that the scope of the SIR models leaves out human intervention, but in this situation of confinement in which contact between people is minimal the population can be considered constant.

Artificial Database Generation
In order to obtain a set of SIR models that can be approximated to the real curves, a set of data is generated by altering the model's β, γ and population variables. In this manner, with a random set of parameters is drawn from a uniform distribution, which is used to develop a unique SIR model that can be identified that correspond to the real curves of the pandemic in the different regions of Andalusia.
In this study, have been generated M = 5.5 10 5 SIR different models. A fraction of the curves generated are shown in Figure 6. This large amount of data has been generated in order to obtain a wide range of possibilities as well as different situations that can be generated. In addition, DNNs need a large amount of data to be modelled correctly. The manner in which the DNN has been generated and how the data has been used is discussed in the following section.

Artificial Intelligence and Deep Neural Networks
The developed Deep Neural Networks, DNN, models consist of one input layer with 32 neurons and an output layer with three neurons where each one represents the β, γ and the proportion of population. All hidden layers are using the Rectified Linear Unit, ReLu, activation function. The loss function of the DNN is the Mean Absolute Error (MAE), as in (5) where yi and ŷi are the true and predicted values, respectively, of the i-th sample.
The loss function is minimized using the Adam optimizer with a learning rate l = 1-4, whereas Mean Absolute Percentage Error (MAPE, (6)) is used for evaluating the performance of the optimal model. The parameters of the DNN are shown in Table1.
The objective function selected for optimizing the result of the DNN is the Stochastic Gradient Descent (SGD). With this method the algorithm sweeps through the training set until the algorithm converges in an optimal solution. For this model, the DNN has been selected with an early stopping callback to prevent over-fitting and the software used is Python using TensorFlow 2.0 [13] and Keras backend [6].

Estimated SIR models for Andalusia Regions
The purpose of the development of the DNN is to estimate the optimal parameters for the data of infected people in the different regions of Andalusia. For the development of the DNN, the period between 03/03/2020 and 03/04/2020 was considered as the period in which the growth of infected people in Andalusia was observed.
The results presented in Figure 7 to Figure 14 show the predicted evolution of the COVID-19 in each Andalusia Region. The confidence intervals have been estimated on the basis of the current two-day test period in the region of Andalusia, so it is estimated that the number of cases may range from two days to two days.
In the Table 2 can be seen the results of the date and the peak values for each region of Andalusia. As conclusion of this analysis, the peak will be reached around 14 of April and 20 of April in most regions.

Estimation of the Medical Resources of Andalusia
ICUs are not a plentiful medical resource, and this has become in a critical resource due to the respiratory and cardiovascular effects that COVID-19 produces. Therefore, taking into account this problem it is necessary to estimate the medical resources in the Healthcare Andalusian System. In this paper is going to be analyzed the following resources: 1. ICU resources per Andalusian Region.

People requiring hospitalization.
For this analysis, each region has been discomposed and their resources have been calculated. In the Table3 is shown the resources previously mentioned. A simple statistical analysis between inpatients and infected people is presented in the Figure 16. The average relation between all the regions are the presented in the Table 4. The analysis between the number of infected people and people that needs ICU is presented in Figure 17. The average relation between all the regions are the presented in the Table 5.
Therefore, taking into account the relationships of infected, admitted and people requiring ICUs, the proportion relationship by each region can be found to estimate the resources that each region will need. These resources are estimated oh the the Table 6. Respirators have been estimated on the basis that respirators will only be used by ICUs.

Conclusions
Based on the SIR epidemiological model is estimated that all regions of Andalusia continue to increase the number of cases, but it is estimated that the peak of cases is coming. The results conclude that the Public Andalusian Health System will require more ICUs than they have today. Therefore, it will be necessary to use part of the resources of private hospitals. In addition, the cases from 3th of April to the peak data is going to increase in more than 6.033 cases during the next weeks. However, it will not be necessary to require private hospital beds as the public health service will be able to cope with the increase in the number of people admitted.
The ratios of people admitted and in ICUs vary depending on the region, this may be associated with socio-demographic profiles, but this effect could not be assigned to the different hospitals as they are all governed by the Andalusian health system. This effect of the ratios should be studied in more depth to obtain more accurate results.
The effects of containment in Andalusia are considered to have had positive effects. Despite the high number of deaths and people infected, it is considered that the pandemic will not collapse the Andalusian health system.
Governments and policy makers must do everything possible to avoid shortages of medical resources . However, if resources become scarce, we believe that the recommendations we outline should be used to develop guidelines that can be applied fairly and consistently in all cases. Such guidelines can ensure that individual physicians never have the task of deciding unaided which patients receive life-saving care and which do not. Instead, we believe that guidelines should be provided at a higher level of authority, both to ease the physician's burden and to ensure equality of treatment. The recommendations governance in this situation described above could shape the development of these guidelines.