Emergency departments (EDs) are essential components in healthcare systems by providing critical care to patients requiring immediate medical attention 1. ED overcrowding is characterized by an increased number of patients seeking care, resulting in long wait times, treatment delays, and reduced quality of care 2–5.
This problem persists globally 1,6 despite the differences between healthcare policies in different countries 7,8, Sweden being no exception 6,9–11. Previous studies showed a high workload for the main Swedish hospitals 12, pointing out the multifaced nature of operational errors 11,13, negative patient experience of high waiting times 14, and the decreasing availability of beds followed by an increasing of patients visiting ED 6.
This problem is challenging because of the complexity of the system operations and diversity of clinical profiles of the patients 15,16. Indeed, a high volume of patients visiting EDs corresponds to a wide range of medical conditions, from patients that need basic care to those with an urgent need for intervention due to the severity of the conditions, with a constrained number of resources to treat them often subjected to cost pressures 16,17.
In recent years, the use of real-world data in clinical practice to inform clinical decisions and systems operations has attracted significant interest 18–20. Healthcare production data and Electronic Health Records (EHRs) present an opportunity to comprehensively analyse ED overcrowding and enhance healthcare system operations and management 19–21.
Several techniques to exploit real-world data have been proposed and discussed to address the challenge of ED overcrowding in operational research 21,22. These techniques span from traditional approaches such as multivariate linear models 22 and simulation process modelling 23,24, to novel techniques based on machine learning 25,26 and process mining 27,28.
Most data-driven approaches retrospectively analyse the data to explore, explain and predict operational variables, such as admissions, re-visits, triage, diagnosis, and length of stay 16,25,29–38. Simulation studies have been used for the purpose of performance evaluation and testing layout planning 39–42 with a focus on the optimization of scheduling management 43,44. Process mining has been applied for the extraction of clinical pathways directly from EHRs 45 to improve capacity management 46 and to cluster patient trajectories based on similar clinical characteristics 47,48. Few participatory approaches involving experts have been used to investigate this problem from the perspective of the different actors involved (e.g., explore the possibility to use past medical records to inform admission decisions, and study of re-visits through created personas from the data records 49–52) and dashboard development to visualize key performance indicators (KPIs) in real-time 53,54.
However, the gap between real-world data and the actual processes that occur in emergency departments constitutes a key limitation 29,35,55. Indeed, the gap between real operations and abstraction made from event log data is considered a substantial challenge 56,57. This not only limits the effectiveness of pure data-driven approaches but also affects the simulation and process mining approaches 27,58,59. Moreover, the reliability of data-driven approaches is limited by the discrepancies between real-world data primary users and collected information from the clinical experts 35.
Previous works mainly refer to supporting better operational decisions 43, often attempting to optimise a single key performance indicator (KPI) or specific flows treating the ED as an isolated system 60, but with poor focus on the policy-level analysis to solve the overcrowding problem 41,61. Moreover, the focus of previous data-driven analysis has been on the volume of flows rather than clinical variability 16,33,62–65, missing considerations on how the complexity of medical evaluation can impact prompt decisions 16,17,34.
Despite the large amount of published works and variety of approaches, further research is still necessary to understand the potential of healthcare data for informing reduction in overcrowding and enhance the quality of care in the ED. In fact, to study the complexity and the multi-constrained nature of the overcrowding makes necessary to consider the effect of processes happening outside the ED 41. For example, the efficiency of ED discharge could be affected by the delay of hospital admission due to overcrowding of the wards, the so-called boarding 66, or further pressure can originate from factors outside the hospital 67.
The involvement of experts in the analytical process is necessary to leverage these challenges, increase the understanding of phenomena beyond the real-data limitations, and explore future design strategies 68. Hence, a whole-system approach is required to develop reliable solutions for practical applications 15,34,69.
To summarise, there is a need to develop approaches that go beyond pure empirical approaches to leverage real-world data to address ED overcrowding. Therefore, we aimed to develop a pipeline to analyse ED data from a whole-system perspective that strives to overcome the limitations of the data information by involving clinical experts in all the analysis steps. This pipeline was designed to analyse a real-world case study that consisted of one year (2019) of hospital production data following patients that visited the Uppsala University Hospital ED. The Uppsala ED constituted an ideal case study because of the reported serious shortcomings and hospital overcrowding in the timespan of the data records 6,9–11.
Hospital Emergency department production data
The Uppsala University Hospital’s (Sweden) ED data from 2019 were analysed (n = 33,881 patients for n = 49,938 total event logs). Previously, these data were used to inform a simulation study aimed to improve the ED acute flows testing which kind of interventions the hospital needed to reach a 4-hour length of stay target 70.
In Table 1–2 we reported the summary of the cohort. The following variables were included for each record: age, sex, ADAPT triage code 71, chief complaint reason for the visit, arrival with ambulance (y/n), imaging scan (y/n), main diagnosis in ICD10 codes (https://icd.who.int/browse10/2019/en ), waiting time (from arrival to first contact) and length of stay (from arrival to discharge in the ED), the reason for discharge (sent home, admitted to a hospital ward, death, or other reasons). The ward for each admitted patient to the hospital was also reported.
Table 1
Summary of the cohort data. We grouped the less frequent levels of chief complaint and ICD10 codes due to the large number of levels. “Other reasons od discharge” indicated patients died in ED or deviated to another special services/consultant. SD: “standard deviation”.
| Method of discharge | |
| Other reasons | sent home | admitted to hospital | Overall |
(N = 6183) | (N = 30773) | (N = 12982) | (N = 49938) |
sex | | | | |
female | 3246 (52.5%) | 15776 (51.3%) | 6413 (49.4%) | 25435 (50.9%) |
male | 2937 (47.5%) | 14996 (48.7%) | 6569 (50.6%) | 24502 (49.1%) |
Missing | 0 (0%) | 1 (0.0%) | 0 (0%) | 1 (0.0%) |
age | | | | |
Mean (SD) | 56.0 (23.3) | 51.2 (21.6) | 67.2 (19.9) | 56.0 (22.5) |
Median [Min, Max] | 59.0 [0, 102] | 51.0 [0, 104] | 73.0 [1.00, 104] | 58.0 [0, 104] |
Missing | 1 (0.0%) | 8 (0.0%) | 1 (0.0%) | 10 (0.0%) |
ambulance | | | | |
No | 3850 (62.3%) | 24946 (81.1%) | 6198 (47.7%) | 34994 (70.1%) |
Yes | 2333 (37.7%) | 5827 (18.9%) | 6784 (52.3%) | 14944 (29.9%) |
triage | | | | |
Yellow | 2349 (38.0%) | 11807 (38.4%) | 5370 (41.4%) | 19526 (39.1%) |
White | 1121 (18.1%) | 6155 (20.0%) | 2875 (22.1%) | 10151 (20.3%) |
Green | 946 (15.3%) | 7612 (24.7%) | 1049 (8.1%) | 9607 (19.2%) |
Orange | 734 (11.9%) | 1543 (5.0%) | 1916 (14.8%) | 4193 (8.4%) |
Red | 61 (1.0%) | 73 (0.2%) | 266 (2.0%) | 400 (0.8%) |
Blue | 9 (0.1%) | 40 (0.1%) | 6 (0.0%) | 55 (0.1%) |
Missing | 963 (15.6%) | 3543 (11.5%) | 1500 (11.6%) | 6006 (12.0%) |
chief complaint (reason for visit) | | | | |
Other | 3266 (52.8%) | 14006 (45.5%) | 4253 (32.8%) | 21525 (43.1%) |
Abdominal pain | 986 (15.9%) | 4361 (14.2%) | 2065 (15.9%) | 7412 (14.8%) |
Chest pain | 418 (6.8%) | 3537 (11.5%) | 1097 (8.5%) | 5052 (10.1%) |
Difficulty breathing | 337 (5.5%) | 1355 (4.4%) | 1537 (11.8%) | 3229 (6.5%) |
Leg swelling / pain | 234 (3.8%) | 2356 (7.7%) | 281 (2.2%) | 2871 (5.7%) |
Neurological disorders | 205 (3.3%) | 1048 (3.4%) | 1125 (8.7%) | 2378 (4.8%) |
General weakness | 257 (4.2%) | 589 (1.9%) | 921 (7.1%) | 1767 (3.5%) |
Arrhythmia | 100 (1.6%) | 983 (3.2%) | 498 (3.8%) | 1581 (3.2%) |
Back pain | 106 (1.7%) | 1126 (3.7%) | 229 (1.8%) | 1461 (2.9%) |
Dizziness | 195 (3.2%) | 862 (2.8%) | 327 (2.5%) | 1384 (2.8%) |
Hip injury | 79 (1.3%) | 550 (1.8%) | 649 (5.0%) | 1278 (2.6%) |
imaging evaluation | | | | |
No | 4257 (68.9%) | 21095 (68.6%) | 6340 (48.8%) | 31692 (63.5%) |
Yes | 1926 (31.2%) | 9678 (31.4%) | 6642 (51.2%) | 18246 (36.5%) |
Table 2
Summary of the cohort data. “Other reasons od discharge” indicated patients died in ED or deviated to another special services/consultant. SD: “standard deviation”. ICD10 texts: R104X Abdominal pain, unspecified; R074 Chest pain, unspecified; R060 Dyspnoea; R429 Dizziness and vertigo; Z711 Person with suspected disease where no diagnosis is made; R539 general weakness feeling sick and tired; R519 Headache; R559 Fainting and collapse; R298 Other and unspecified symptoms and signs of disease of the nervous system and musculoskeletal system; R224 Localized swelling or lump of lower extremity; R529 Pain or ache, unspecified; M549 Back pain, unspecified; R509 Fever, unspecified; I489 Atrial fibrillation and atrial flutter, unspecified; M796G Pain, nonspecific in lower leg.
| Method of discharge | |
| Other reasons | sent home | admitted to hospital | Overall |
(N = 6183) | (N = 30773) | (N = 12982) | (N = 49938) |
first diagnosis ICD10 group | | | | |
R generic symptoms | 2352 (38.0%) | 13215 (42.9%) | 6119 (47.1%) | 21686 (43.4%) |
Other | 2168 (35.1%) | 5698 (18.5%) | 2449 (18.9%) | 10315 (20.7%) |
S fractures | 733 (11.9%) | 5632 (18.3%) | 1269 (9.8%) | 7634 (15.3%) |
M muscular and connective tissue | 231 (3.7%) | 3353 (10.9%) | 424 (3.3%) | 4008 (8.0%) |
K gastrology | 319 (5.2%) | 1452 (4.7%) | 1302 (10.0%) | 3073 (6.2%) |
I circulatory apparatus | 262 (4.2%) | 1304 (4.2%) | 1369 (10.5%) | 2935 (5.9%) |
Missing | 118 (1.9%) | 119 (0.4%) | 50 (0.4%) | 287 (0.6%) |
first diagnosis ICD10 code | | | | |
Other | 3177 (51.4%) | 19216 (62.4%) | 7942 (61.2%) | 30335 (60.7%) |
R104X | 603 (9.8%) | 3221 (10.5%) | 862 (6.6%) | 4686 (9.4%) |
R074 | 133 (2.2%) | 2123 (6.9%) | 602 (4.6%) | 2858 (5.7%) |
R060 | 119 (1.9%) | 632 (2.1%) | 800 (6.2%) | 1551 (3.1%) |
R429 | 136 (2.2%) | 752 (2.4%) | 245 (1.9%) | 1133 (2.3%) |
Z711 | 935 (15.1%) | 163 (0.5%) | 1 (0.0%) | 1099 (2.2%) |
R539 | 129 (2.1%) | 360 (1.2%) | 598 (4.6%) | 1087 (2.2%) |
R519 | 91 (1.5%) | 817 (2.7%) | 97 (0.7%) | 1005 (2.0%) |
R559 | 263 (4.3%) | 399 (1.3%) | 276 (2.1%) | 938 (1.9%) |
R298 | 59 (1.0%) | 260 (0.8%) | 617 (4.8%) | 936 (1.9%) |
R224 | 50 (0.8%) | 745 (2.4%) | 51 (0.4%) | 846 (1.7%) |
R529 | 51 (0.8%) | 593 (1.9%) | 100 (0.8%) | 744 (1.5%) |
M549 | 66 (1.1%) | 527 (1.7%) | 110 (0.8%) | 703 (1.4%) |
R509 | 188 (3.0%) | 113 (0.4%) | 350 (2.7%) | 651 (1.3%) |
Missing | 118 (1.9%) | 119 (0.4%) | 50 (0.4%) | 287 (0.6%) |
hospital admission ward | | | | |
Other | 1071 (17.3%) | 0 (0%) | 5464 (42.1%) | 6535 (13.1%) |
acute medicine ward | 113 (1.8%) | 0 (0%) | 2163 (16.7%) | 2276 (4.6%) |
cardiology ward | 69 (1.1%) | 0 (0%) | 1996 (15.4%) | 2065 (4.1%) |
surgery ward | 97 (1.6%) | 0 (0%) | 1776 (13.7%) | 1873 (3.8%) |
orthopedic ward | 94 (1.5%) | 0 (0%) | 1341 (10.3%) | 1435 (2.9%) |
Missing | 4739 (76.6%) | 30773 (100%) | 242 (1.9%) | 35754 (71.6%) |
waiting time | | | | |
Mean (SD) | 1.65 (1.77) | 2.00 (1.93) | 1.63 (1.73) | 1.86 (1.87) |
Median [Min, Max] | 1.01 [0.000278, 13.0] | 1.37 [0.000556, 25.4] | 1.01 [0.00111, 14.8] | 1.23 [0.000278, 25.4] |
Missing | 1078 (17.4%) | 896 (2.9%) | 368 (2.8%) | 2342 (4.7%) |
length of stay in the ED | | | | |
Mean (SD) | 5.74 (4.22) | 4.99 (3.20) | 7.68 (5.51) | 5.79 (4.21) |
Median [Min, Max] | 4.72 [0.0181, 28.9] | 4.35 [0.0169, 49.2] | 6.22 [0.0544, 52.4] | 4.79 [0.0169, 52.4] |
During the analysis were also available the hospital records regarding number of assigned patients and available beds for each hospital ward. In Supplementary Table 1 we reported the summary of the patients admitted in the hospital stratified by speciality of the ward. Here we also reported how many patients were allocated in the right ward. This information was possible to retrieve with the aid of the clinical experts by looking through the medical alarm unit of the Uppsala internal system associated to the admitted patients and compare that with the speciality of the ward. According to the clinical experts, this information was relevant to study because wrong admissions are usually correlated to the lack of available places in the right wards.