key: cord-0045814-rl4zp27r authors: Abuhay, Tesfamariam M.; Metsker, Oleg G.; Yakovlev, Aleksey N.; Kovalchuk, Sergey V. title: Constructing Holistic Patient Flow Simulation Using System Approach date: 2020-05-23 journal: Computational Science - ICCS 2020 DOI: 10.1007/978-3-030-50423-6_31 sha: 11e63de8280ef5cebec289d649a6280c37f57c6b doc_id: 45814 cord_uid: rl4zp27r Patient flow often described as a systemic issue requiring a systemic approach because hospital is a collection of highly dynamic, interconnected, complex, ad hoc and multi-disciplinary sub-processes. However, studies on holistic patient flow simulation following system approach are limited and/or poorly understood. Several researchers have been investigating single departments such as ambulatory care unit, Intensive Care Unit (ICU), emergency department, surgery department or patients’ interaction with limited resources such as doctor, endoscopy or bed, independently. Hence, this article demonstrates how to achieve system approach in constructing holistic patient flow simulation, while maintaining the balance between the complexity and the simplicity of the model. To this end, system approach, network analysis and discrete event simulation (DES) were employed. The most important departments in the diagnosis and treatment process are identified by analyzing network of hospital departments. Holistic patient flow simulation is constructed using DES following system approach. Case studies are conducted and the results illustrate that healthcare systems must be modeled and investigated as a complex and interconnected system so that the real impact of changes on the entire system or parts of the system could be observed at strategic as well as operational levels. Healthcare systems all over the world are under pressure due to large share of aging population, pandemic (e.g., , scarcity of resources and poor healthcare planning, organization and management. As a well-coordinated and collaborative care improves patient outcomes and decreases medical costs [1] , there is a need for effective organization of healthcare processes. Modeling and analyzing healthcare processes based on patient flow to and in a hospital is essential because patient flow demonstrates organizational structure, resource demand and utilization patterns, clinical and operational pathways, bottlenecks, prospect activities and "what if" scenarios [2, 3] . Patient flow can be investigated from clinical or operational perspectives [3] . From operational perspective, analysis of patient flow in a single department such as ambulatory care unit [4] , Intensive Care Unit (ICU) [5] , emergency department [6] [7] [8] or surgery department [9, 10] was investigated in detail. On the other hand, patients' interaction with limited resources such as doctor [11] , endoscopy [12] or bed [13] was also studied. However, hospital is a combination of highly dynamic, interconnected, complex, ad hoc and multi-disciplinary sub-processes [14] [15] [16] . In other words, the organizational behavior and result of a hospital are shaped by the interaction of its discrete components. For this reason, hospital systems cannot be fully understood by analyzing their individual components in separation [17, 18] . This indicates that constructing holistic patient flow simulation following system approach is essential because patient flow is often described as a systemic issue requiring a systemic approach [19] . So that true impact of changes on the whole and/or parts of a hospital system can be investigated at macro as well as micro levels. Nevertheless, studies on holistic patient flow simulation are limited [20] and/or poorly understood [19] . For instance, Djanatliev [17] proposed theoretical approach which considered reciprocal influences between processes and higher level entities using hybrid simulation. Abuhay et al. [21] and Kovalchuk et al. [22] have proposed construction of patient flow in multiple departments of a hospital. Suhaimi et al. [23] built holistic simulation model that represents multiple clinics from different locations. Since it is impossible to model all departments that exist in a hospital and include them in the patient flow simulation due to complexity, time and cost, there is a need to analyze departments and identify the most important ones in the diagnosis and treatment process. Gunal [16] mentioned that choosing services/departments of a hospital to be modelled is the modeler's task. However, the aforementioned authors did not discuss how and why departments/clinics/units were selected and included in their model. This prompts the authors of this article to ask the following question: how to achieve system approach in constructing holistic patient flow simulation, while keeping the balance between the complexity and the simplicity of the model? Analyzing data-driven network of hospital departments based on patient transfer may provide an answer for the aforementioned question. Network or graph can be defined as a set of social entities such as people, groups, and organizations, with some relationships between them [24, 25] . Network analysis allows to investigate topological properties of a network, discover patterns of relations and identify the roles of nodes and sub-groups within a network [24, 26] . However, to the best of our knowledge, no one has investigated the network or collaboration of hospital departments and construct holistic patient flow simulation using system approach. Hence, this article aims at demonstrating construction of holistic patient flow simulation using system approach, network analysis and discrete event simulation. The rest of the paper is organized as follows: Sect. 2 outlines model construction; Sect. 3 discusses case studies and Sect. 4 presents conclusion. Automation of administrative operations of healthcare using Electronic Health Record (EHR) presents an opportunity of constructing data-driven decision support tools that facilitate modeling, analyzing, forecasting and managing operational processes of healthcare. Figure 1 depicts conceptual, methodological and architectural foundations of the proposed model. This study was conducted in collaboration with the Almazov National Medical Research Centre 1 . Different kinds of data such as data about length of stay, cost of treatment, inter-arrival rate of patients to a hospital, characteristics of patients, event log about movement of patients (transition matrix), laboratory test results and load of doctors can be extracted from the EHR and used as an input to build components/submodels of the proposed model. Seven years, from 2010 to 2016, empirical data of 24902 Acute Coronary Syndrome (ACS) patients was collected from the aforementioned hospital. The event log data describes movement of patients from department to department with associated timestamp, Length of Stay (LoS), and Cost of Treatment (CoT). All departments visited by ACS patients from 2010 to 2016 are included in this study. Network analysis [24] using Gephi 0.9.2 [27] is used to investigate network of hospital departments and Discrete Event Simulation (DES) method [16] is employed to construct a holistic patient flow simulation. Kernel Density Estimation (KDE) is used to model LoS and CoT. Poisson distribution [28] is implemented to model patient inflow to a hospital. Movement of patients through departments is governed by probability law constructed as transition matrix [29] and access to limited resources is managed by First In First Out (FIFO) queuing method. The objective of this section is to identify the most important departments in the diagnosis and treatment process of Acute Coronary Syndrome (ACS) patients. The result will be used as an input to construct holistic patient flow simulation. Each patient's event log data was sorted based on event date and network of departments was constructed based on the chronological transfer of ACS patients. The network of departments is both directed (shows from where to where a patient was transferred) and weighted, representing the number of patients transferred among departments. To reduce potential noises, departments with less than 10 interaction in seven years are excluded. The network contains 227 nodes that represent departments and 4305 edges that represent transfer of patients. Both degree and weighted degree distributions are positively skewed with a large majority of departments having a low degree and a small number of departments having a high degree. The average degree and weighted degree account for 19 and 5800, in that order. Even though the network of departments is sparse with density equals to 0.1, the average path length is short which accounts for 2.3. When we see the strategic positioning of departments, Laboratory department, Functional Diagnostic department, Cardiology departments, Surgery departments and Intensive Care Unit (ICU) departments are receiving more requests from other departments as well as sending more results to other departments (see Table 1 ). In other words, these departments are significant in giving support to and influencing function of other departments during the diagnosis and treatment processes of ACS patients. Therefore, maintaining functionality, capacity and geographical location of these departments is vital so as to deliver effective and efficient care for ACS patients. These departments are also fundamental in connecting communities of departments (five communities were identified with an average clustering coefficient of 0.62) as they have high betweenness and closeness centrality (see Table 1 ). Finally, the results were reported to domain experts and they suggested that admission department, two cardiology departments, two ICU departments and two surgery departments should be selected for constructing a holistic patient flow simulation. In order to consider the impact of other departments, the rest were also modeled as one department. The holistic patient flow simulation model has sub-models such as patient inflow simulation models, in-hospital patient flow simulation model, LoS prediction model, CoT prediction model, and queuing model. As patients arrive at a hospital following a random state, Poisson distribution [28] is employed to simulate arrival of patients to a hospital based on the inter-arrival rate extracted from the Admission department, an entry point to a hospital. In-hospital patient flow simulation model imitates the concurrent flow of patients through eight departments (see Fig. 2 ). This model is built using compartmental modeling and DES method and implemented in SimPy, process-based discrete-event simulation framework based on standard Python [30] . Movement of patients from one department to another department is governed by a probability law constructed as transition matrix [29] , each column summing to 1, extracted from empirical data. The relationship among departments is either one way or two ways represented by one or two directional arrows (see Fig. 2 ). The in-hospital patient flow model starts simulating by accepting patients from patient inflow simulation model. The Admission department is the entry point to the hospital. Each department is attached with LoS, CoT and queueing models. Length of Stay (LoS) has been used as a surrogate to evaluate the effectiveness of healthcare [31, 32] . But, a measure often employed to model LoS is an average LoS which does not characterize the underlying distribution as LoS data being positively skewed and multimodal [31, 32] . Because of this, density estimation methods such as the Normal, the Gamma, the Exponential and the Weibull distribution, which are mostly used statistical models to model LoS data [33] [34] [35] , are not a good choice. Hence, Gaussian Mixture Model (GMM) [36] and Kernel Density Estimation (KDE) [37] are selected for further experiment. To determine the number of individual Gaussian distributions for GMM, 10 experiments were conducted for each department. Bayesian Information Criterion (BIC) [38] is used to select the best models. The results illustrate that modeling LoS at departments requires different number of Gaussian mixtures. This indicates that LoS at each department should be modeled separately as they provide medical treatment in different ways and procedures. Both GMM and KDE methods have fitted the LoS data properly. Two-sample Kolmogorov-Smirnov test [39] is used to select the best fit. As a result, the KDE models fitted the LoS data better than the GMM at all departments. Hence, KDE model is selected and attached to each department to predict LoS at department level. The amount of CoT differs from department to department as the departments provide medical treatment using different procedure and equipment. For this reason, separate CoT prediction models are developed for each department. These models are constructed using KDE as both LoS and CoT demonstrate the same behavior. FIFO queuing technique is attached to each department so that basic statistics such as length of queue and wait time could be generated at departmental level and can be used for further analysis and decision making. In six years, the hospital has admitted 9701 ACS patients, whereas the proposed model has admitted 9779 ACS patients. After patients arrive at the Admission department, they move from department to department. Figure 3 compares the number of patients visited each department in the real system and in the proposed model, whereas Fig. 4 and Fig. 5 present comparison of LoS and CoT, in that order. The graphical presentations exhibit sub-models perform pretty well in modeling LoS and CoT. As a result, we may conclude that the patient flow simulation can be used to assess different case studies to demonstrate benefits of system approach in constructing patient flow simulation. The main purpose of this study is to conduct "what if" analysis and demonstrate system approach as a solution to model and analyze patient flow. The departments under consideration provide medical treatments with limited capacity (Admission = unlimited, ICU1 = 10, ICU2 = 10, CD1 = 40, CD2, 40, S1 = 2, S2 = 1, and Other = unlimited). The ACS patients mean inter-arrival rate over six years is 325 min. However, the rate varies over years showing a downward trend (485, 365, 352, 219, 267, 210 representing the years from 2010-2015). Hence, simulation of load of departments as ACS patients' inter-arrival rate varies (500, 400, 300, 200, 100, 50, 5 min) is discussed here below. The run time for all experiments is one year. The number of patients increases as the inter-arrival rate decreases in all departments (see Fig. 6 ). However, the number of patients at ICU1 and ICU2 decreases as the inter-arrival reaches 100 min. This is because other departments are not sending the expected number of patients to both ICU departments due to overcrowding. This illustrates congestion of one or more departments affect the smooth flow of patients in the healthcare process. On top of that, as the inter-arrival rate decreases, Cardiology1 becomes congested than Cardiology2, ICU2 becomes overcrowded than ICU1, and Surgery1 also becomes packed than Surgery2 (see Fig. 6 ). To reduce load of departments, two possible solutions are: 1) increasing the capacity of highly loaded department and/or 2) Pooling or merging the same departments so that they share their resources. First, let us increase the capacity of CD1 from 40 to 50 and see how the system reacts. Increasing capacity of CD1 reduces the mean waiting hour until the inter-arrival reaches 100 min. However, it affects ICU1 department by increasing the number of patients, the mean waiting hour and the mean queue length. Second, let us merge Cardiology1 and Cardiology2. In this experiment, there is only one Cardiology department and all flows to Cardiology1 and Cardiology2 are directed to the merged Cardiology department and the transition matrix is adjusted accordingly. Six experiments were conducted by varying inter-arrival rate (500, 400, 300, 200, 100, 50, 5 min). As a result, the combined Cardiology department has served similar number of patients served by Cardiology1 and Cardiology2 before pooling (see Fig. 7 and 8) and pooling reduces the mean length of queue and the mean waiting hours significantly by 100% until inter-arrival reaches 100 min. However, as the inter-arrival approaches to zero, mean length of queue and mean waiting hour of the pooled Cardiology department become greater than the separated Cardiology departments (see Fig. 7 and 8) . All over the world, healthcare systems are under pressure because of large share of aging population, pandemic (e.g., Covid-19), scarcity of resources and poor healthcare planning, organization and management. As a well-coordinated and collaborative care improves patient outcomes and decreases medical costs, there is a need for effective organization of healthcare processes. Modeling and analyzing healthcare processes based on patient flow to and in a hospital is essential as patient flow demonstrates organizational structures, resource demand and utilization patterns, clinical and operational pathways, bottlenecks, prospect activities and "what if" scenarios. Patient flow can be investigated from clinical or operational perspectives. From operational perspective, analysis of patient flow in a single department such as ambulatory care unit, Intensive Care Unit (ICU), emergency department or surgery department was investigated in detail. On the other hand, patients' interaction with limited resources such as doctor, endoscopy or bed was also studied. However, patient flow often described as a systemic issue requiring a systemic approach. Studies on holistic patient flow simulation are limited and/or poorly understood. Hence, this article proposes construction of patient flow simulation using system approach. To this end, first, network of hospital departments is investigated to identify the most important departments in the diagnosis and treatment process of ACS patients. Second, the result is used as an input to construct a holistic patient flow simulation using system approach and DES method. Finally, case studies are conducted to demonstrate benefits of system approach in constructing patient flow simulation. The case studies indicate that healthcare systems must be modeled and investigated as a complex system of interconnected processes so that the real impact of operational as well as parametric change on the entire system or parts of the system could be observed. Visualizing collaborative electronic health record usage for hospitalized patients with heart failure Improving patient flow at an outpatient clinic: Study of sources of variability and improvement factors Understanding patient flow Reducing patient wait times and improving resource utilization at British Columbia Cancer Agency's ambulatory care unit through simulation Improving ICU patient flow through discrete-event simulation Modeling the impact of changing patient flow processes in an emergency department: insights from a computer simulation study UVA emergency department patient flow simulation and analysis A flexible simulation platform to quantify and manage emergency department crowding Simulation-based analysis of patient flow in elective surgery A simulation model for perioperative process improvement Evaluating the design of a family practice healthcare clinic using discrete-event simulation A patient flow analysis: identification of process inefficiencies and workflow metrics at an ambulatory endoscopy unit A modelling tool for capacity planning in acute and community stroke services Business process analysis in healthcare environments: a methodology based on process mining Process mining in healthcare: a literature review A guide for building hospital simulation models Hospital processes within an integrated system view: a hybrid simulation approach Considering complexity in healthcare systems The three paradoxes of patient flow: an explanatory case study A survey of health care models that encompass multiple departments Simulation of patient flow and load of departments in a specialized medical center Simulation of patient flow in multiple healthcare units using process and data mining techniques for model identification Building a flexible simulation model for modeling multiple outpatient orthopedic clinics Social network analysis: an overview Interpreting social network metrics in healthcare organisations: a review and guide to validating small networks A classification of healthcare social network analysis applications Gephi-The Open Graph Viz Platform Discrete-event System Simulation Markov Chains scipy.stats.rv_discrete -SciPy v0.19.0 Reference Guide A new model for the length of stay of hospital patients Length of stay-based patient flow models: recent developments and future directions Modelling hospital length of stay using convolutive mixtures distributions Determinants of maternity length of stay: a Gamma mixture risk-adjusted model Predictive modelling of survival and length of stay in critically ill patients using sequential organ failure scores Gaussian Mixture Models A Tutorial on Kernel Density Estimation and Recent Advances Model selection and psychological theory: a discussion of the differences between the Akaike information criterion (AIC) and the Bayesian information criterion (BIC) Computing the two-sided Kolmogorov-Smirnov distribution Acknowledgment. This research is financially supported by The Russian Science Foundation, Agreement #19-11-00326.