scieee AI-readable full text Open interactive document viewer

Predicting hospital admissions to reduce crowding in emergency department s of the the integral healthcare system for public use in Catalonia

Comalrena de Sobregrau Martínez, Joan

Abstract

Objective: This study analyzed data from Emergency Departments (EDs) from more than 60 different centers embedded in the Integral Healthcare System for Public Use in Catalonia (SISCAT) to predict hospital admissions based on information readily available at the moment of arrival to the ED. The predictive models might help reduce overcrowding at EDs and improve the service delivered to patients. Method: A retrospective analysis was conducted using data from the SISCAT collected during the year 2018. Gradient boosting machine was used to train and test the predictive models in R, splitting the data in a 70/30 partition. Variable importance for each of the models was analyzed. Receiver Operating Characteristic (ROC) curves were created, and the Area Under the Curve (AUC) was obtained from each of them as a measure of predictive performance. The first part of the study targeted the obtention of models with high accuracy and AUC, while the second part targeted the obtention of models with a sensitivity > 0.975 and analyzed the possible benefits that could come from the application of such models. Results: From the 3,189,204 ED visits included in the study, 11.02% ended in admission to the hospital. Gradient boosting machine proved to be a good method to predict for a binary outcome of either admission or discharge. The best performance for all the models was obtained at a 0.5 probability of admission threshold. The largest AUC was obtained for the complete dataset and yielded a result of 0.8938 with a 95% CI of 0.8929-0.8948. The best results for the sensitivity tests were obtained with the adults’ dataset, with a model that gave a 0.4344 specificity and 0.5033 accuracy for a 0.975 sensitivity level. Conclusion: This study reaffirms on the belief that gradient boosting machine is a powerful tool to use in binary outcome predictive models. It shows that data collected at the moment of arrival to the ED can be used to predict hospital admissions accurately, and that a model including data from a comprehensive hospital network has a better predictive performance when compared to a similar model developed with data from one unique health center only. It discusses the huge potential that the application of the models obtained could have in fighting crowding in EDs by allowing for an early start of the bed allocation process, making it possible to do all the required procedures for admission simultaneously to the patient being visited by the doctor, instead of doing it in a sequential manner after the visit, which unnecessarily crowds ED rooms and generates a nonoptimal use of the available resources in EDs. The study also suggests the application of this predictive technique to develop models with proven high sensitivity to digitalize the patient-hospital relationship to allow for a first contact between both parties before the visit to the ED, which can potentially regulate the inflow of patients in this department and reduce ED overcrowding significantly

Full text

Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia Document MEMORY Author Joan Comalrena de Sobregrau Martínez Academic supervisor Jordi Cusidó Roura Degree MSc in Industrial Engineering Call April END OF MASTER’S THESIS Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 2 Preface The copyright of the master thesis rests with the author. The author is responsible for its contents. UPC is only responsible for the educational coaching and cannot be held liable for the content. Abstract Objective: This study analyzed data from Emergency Departments (EDs) from more than 60 different centers embedded in the Integral Healthcare System for Public Use in Catalonia (SISCAT) to predict hospital admissions based on information readily available at the moment of arrival to the ED. The predictive models might help reduce overcrowding at EDs and improve the service delivered to patients. Method: A retrospective analysis was conducted using data from the SISCAT collected during the year 2018. Gradient boosting machine was used to train and test the predictive models in R, splitting the data in a 70/30 partition. Variable importance for each of the models was analyzed. Receiver Operating Characteristic (ROC) curves were created, and the Area Under the Curve (AUC) was obtained from each of them as a measure of predictive performance. The first part of the study targeted the obtention of models with high accuracy and AUC, while the second part targeted the obtention of models with a sensitivity > 0.975 and analyzed the possible benefits that could come from the application of such models. Results: From the 3,189,204 ED visits included in the study, 11.02% ended in admission to the hospital. Gradient boosting machine proved to be a good method to predict for a binary outcome of either admission or discharge. The best performance for all the models was obtained at a 0.5 probability of admission threshold. The largest AUC was obtained for the complete dataset and yielded a result of 0.8938 with a 95% CI of 0.8929-0.8948. The best results for the sensitivity tests were obtained with the adults’ dataset, with a model that gave a 0.4344 specificity and 0.5033 accuracy for a 0.975 sensitivity level. Conclusion: This study reaffirms on the belief that gradient boosting machine is a powerful tool to use in binary outcome predictive models. It shows that data collected at the moment of arrival to the ED can be used to predict hospital admissions accurately, and that a model including data from a comprehensive hospital network has a better predictive performance when compared to a similar model developed with data from one unique health center only. It discusses the huge potential that the application of the models obtained could have in fighting crowding in EDs by allowing for an early start of the bed allocation process, making it possible to do all the required procedures for admission simultaneously to the patient being visited by the doctor, instead of doing it in a sequential manner after the visit, which unnecessarily crowds ED rooms and generates a nonoptimal use of the available resources in EDs. The study also suggests the application of this predictive technique to develop models with proven high sensitivity to digitalize the patient-hospital relationship to allow for a first contact between both parties before the visit to the ED, which can potentially regulate the inflow of patients in this department and reduce ED overcrowding significantly. Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 3 CONTENTS Introduction ........................................................................................................................................ 5 Literature review ................................................................................................................................. 7 Research question and objectives..................................................................................................... 10 Research question ......................................................................................................................... 10 Main objective ............................................................................................................................... 11 Scope ............................................................................................................................................. 11 Hypothesis ......................................................................................................................................... 12 Method and material ........................................................................................................................ 12 Study setting.................................................................................................................................. 12 Feature extraction ......................................................................................................................... 12 Data preparation ........................................................................................................................... 13 Model fitting and validation .......................................................................................................... 14 Results ............................................................................................................................................... 15 Sample characteristics................................................................................................................... 15 Model performance ...................................................................................................................... 16 AUC testing ................................................................................................................................ 16 Sensitivity testing ...................................................................................................................... 19 Discussion .......................................................................................................................................... 20 AUC testing .................................................................................................................................... 20 Triage method ............................................................................................................................... 21 Frequency of visits......................................................................................................................... 21 Sensitivity analysis ......................................................................................................................... 22 Implications ................................................................................................................................... 23 Limitations ..................................................................................................................................... 24 Economic Analysis ............................................................................................................................. 25 Conclusions ....................................................................................................................................... 25 References ......................................................................................................................................... 26 Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 4 TABLE OF FIGURES Figure 1. Sequential admission model ................................................................................................ 7 Figure 2. Simultaneous admission model ........................................................................................... 7 Figure 3. Too small learning rate λ29 ................................................................................................... 9 Figure 4. Gradient Descent in GBM function29 .................................................................................... 9 Figure 5. Too large learning rate λ29 .................................................................................................... 9 Figure 6. Patients included in the analysis ........................................................................................ 13 Figure 7. Accumulated number of visits per unique patient ............................................................ 15 Figure 8. Admission frequency per triage level ................................................................................. 16 Figure 9. ROC curve for the complete dataset .................................................................................. 17 Figure 10. Overfitting test. Optimal number of iterations ................................................................ 17 LIST OF TABLES Table 1. Factors within hospitals affecting crowding4 ........................................................................ 6 Table 2. Variables included in the model .......................................................................................... 13 Table 3. Models’ performance results .............................................................................................. 18 Table 4. Models' performance results (sensitivity > 0.975) .............................................................. 20 Table 5. Confusion matrix complete dataset .................................................................................... 22 Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 5 Introduction During the last couple of years, the coronavirus pandemic has put healthcare systems from all around the globe under extreme stress. Most hospitals have seen their infrastructure and capacity to offer quality health care collapsing under an unexpected and enormous demand, and despite Covid-19 has obviously been the main actor in this crisis, the whole situation has evidenced some big inefficiencies of the system. The healthcare service delivered in hospitals depends, to a large extent, on the efficiency in the execution of all those medical and non-medical processes aimed at providing, altogether, a quality service to the patient. These activities and relationships are often complex and multidisciplinary, making them a major focus of study as their optimization can result in improvements in many different areas simultaneously, such as the reduction in administrative costs, the optimization of hospital resources, the reduction in patient waiting times or a greater degree of service customization. This makes it possible to achieve, as a result, a higher quality service appreciated by both the institution and the user. The Emergency Department (ED) is the service with the highest demand in a hospital, and this is continuously increasing, reaching to a critical point. The number of patients visiting the ED has been steadily rising worldwide for the last few decades, which has led to situations of overcrowding in emergency rooms all around the globe. Data from the Institute of Medicine in the United States already identified crowding as a critical threat for the quality of the service provided to patients back in 20061. Similarly, the Spanish Ministry of Health released data regarding ED usage in 2010 in which it showed an increase of 23.2% of ED visits between 2001 and 20072, with an ED usage frequency rate notoriously higher than that of the UK or the US. The latest report showed a 9% increase in the number of visits attended in hospitals in Spain between 2014 and 2018, without any specific health reasons or population growth to account for that change. ED crowding has been described by the American College of Emergency Physicians (ACEP) as “a situation in which the need for emergency services outstrips available resources in the ED. This situation occurs in hospital EDs when there are more patients than staffed ED treatment beds and wait times exceed a reasonable period.”3 A health emergency, on the other hand, has been defined by the WHO as the unexpected appearance of a health issue of any type and cause, of varying degree of seriousness, that generates an imminent need of attention or treatment by a professional. Therefore, EDs need to offer a multidisciplinary assistance service, complying with functional, structural, and organizational requisites to guarantee safety, quality, and efficient conditions to attend any possible emergency. However, crowding hinders the ability of EDs around the world to deliver such a service in optimal conditions. Studies show the direct correlation of ED crowding with increased ED waiting times, decreased patient satisfaction, inadequately treated pain, higher walkaway rates, and even higher mortality [4, 5, 6, 7]. And the cascade does not stop here. Hospital staff suffer from the consequences of overcrowding too, showing dissatisfaction, frustration, stress, and facing higher exposure to violence and physical aggression8. The optimization of this service and all the processes behind it must therefore be a priority in order to guarantee the continuity and improvement of its quality. Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 6 Reasons for the increase of this phenomenon are varied (Table 1). Some experts point to patients being increasingly demanding in the immediacy to receive health checks for non-urgent sufferings. However, professionals in the field also identify problems in the structure, that is not always able to solve problems quickly enough in the primary attention system, which is marked by long waiting times and is therefore being abandoned by users. One of the processes that has greatest impact on emergency room congestion is the admission of patients from the ED into the hospital, as a result of the required logistics for patient management and bed allocation. The impact of an inefficient patient admission process in the ED is of high relevance. While only around a 10% of the visits in the ED department end in an admission to the hospital, EDs are still the largest source of hospital admissions. Lengthy boarding times of patients that are waiting to be assigned a bed at the hospital use precious resources such as time, space, and medical attention - that should instead be used in other ED tasks- and contribute to the overcrowding of the service9. The accumulation of patients in the ED generates a difficult to dissolve bottleneck in the admissions process and hinders the capacity of the ED to respond to the continuously arriving demand of new admissions. Various solutions to solve this situation have been proposed during the last few years, the most significant of which being a simplification of the admission procedure10, the inclusion of more doctors in the admission process of both the hospitalization plant and the emergency department[11,12], an optimized process of early hospital discharges13, or the creation of an ED dependent unit for short-length stays14, but none of them seem to be easily actionable without large economic efforts, or sustainable in a situation where ED visits will continue to increase. In contrast, monitorization of the admission process and anticipation of hospital admissions can potentially help optimize the use and allocation of resources in a sustainable way, thus improving the quality of emergency care and user satisfaction. Data collected in hospital databases and shared through Health Information Exchange (HIE) platforms can be used to make early predictions of inpatient admission and help in the implementation of actionable measures. In the currently used system, the process of inpatient admission to the hospital from the ED starts after the visit is completed. That means that after the visit, the patient must wait in ED facilities -crowding them unnecessarilywhile the administrative staff processes their admission and allocates them a bed in the hospital. With an early prediction of admission, for example at the moment of arrival of the patient in the ED, the administrative staff would be able to carry out this process while the patient goes through the ED visit in a simultaneous rather than sequential way. By doing so, if the patient Factors Influence Increased ED demand Extremely busy service results in overcrowding due to overcapacity Increased hospital occupancy Hinders bed allocation process Increasing patient acuity An aging population requires more workup and treatment Patient self-referral Patients who bypass the primary healthcare system overcrowd EDs Inappropriate triage Several hospitals implement non-approved triage systems that result in decreased efficiency and longer waiting times Table 1. Factors within hospitals affecting crowding4 Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 7 had to be indeed admitted into the hospital after the visit, the admission process would have already been completed and there would be no extra waiting time nor unnecessary crowding, as portrayed in Figures 1 & 2. Figure 1. Sequential admission model Figure 2. Simultaneous admission model Although some studies have demonstrated that data collected during the patient visit can slightly improve predictive performance as compared to that of a model to predict admissions at time of arrival, the models developed in this study aimed at predicting admissions with information readily available at moment of triage, or what is the same, right after arrival of the patient in the ED. This was done this way simply because the sooner the admission process can be started, the higher the ability to reduce ED crowding can potentially be, which is, in the end, the final objective of the development of a predictive model of hospital admissions. Literature review Prediction models in healthcare seek to increase logistical efficiency, enhance resource allocation, reduce boarding times, and improve patient care. During the last fifteen years, researchers have put attention in data collected early in ED encounters to help existing triage systems more quickly identify and prioritize patients with critical conditions from the volumes of those with less urgent needs to tackle and possibly alleviate ED overcrowding. Triage is the first stage of an ED visit. Its objective is to assess in a regulated, validated and reproducible way, and as accurately as possible, the level of urgency of a visit to organize patients in recognizable groups to prioritize the sickest ones15. There are many different triage systems. The most widely accepted ones are the Australian Triage Scale (ATS)16, the Canadian Triage Acuity Scale (CTAS)17, and the Manchester Triage System (MTS)18. However, there are other approved systems such as the Andorran Triage Model (MAT)19, which is used in almost all the hospitals in the Catalan healthcare system2. Researchers have been implementing machine learning algorithms -in different forms- to extract valuable information from the huge amounts of data existing in hospital -and ED- databases. These algorithms are capable of understanding patterns in data and building corresponding models that use the identified patterns to classify new observations. Some basic studies have researched in the topic with the development of models to predict future ED visits, thus facilitating provision and preparation of ED staff to avoid overcrowding. Penades and Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 8 Ros (2015) used ARIMA and Holt-Winters models to demonstrate that such predictions were possible with mean errors of 2.5% and 3.84% respectively when predicting visits at a monthly level20. More complex models have attempted to predict, not the number of visits, but the percentage of these that will turn into an admission to the hospital. The first studies were centered in trauma level I centers, in which the reasons for visiting are not as varied as in a general hospital ED, and severity of disease (or injury in this case) can be more objectively assessed at triage. Probabilistic systems in the form of Bayesian network for early prediction of admission in ED in these centers, with data available early in the ED visit, proved to be useful for predicting patient admissions already in 2005 (AUC = 0.894)21. The same researchers concluded in 2006 that an Artificial Neural Networks (ANN) could also be used to predict hospital admissions in pediatric ED encounters, again in trauma level I centers, showing an almost equal performance (AUC = 0.897)22. More recently, logistic regression and Naive Bayes analysis have been popularly used to make predictions in the healthcare environment. Savage et. al. (2017) applied logistic models on triage administrative data to estimate admissions in the ED department (AUC = 0.78) and use it to predict, in turn, hourly bed requirements. The logistic regression models obtained had a sensitivity of 23% and a specificity of 97%. Although these results were by themselves satisfactory for particular individual admission predictions, the hourly pooled probabilities of bed requirements showed better results, falling close to historical demand data23. Barak-Corren, Fine, & Reis (2017) looked for improved accuracy (percentage of predictions, of both admissions and discharges, that conform to the real observed value) on the combination of different analytical tools with the logistic regression approach. Applying a logistic regression model on results generated by a Naive Bayes classifier from data collected within the first 30 minutes from arrival yielded good results in their study, identifying more than 73% of admissions with a 90% specificity and over 35% with 99.5% specificity, or what is the same, a false-positive rate of 0.5% (AUC = 0.91)9. They also applied the method to predict admissions at the moment of arrival (after 0 minutes), successfully identifying 50.6% of the hospitalizations with a 10% false-positive rate and obtaining an overall AUC = 0.79. (The specificity in these models to be understood as the capacity of the algorithm to correctly predict the discharges, i.e. a specificity of 90% means 90 out of 100 discharges were predicted as such with the model, while 10 out of 100 were wrongly predicted as admissions). Other researchers have tried manipulating the data slightly to obtain models that would show better performance measures and higher accuracy. Lucke et. al (2018) showed that it was possible to increase prediction accuracy of admission at time of arrival for patients visiting the ED with a logistic regression model by dividing the observations in two groups, one containing those related to patients under 70 years old (AUC = 0.86), and a second one including the rest, i.e. those containing observations of patients above 70 years old (AUC = 0.77)24. The random forest technique has also been used in this field to develop an e-triage model to predict likelihood of acute outcomes -that may lead to admission-. Levin et. al (2018) obtained models with AUC ranging from 0.73 to 0.92 for different datasets25. Although the objective of their study was more focused on the demonstration that the current triage systems could be improved through the use of information extracted from patient data upon arrival at the ED, it also showed the potential of these models to predict hospital admission with significant accuracy. Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 9 Finally, a study from 2018 set the objective to determine which, among the most popular predictive techniques, could provide the best performance. Training models on triage information yielded a test AUC of 0.87 for all logistic regression, gradient boosting, and deep neural networks (DNN) models. However, the study went further on to proof that combining triage information with patient history could significantly improve predictive performance for all three methods, achieving an AUC of 0.91 for the logistic regression model, and of 0.92 for the gradient boosting and the DNN models. Models trained on patient history information exclusively did not yield better results than those trained with triage data alone26. Despite knowing that gradient boosting is a powerful tool for predictive modeling, machine-learning and data-mining, and one of the best algorithms in classification tasks, providing higher accuracy and better results than other conventional single strong models and a better predictive performance than logistic regression, no studies had used it before with the objective of predicting hospital admissions in EDs at the moment of triage. This study will test its true potential. Gradient boosting is a machine learning algorithm that builds an ensemble of weak trees in a sequential fashion, with each tree being trained with respect to the previous and reducing the marginal error of the whole ensemble learnt so far27. Subsequent trees therefore help classify observations that are not well classified by previous trees. Later, weak trees are combined in a gradual and additive manner into a powerful and strong model with high predictability, hard to beat with other algorithms28. The theory behind this process is to train the new base-learners to be maximally correlated with the negative gradient of the loss function associated with the whole ensemble until the gradient descent is zero (see Figure 3). For datasets with a categorical response 𝑦 ∈ {0, 1}, the two most used loss functions are the Binomial and the Adaboost loss function, which are more generally referred to as the Bernoulli loss functions. Given that gradient boosting machines learn sequentially from previous weak models, it is of high relevance to define an adequate shrinkage value. This value can help regularize and control model complexity by potentially reducing the impact of unstable regression coefficients reducing the size of incremental steps in the model learning process. The main principle applied is that taking many small steps in Figure 4. Gradient Descent in GBM function29 Figure 3. Too small learning rate λ29 Figure 5. Too large learning rate λ29 Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 16 discharge was 41.04 years old, a more than 18 points difference that was clearly significant with a p-value < 0.001 for an alpha equal to 0.001 (see Appendix II for graphic visualization). Regarding the triage level frequencies observed and knowing that 1 accounts for the most urgent and priority cases and 5 for the least urgent ones, it is worth noticing the statistically significant higher severity (p-value < 0.001, alpha = 0.001) of the classification of patients admitted in front of patients discharged; the former had an average triage level of 3.03, while the latter had a 3.74 average triage level. Figure 8 shows the admission rates for all five triage levels. Looking at absolute figures it is easy to see that very few cases are classified as extremely acute (level 1), and that the big bulk of patients is classified in either level 3 or 4. The number of patients for each triage level was the following: level one, 5,774 observations, level two, 161,714 observations, level three, 1,048,227 observations, level four, 1,650,429 observations, and finally level five, 323,060 observations. All these previous statistical analyses were performed with the student’s t-tests method to compare means from different samples with two-sided critical area (two-tail t-test). The most predominant symptoms classified at arrival of the patient in the ED were: spondylosis, intervertebral disk disorder, and other back complaints (4.43%, 141,357 observations), followed by superficial wound & concussion (4.23%, 134,970 observations), abdominal pain (4.12%, 131,261 observations), non-classified codes for causes that were unclear, not included in the CCS or that the patient could not describe (3.96%, 126,190 observations), and other respiratory infections in the upper tract (3.65%, 116,420 observations). On the other hand, the top five symptoms leading to a higher percentage of admitted patients were polyhydramnios and other disorders in the amniotic cavity with a 92.0% of the visits ending in admission (6145 observations), followed by appendicitis and other appendicular affections, with an admission rate of 88.2% (5633 observations), nondiabetic pancreatic disorders with 87.1% (3864 observations), umbilical cord complications with 87.0% (31 observations), and finally, femoral neck fracture showed an 86.9% admission rate (7,073 observations). See Appendix III for more information on most frequently observed symptoms. Model performance AUC testing Complete dataset The first model analyzed was developed with the complete dataset, including all the observations deemed valuable (see Figure 6 in Data preparation). The accuracy of the model was 0.9113, exceptionally high when compared to the results obtained by other studies. The AUC for this model Figure 8. Admission frequency per triage level Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 17 obtained from the ROC curve was 0.8938 with a 95% CI of 0.8929-0.8948, also a better result than any observed -at time of arrival to the ED- in any previous study. Figure 9 shows the ROC curve obtained for this first model, varying the discrimination threshold from 1 (bottom-left corner) to 0 (upper-right corner). As always sought in ROC curves, the objective is to have the curve as close to the upper left corner as possible, which implies a high true positive rate (sensitivity), with a low false positive rate (1 – specificity). All the ROC curves for the following models had the same shape, so they have not been included in the report to avoid repetition. The importance of the variables in the model was obtained with the summary function of the ‘gbm’ package and it showed that the symptom -classified with the CCS methodwas the variable providing the higher information gain at every tree split (76.98%), followed by the triage level (16.68%) and age (6.08%). The four remaining variables (accumulated number of visits during the year, days of age for babies, gender, and frequency of appearance for CCS symptoms) had an almost non-significant contribution to the model adding up to 0.25% of the explanation of it, with frequency of CCS symptoms showing a null relative influence. This information was used to create a model including only the first three variables and to run the analysis again. This yielded results similar to these of the complete model, with an accuracy of 0.9112 and an AUC of 0.8936 (95% CI 0.8927- 0.8946). More information about variable importance can be found below in Appendix IV. The initial model was tested for overfitting, but the results clearly showed that using 3 levels of depth for the trained trees and a 0.01 shrinkage parameter, 1,000 trees were an optimal amount and not large enough to run into overfitting. Figure 10 shows the error on both the train (black line) and test (green line) subsets. It is clear that the performance on the test set is not being jeopardized by an overfitting to the training set characteristics. The dotted blue line shows the optimal number of iterations (trees) given the input parameters. Pediatrics dataset This subset included all the observations of patients from 0 to 17 years of age inclusive, which added up to 687,288 observations of 381,470 different patients. This model provided an accuracy of 0.9577, with an AUC of 0.8703 (95% CI 0.8667-0.8739). Note that this model has higher accuracy but lower AUC than the complete dataset; this is an indicator of this model being very good at identifying discharges but not so good at identifying admissions, which is probably a consequence Figure 10. Overfitting test. Optimal number of iterations Figure 9. ROC curve for the complete dataset Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 18 of a very imbalanced set in terms of the ratio of admissions/discharges. The importance of the variables in this model differed from that observed in the complete dataset as well, with symptoms and triage still occupying the first and second places (69.13% and 25.97% respectively) but with days of age in the third position (3.02%) right in front of age in years (1.79%). Adults’ dataset This subset included 2,501,916 observations from 1,425,606 unique patients ranging from 18 to 115 years of age. The predictive model obtained had an accuracy of 0.8985 and an AUC of 0.89112, with a 95% CI of 0.8901-0.8922. Variable importance for this model showed the same rank as for the complete dataset with slightly different contributions; 79.95% for CCS symptoms, 15.25% for triage and 4.54% for age. Young adults’ dataset The young vs. old adults’ division was performed to test the results obtained by Lucke, J.A. et. al (2018). This one included 1,819,221 observations from 1,070,125 different patients and provided an accuracy of 0.9292. The AUC for this subset was 0.89114 with 95% CI of 0.8896-0.8926. The most important variable was, again, CCS symptoms (81.29%), followed by triage (16.26%) and age (1.81%). Old adults’ dataset The second adults’ subset included 682,695 observations from 357,913 unique patients. The predictive model developed provided an accuracy of 0.8182 with an AUC of 0.8514 (95% CI 0.8496- 0.8533), clearly ranking last in performance among all subsets. Variable importance consistently showed CCS symptoms as the most informative variable, with triage and age occupying the second and third places (85.64%, 13.36% and 0.765% respectively). Additional information about variable importance and the performance obtained for each of the models can be found in Appendix IV. Summary of results Complete DS Pediatrics DS Adults DS Young adults DS Old adults DS AUC 0.8938 0.8703 0.89112 0.89114 0.8514 Accuracy 0.9113 0.9577 0.8985 0.9292 0.8182 Specificity 0.9777 0.9959 0.9709 0.9875 0.9181 Sensitivity 0.3746 0.1577 0.4019 0.3116 0.5007 PPV 0.9267 0.9611 0.9175 0.9383 0.8538 NPV 0.6752 0.6478 0.6687 0.7015 0.6581 Table 3. Models’ performance results Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 19 Sensitivity testing As a reminder, in this part of the test the admission prediction threshold was moved down from 0.5 to as much as needed to obtain a sensitivity >0.975. Complete dataset For the complete dataset, a sensitivity of 0.975 was obtained with a probability of admission prediction threshold of 0.022. At this point, the specificity of the predictive model had dropped below 0.5 -to 0.4262-. The overall accuracy obtained for that model was 0.4867. From the 105,346 admissions in the test subset only 2,574 were missed by the model, which came at a cost of correctly predicting just 362,891 discharges out of 851,415. Pediatrics dataset The model for the pediatrics dataset performed the worst, only reaching the 0.975 sensitivity goal at 0.01 probability of admission prediction threshold. By that point, specificity was at 0.3540 and accuracy at 0.3823. This might be explained by the low number of admissions in the pediatrics test subset and for the struggle that it can be to make an accurate guess of the symptoms responsible for babies’ visits. Adults’ dataset As with the previous models, the first iteration was done with a probability of admission prediction threshold equal to 0.05. This had to be lowered down to 0.024 to obtain a sensitivity of 0.975, which was obtained together with a specificity of 0.4344 and an accuracy of 0.5033. For this model, the number of false negatives was as low as 2,317 out of the 95,590 observed hospital admissions, and only 284,521 discharges were detected for 370,463 that were missed. Young adults’ dataset In comparison to the adults’ model, and following patterns observed in the pediatrics’ analysis, this first adults’ subset required the probability of admission prediction threshold to be lowered down to 0.017 (vs. 0.024 for the complete adults’ subset) to obtain the desired 0.975 sensitivity. The specificity and accuracy of the model at that point were 0.4163 and 0.4645 respectively. Old adults’ dataset Maybe not as surprisingly as it may seem at first, with a probability of admission prediction threshold of 0.05 this subset had a sensitivity higher than the desired 0.975, and it allowed to increase this threshold up to 0.055. The specificity obtained was in this case of 0.3614, while the accuracy remained slightly over 0.50. The confusion matrixes with the absolute values of accurate predictions and false positives and false negatives can be found in Appendix V. Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 20 Summary of results Discussion This study has shown that it is possible to predict hospital admissions in Emergency Departments in an integral healthcare network of more than 60 hospitals in Catalonia, using only information collected at time of arrival to the ED. This can have big implications for hospitals trying to reduce ED overcrowding and speed up the bed allocation process for patients from the ED, which is one of the most relevant bottlenecks in the inpatient admission process and a main cause of ED crowding. Furthermore, the study has proved it is also possible to obtain predictive models with remarkable sensitivity levels without sacrificing specificity excessively, which might have big application potential to reduce ED overcrowding, as will be discussed below. AUC testing The first thing that was done was to analyze the predictive power of a model for the whole population sample, from 0 to 115 years of age, with the gradient boosting algorithm. Based on previous literature, such a model would be satisfactory if it were able to provide an AUC comprised between 0.8 and 0.87. Savage et. al. (2017) obtained a 0.78 AUC23, Barak-Corren, Fine, & Reis (2017) obtained a 0.79 AUC9, Lucke et. al (2018) obtained with a u70-year-old patients’ dataset a 0.86 AUC24, Hong WS, Haimovich AD, Taylor RA (2018)26 obtained an AUC of 0.87. However, the goal was set to improve previous research by using a more comprehensive dataset and the GBM method to obtain an AUC of 0.87 or higher (as stated in H1). This goal was achieved with the complete model, which yielded an AUC of 0.8938 (95% CI 0.8929-0.8948), beating the best performance found in the literature for the prediction of admissions at time of arrival to the ED, which was obtained by Leegon, J., Jones, I., Lanaghan, K., & Aronsky, D. (2005)21 in a trauma level I center -a sample clearly not as complex as a complete integrated healthcare system-. This performance makes it possible to accept H1. Since this value was the highest AUC result observed in any previous research, it can be taken as an indicator that using a comprehensive dataset can indeed improve predictive performance for ED admissions. However, it is difficult to discriminate whether this great result was obtained thanks to the dataset or thanks to the method, so this will be included as a limitation of this study and proposed for future research. As shown by Hong WS, et. al. 26, patient history data could further improve the predictive performance of a model such as the one developed in this study (these researchers managed to improve predictive performance by a 5% with this additional information). In an attempt to integrate this data in the study, a formal request was made to the Catalan Government to obtain patients’ medical histories but given the Covid-19 situation and the overload of work in the healthcare network in Spain, the governmental entity deemed it would Complete DS Pediatrics SS Adults SS Young adults SS Old adults SS Sensitivity 0.9756 0.9754 0.9760 0.9752 0.9755 Specificity 0.4262 0.3540 0.4344 0.4163 0.3614 Accuracy 0.4867 0.3823 0.5033 0.4645 0.5085 Table 4. Models' performance results (sensitivity > 0.975) Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 21 entail too much data preparation work and that could not be assumed by the hospital IT departments, so that is an issue that should be targeted in future research. The second possibility to improve predictive performance was to divide the dataset into smaller subsets based on patient age, which was hypothesized as possible in H2 following the results obtained by Lucke et. al (2018)24. This was done in two steps, first using the 18 year old threshold to separate pediatrics visits from adults visits, and second by dividing the adults subset at the 70 year of age threshold, which for the already mention researcher provided a predictive improvement. This hypothesis was however not accepted based on the results obtained. In the first division, the averaged AUC between the pediatrics and the adults’ datasets obtained was 0.8866 (95% CI 0.8851- 0.8883), which was lower and fell outside of the 95% CI for the AUC results for the complete dataset. The averaged AUC after the division between young adults and old adults was 0.8803 (95% CI 0.8787-0.8819) which was not able to beat the previous results obtained for the complete adults’ dataset (AUC = 0.8911, 95% CI 0.8901-0.8922). These counterintuitive results may have been caused by the high influence of wrongly classified observations, especially in the very old and very young age ranges, that ended up showing a different result than the one expected and biased the predictive ability of the model to correctly classify future observations. However, it should not be considered a big issue since the differences between AUCs of different models were of the range of 0.1 difference. The results obtained in the study for variable importance in these models supported H3 assumptions, pointing at symptoms (classified with CCS method) as the most important variable -by farin all the models, ranging from 69.13% to 85.64% for variable importance. Triage level followed consistently, staying in the interval 13.36%-25.97%, which was already a hint into H4. Triage method The evaluation of the triage model effectiveness was performed with the admission rates for each triage level. The resulting plot, as seen in Figure 8, showed to be quite consistent with hypothesis H4, supporting that the current triage model works reasonably well and is able to differentiate urgency level between patients. It only failed to show meaningful results for patients classified as level 4 and 5, the latter having a slightly higher rate of admissions. This can have several explanations, but given the numbers obtained from the complete dataset, showing five times more observations being classified as level 4 compared to level 5, it seems reasonable to assume that at the time of triage the professional behind the counter might be reluctant to assign a too low triage level to the patient if the symptoms are not very clear, and to play on the safe side assigns to such a visit a higher triage level than actually needed, which in the end might account for this mild inconsistency in the results. Frequency of visits To evaluate H5, which hypothesized that a higher frequency of visits did not lead to higher admission rate, the correlation analysis already mentioned in Results was performed and no correlation was found with a very high significance level. This, however, did not help in the decision to accept or reject H5. Thus, a table was built to show the number of accumulated visits next to the admission rate for each of the observed frequencies. From this table (see Appendix I), the frequency of Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 22 admission graph was built. The results showed that the hypothesis was too short sighted in assuming that the behavior would be constant throughout the whole number of visits range. It is clear that the hypothesis is rejected for the range 1 to 5 visits/year, during which the admission rate increases from frequency to frequency, from 8.87% to 13.59%. After 5 visits/year, this rate starts to slowly decrease, but it does not go consistently below the rate observed for 1 visit/year until 26 visits/year, which showed an admission rate of 7.89% ad was followed by even lower rates. Before 26 visits/year, however, three frequencies (19, 20 and 24 visits/year) returned rates below 8.87%. Some higher frequencies returned surprisingly high admission rates (over 20% admission), but it would be statistically wrong to take them as significant given the low number of patients going to the ED for that large number of times (in no cases more than 2 patients during the 2018 exercise). Something interesting to observe is the fact that for the top three highest frequencies (136, 147 and 244 visits) the admission rate was 0%. Diving into these three cases, all of them represented by only one different patient, we observe a common characteristic. The three patients show a clinical picture with anxiety at the center of it, with high rates of superficial injuries, connective tissue damage, and also very high residual/non-classified symptoms. This falls outside the scope of this research study, but it should serve as fundament for future research on how these patients suffering from anxiety can be better treated, and whether hospitals, and even more EDs, are the best access doors for patients with this type of disorders to the healthcare system. Sensitivity analysis This analysis targeted the development of prediction models with a sensitivity of at least 0.975. As can be observed in Table 4, there is a tradeoff between sensitivity and specificity, with the latter quickly dropping when high levels of sensitivity are sought. As happened with the accuracy models, the approach that gives the best results is the one that uses the complete dataset to make predictions. With a specificity of 0.4262, it cannot be beaten by any of the other combinations. Even if the adults’ dataset (18-115 years of age) shows a slightly better performance, when combined with the pediatrics counterpart they together give an averaged specificity of 0.4171, below that obtained with the complete sample. When trying to improve the adults’ dataset performance with the two adult subsets, the same non-satisfactory result as with the accuracy models was found. Nevertheless, the complete model shows better than expected results, and provides a good foundation for future research. Seeing that it is possible to predict 97.5% of the admissions while maintaining a specificity above 0.4, the researcher proposes to extend this piece of research to further improve crowding situations in EDs in Catalonia. Based on the results (Table 5), it seems reasonable to assume that a lot of visits could be avoided with this approach if this information was available to the patient. From the 851,415 visits that ended up in discharge (from the test set in the complete dataset), 362,891 were accurately predicted. This is already a 37.93% of the total of visits in this test set. A model like that could allow for the development of a platform connecting patient and hospital prior to the former going to the ED. Said platform would ask patients for their identification Prediction 0 1 0362891 2574 1488524 102772 Reference Table 5. Confusion matrix complete dataset Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 23 information (either name and age, or national identification number, or hospital ID) and for the reasons behind their intention to go to the ED (symptoms or CCS). With this information it would be possible to run the patients’ case through the predictive model and see how necessary it would be for each patient to go to the ED and how likely would it be that their situation shall require them to stay in the hospital. This, besides giving the hospital an idea of the number of patients that would be attending the ED in the next few hours, allowing the staff to prepare for the expected capacity and starting the bed allocation process with even more time in advance, would allow the patients to receive a very accurate prediction of the outcome of their visit to the ED. Moreover, this information could be combined with real-time information about the crowding situation in the ED which could be used by the patients to decide if they consider it worthy to go to the ED and wait X hours there until being attended, or otherwise they prefer to wait for a few hours or even until the next day to go to the hospital -as long as their situation does not need immediate attentionin order to lose less time waiting to be attended, in case the current situation in the ED is of high crowding and long waiting times are expected. Future research should focus on identifying how many of these patients correctly identified as discharges, in situations of high crowding in the ED, and after being provided with the information about the >97.5 probability of their visit ending in discharge (complete dataset probability of admission threshold = 0.022) and the information about long waiting time at the ED before being visited by the doctor, would decide to postpone their visit and therefore contribute to reduce overcrowding. Implications Previous studies have explored possibilities in the admission prediction field, but many of them have done so with data from trauma level I centers exclusively, and the ones overcoming the specialization frontier have only provided results at an individual hospital level. This is the first study to do predictive analysis for a comprehensive hospital network including EDs of diverse size and characteristics, and it has achieved better performing results in the conditions studied. It is envisioned, given the positive results obtained with the complete dataset for both the AUC and sensitivity analyses, that the Catalan Healthcare System will acknowledge the potential of integrating these models into the daily operations of EDs in the Integral Healthcare System for Public Use in Catalonia (SISCAT) to provide professionals with a powerful tool to forecast upcoming admissions in advance and start the bed allocation process at the same time as the visit takes place, overcoming the main inefficiency of the bed allocation process, which is the unnecessary presence of ready-to-be-admitted patients in the ED that actively contribute to ED overcrowding. Moreover, this would reduce the negative impact of ED overcrowding in terms of long patient waiting times, decreased patient satisfaction, or inadequately treated pain, among others. The benefits for patients and professionals are clear, but probably more relevant to the governmental entities would be the economic savings resulting from an optimized ED service, which previous studies have found to be around 350€ for every hour a patient stays in the onboarding process into the hospital [36,37]. This figure scaled to a whole regional hospital network managing more than 350,000 admissions in a yearly basis could translate into enormous savings in the millions range. A proper financial analysis would be required to get a better and precise estimation of the actual figures. Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 24 Limitations The results obtained should be interpreted considering five main limitations. The first of them is the fact that the models obtained performed significantly well, but it has not been determined whether this was a result of the quality of the dataset, or the GBM method used. Future research should focus on the application of existing predictive techniques -such as logistic regressionon this same dataset to better determine how beneficial is it to use a dataset including data from a large healthcare system against one including data from an individual center, and how better are the results obtained with GBM when compared to those obtained with other predictive techniques. The second limitation, which has already been mentioned in accuracy testing results, is the fact that the models used in the study did not include patient history information, even though previous literature proved its beneficial contribution in the performance of predictive models for hospital admissions. This was an unexpected setback for the study given that the researcher asked for data related to number, symptoms, lab tests, and admission results of previous visits for the patients that attended the ED during the 2018 exercise, but the Covid-19 situation made it impossible for the Catalan Healthcare System to treat, organize and provide this extra information, alleging a too large amount of information to be managed and a very complex task of elaboration of the dataset for analysis, which would require more resources than available during the coronavirus crisis. It would be therefore interesting to include patient history information in future studies with the goal of improving the AUC for the models to be used in EDs at time of arrival, and to increase the performance of the sensitivity-oriented models. Another limitation regarding the data used for the model is the lack of information about date and time of arrival for the visits received at the ED. This was a piece of information that was also formally requested, but that could not be provided due to the hazard to properly and accurately integrate it with the rest of the variables. Therefore, it was not possible in this research to establish a chronological order between the visits observed for each of the patients, which could have otherwise allowed for the creation of an extra variable reporting the position of each visit inside the total number of visits for the patient during the year and could have potentially improved the results. The effects of this missing information were attempted to be minimized with the creation of the variable ‘accumulated number of visits’, but as the variable importance results showed (Appendix IV), it did not help improve much the performance of the models. Additionally, the models developed in this study did not account for the obvious higher admission rates that some symptoms show when compared to other, often not-as-serious, symptoms. As it has been seen, the symptom with the highest admission rate was polyhydramnios and other disorders in the amniotic cavity, which makes a lot of sense since it is an indicator for a woman that is going to be giving birth imminently. These kinds of symptoms might bias the real performance of the model to the positive side, since overcrowding comes, in many cases, from the uncertainty of a patient being admitted in the hospital or not, rather than from visits with a >90% likelihood of ending in admission. To solve this limitation in future research, it is proposed to develop models including only those patients showing symptoms that have a rate of admission below a certain percentage (it has not been possible to find any literature that would help determine what would be an adequate threshold), and train and test these models to see how good they could perform in this more complex situation. Predicting hospital admissions to reduce crowding in the Emergency Departments of the Integral Healthcare System for Public Use in Catalonia 25 Finally, this study gives the first foundation to sensitivity-aimed models and proposes the integration of such models in a platform that would allow patients to remotely get a first impression of how important it would be for them to go to the ED, and would also make it possible for them to evaluate personally whether their visit could be postponed -in cases of ED crowding and long waiting times. However, no further research has been done neither in the patient or the hospital side. To draw significant conclusions about the possible impact and implementation of a platform like the one described it would be necessary to first get an idea of how costly it would be for hospitals to get and share real-time information about the situation at their EDs, how difficult would the integration of this data with the sensitivity-predictive-models’ software be, and how many visits could potentially be avoided with this approach. Only after having conducted this analysis thoroughly would it be possible to give an accurate prediction of the potential impact of this method towards solving ED overcrowding. Economic Analysis Given the nature and conditions of the study, the economic requirements behind it have been very few. There have not been any product development nor major software expenses, so the only costs incurred have been these related to the professional hours of work invested both by the researcher and the academic supervisor, which add to a total of 9,200€. The detail of all these costs is displayed in Table 6 included in the Budget. Conclusions This study reaffirms on the belief that gradient boosting machine is a powerful tool to use in binary outcome predictive models. It shows that data collected at the moment of arrival to the ED can be used to predict hospital admissions accurately, and that a model including data from a comprehensive hospital network has a better predictive performance when compared to a similar model developed with data from one unique health center only. It discusses the huge potential that the application of the models obtained could have in fighting crowding in EDs by allowing for an early start of the bed allocation process, making it possible to do all the required procedures for admission simultaneously to the patient being visited by the doctor, instead of doing it in a sequential manner after the visit, which unnecessarily crowds ED rooms and generates a nonoptimal use of the available resources in EDs. The study also suggests the application of this predictive technique to develop models with proven high sensitivity to digitalize the patient-hospital relationship in order to allow for a first contact between both parties before the visit to the ED, which can potentially regulate the inflow of patients in this department and reduce ED overcrowding significantly.