1
Using Simulation to Model and Optimize Acute Care Access in Relation to Hospital Bed Count and Bed Distribution Yanchao Wang δγ, W. L. Hare α, L. Vertesi χ, A. Rutherfordβ Abstract In Canada, acute care refers to the in-hospital treatment of a disease during its initial phases (typically measured in days).
Determining how bed
availability impacts patient access to care is of great interest to the British Columbia Ministry of Health Services and to the health service delivery industry world-wide. In this paper we discuss a simulation queueing theory model with three input streams consisting of Emergency, Direct Elective and Direct Transfers, designed to examine the question of how bed counts impact access to acute care services in British Columbia’s hospitals. We further develop an optimization algorithm to determine optimal bed
δ
Research
Associate,
Complex
Systems
Modelling
Group,
Simon
Fraser
University,
[email protected]. γ
α
All authors research supported in part by the BC Ministry of Health and the IRMACS Centre. Assistant Professor, University of British Columbia,
[email protected]. Research supported in part by
NSERC discovery grant 355571-2008. χ
Senior Health Care Systems Consultant, Complex Systems Modelling Group, Simon Fraser University,
[email protected]. β
Scientific Director, Complex Systems Modelling Group, Simon Fraser University,
[email protected].
2
allocations among hospital segments in order to minimize average patient wait time. The algorithm is demonstrated on an exemplar hospital. Keywords: Resource Planning, Health Services, Hospitals, Acute Care, Queueing, Simulation, Heuristic Optimization
1
Introduction
Health Care is one of the largest industries in Canada, and worldwide. Over past decades, the expenditure of health care has dramatically increased (Cochran and Bharti, 2006; Dhalla, 2007). The medical professional shortage (Cooper et al 2002; College of Physicians and Surgeons of Ontario, 2004) and the increase of the elderly population (Collier, 2008; Barer et al, 1989; Bergheim, 2006) has resulted in longer wait times for access to care, making hospital bed access a major issue in Canada and abroad. To address this problem in an efficient way and develop better long-term capital planning, the British Columbia (BC) Ministry of Health Services has recently begun an initiative to study methods ensuring a consistent quality of care across the province. One step in this initiative was the development of a quantitative model that examines how bed counts affect patient access to Acute Care Hospitals in BC. We constructed a mathematical queueing model for bed allocation for various hospitals in BC, and tried to understand how population needs (based on historically observed utilization rates) combined with pre-determined levels of access would translate into bed counts. This means that the model we construct can be used to determine the number of acute care beds required to meet a given criterion of access for a fixed demand for acute care service. The model was implemented via two discrete event simulations, one in
3
JAVA, one in GPSS/H. These simulations can provide a high degree of information in a relatively short period time. In 2003, Fone et al (2003) published an extensive literature review that found 182 papers using computer simulation modelling in health care between 1980 and 1999 inclusive. Discrete Event Simulation (DES) is a subset of simulation methods that numerically implement models by representing the system as a chronological sequence of events. There has been a long history of researchers studying health care systems by using DES for implementing queueing theory models (Darzi et al, 1998; Gorunescu, McClean and Millard, 2002; Mackay and Lee, 2005; Koizumi, Kuno and Smith, 2005; Cochran and Bharti, 2006). It is used to obtain an understanding of how random variation affects the operation of a system. For example, Darzi et al (1998) use queueing systems and simulation to evaluate the effect of bed blockage on the flow of patients in geriatric departments. However, bed blockage between units are not directly computed, instead they are estimated by examining the number of patients waiting in the queue. Gorunescu, McClean and Millard (2002) describe a queueing model to study how changing admission rate, length of stay and beds allocation influence bed occupancy, emptiness and patients' rejection for geriatric medicine department by using M/PH/c/N. Mackay and Lee (2005) explore the question of over-fitting a queueing theory simulation by studying
a
variety
of
model
complexities
for
forecasting
hospital
bed
requirements. Koizumi, Kuno and Smith (2005) analyzed a queueing network model with blocking to show patient flows in a mental health system. Cochran and Bharti (2006) show how to balance bed unit utilization across an obstetrics hospital and minimize the blocking of beds from upstream units within given constraints on bed reallocation. The
4
methodology uses queueing network analysis to assess the flows between units, and establishes target utilization of bed units. It then makes use of discrete event simulation to maximize the flow through the balanced system. Our model simulation using real hospital acute care facility data employs a nonstationary Poisson arrival process with a time varying rate, which is a method to account for timeof-day and day-of-week variation in patient arrivals. Also, one of the novel features of the model is the use of a queueing scenario in which care and length of stay begins on entry to the queue. This implies that patients can be discharged from the emergency department while waiting for an in-patient bed, just as they do in real hospitals. The model simulation examined the question of how bed counts impact access to service for 29 given hospitals in British Columbia province, Canada. The paper of Cochran and Bharti (2006) is of key interest to this work, as in the paper the authors introduce the notion of a "balanced system." The authors state the system is “balanced” if moving some beds from one unit to another results in a decreased quality of (modelled) patient care. More precisely, given a fixed number of hospital beds, the authors address the question of how to distribute those beds across hospital wards in order to maximize the (modelled) quality of patient care. In order to determine the bed distribution that creates a balanced system for their test hospital, the authors use an exhaustive search. This used 530 simulation runs to redistribute the bed across four hospital wards.
In this paper we develop a method to “balance” a system, using
considerably fewer simulation runs. This paper is organized as follows: in Section 2, we discuss model development and overview; Section 3 shows model implementations; Section 4 discusses segment
5
optimization on the JAVA Simulation. Section 5 contains some conclusions, discussion, and a summary.
2
Model Development and Overview
Queuing theory is a method of mathematically modelling the process that describes the dynamics of objects arriving, waiting in a queue, and then being served by a server. In this section we discuss the M/M/b, M/M/∞, and M/M/∞ with three input streams Queueing Theory models. Classically, queueing theory models of hospital admittance typically take the form of an M/M/b model. The M/M/b notation refers to a queueing theory model with Poisson arrivals (the first M), exponentially distributed service times (the second M), and exactly b service locations (i.e., beds). This modelling approach carries with it great strength in analytic research, including methods of precisely solving expected wait times and expected queue lengths for the model (Bose, 2001).
However, this modelling
methodology is somewhat unrealistic with regards to a modern hospital, as it forces patients to stay in the queue until a bed become available. In particular, such a model does not allow for patients to be directly discharged from emergency. Data from hospitals in BC shows that direct discharge from the queue in emergency is significant and can be as high as 12%. Moreover, models that do not allow for direct discharge from emergency makes it impossible to model situations with high utilization rates, as queues rapidly grow to an unrealistic length. To address this concern we move to an M/M/∞ model.The M/M/∞ notation refers to a queueing theory model with Poisson arrivals, exponentially distributed service times, and
6
an infinite number of servers. In effect, the rule that governs the queue is changed so that patients can receive care while in the queue (emergency department), and can potentially be discharged without ever having been placed in a bed. Patients that complete their treatment time before an in-patient bed is available are discharged directly from emergency. This is a more realistic model of a hospital, because patients receive care while they are waiting in the emergency department for an in-patient bed. Indeed, they may even complete their care before receiving an in-patient bed. In this case, they are discharged directly from the emergency department. Furthermore, this also allows us to better study the true wait time in emergency, and models the hospital in a more realistic manner. A visualization of an M/M/∞ model is given in Figure 1. In analyzing the historical hospital usage data (provided by the BC Ministry of Health Services) it was determined that patient arrival patterns and patient average length of stays were highly dependent on the reason the patient was arriving at the hospital, which in turn was highly related to the patients route of enter. In particular, three general streams of patient types were identified: Emergency Admissions (E), Direct Elective Admissions (D1) and Direct Transfer patients from other Hospitals (D2). The first entry stream, E, represents any unplanned entry into the hospital. The second entry stream, D1, represents prescheduled hospital visits. The third entry stream, D2, represents any patient transferred in from another hospital (note that, the data systems across Canada treat such patients as “new admissions”, although, in reality, they are extensions of previous admissions from a different hospital). To capture this concept, the model extended M/M/∞ model with three input streams. This again models the hospital in a more realistic
7
manner, but adds complexity making an analytic examination of the model more difficult. A visualization of a M/M/∞ model with three input streams is given in Figure 2. In analyzing the historical hospital usage data it was also determined that patient arrival patterns were highly dependent on time-of-day. In order to capture this, for the E and D1 streams time-of-day was separated into six 4-hour blocks (00:01 to 04:00, 04:01 to 08:00... and 20:01 to 24:00). Experimentation on several test hospitals using six 4-hour blocks for the D2 stream showed no change in model output. Moreover, due to the number of patients in the D2 stream, we had insufficient data elements to reasonable separate the D2 stream time-of-day into six 4-hour blocks. Therefore a single day-long block was used to analyze entry into the D2 stream. Once again, this creates a more realistic model of the hospital, but greatly complicates any analytic methods to analyzing the model. We therefore chose to implement the models via discrete event simulation (DES).
2.1
Unsegmented versus Segmented Model
The modelling methodology discussed above provides an outline of the basic model used in this project. However, the model presented in Figure 2 still contains one notable flawed assumption. This is that the model considers all beds to be available to all types of patients. In reality, a hospital usually has several independent departments such as Surgery, Psychiatry, or Pediatrics. Patients that require service in a particular department are generally unable to receive service in an alternate department. For example, no hospital would place a pediatrics patient in the psychiatry department, and treating drug withdrawal symptoms with surgery is unrealistic.
8
To meet this final concern, we generated two variations of the DES model, which we call the unsegmented multi-stream model and segmented multi-stream model.
2.1.1 Unsegmented Multi-stream Model The Unsegmented Multi-stream Model is the original basic model captured in Figure 2. It applies the M/M/∞ framework and it uses three entry streams (E, D1, D2) discussed above.
Arrival rates and service rates (length of stays) are calculated individually for
each entry stream. In addition, for the E and D1 streams arrival rates vary according to the time-of-day (six time intervals per day) producing a different average number of arrivals for different times of the day. Hence we have three arrival rates two of which are functions of time-of-day. (The D2 stream was not subdivided by time-of-day because the variations of arrival rates for that stream were shown to have no effect on outcomes.) Since average length of stay differs for each entry stream, we also have three service rates. In addition to multiple arrival and service rates, the unsegmented multi-stream model applies the concept of prioritization and blocking. In particular, patients arriving via the D1 or D2 stream are given priority over patients arriving in the E stream. This may seem counter-intuitive as the term “Emergency Admission” would seem to suggest that E stream patients should be given priority. However, one must consider that as D1 and D2 patients are planned arrivals, these patients will only arrive in the hospital if a bed is available to serve their needs. Patients that are “bumped” due to lack of beds were not admitted to the hospital, and therefore did not appear in the database. (Patient admissions that were cancelled due to lack of beds do not appear in our database.) As such, any D1
9
or D2 stream patient found in the database had by definition been assigned a bed virtually without delay, and therefore had a greater (model) priority than the E stream patients. It is worth noting that even though patients who are bumped due to lack of beds do not appear in the database, they are of definite interest to planners. An extension of the current model is in development that does include bumped patients and tracks the cancellation rates. As mentioned, a visualization of the unsegmented multi-stream model appears in Figure 2.
2.1.2 Segmented Multi-stream Model Since not all hospital beds are created equal, hospitals tend to behave as a collection of departments which are disconnected from each other. A patient waiting for a bed in a particular department may be unable to use a bed from another department even if one is readily available. In the Segmented Multi-stream Model we account for this fact by separating hospitals into a collection of independent segments (representing hospital departments), and applying the Unsegmented Multi-stream Model to each segment. That is, we treated each segment as an individual “unsegmented” hospital that cannot share the services among them. Although each segment is treated individually, the emergency room is common to all hospital patients. To address this, for a given hospital, the unsegmented model is run on each segment and the model outputs regarding emergency room usage are then pooled to create a single common emergency department. One might question the need for TWO versions of the model and especially the need to keep the unsegmented model if the segmented one is more realistic. unsegmented model still provides useful information.
However the
For example it provides a
10
mathematical ceiling for the number of beds a hospital can operate within a “worst case scenario” even if maintaining distinct departments becomes for some reason impossible. The unsegmented model is simpler to describe and understand, and hence to debug and since the segmented model is a model with multiple unsegmented components it offers a convenient way to explain the model. And finally, since the bed counts given by the segmented model must in every case be greater than the number given by the unsegmented model, this acts as a “check” to ensure there have been no errors in the calculations.
3
Model Implementations
The model simulation implements our mathematical queueing model which has three input streams with different priorities and uses nonstationary Poisson arrivals, exponentially distributed service time and infinite servers (recall, infinite servers are used in order to model treatment within the emergency department, thereby allowing for direct discharge from emergency). The model simulation outputs the basic measures of queueing model, along with several result checking variables. Our model has been implemented via two simulations, one in JAVA and one in GPSS/H. Technical Remarks: JAVA is an object orientated programming language developed by Sun Microsystems. JAVA version 1.5.0_13 was used. GPSS/H is a queueing theory simulation language currently developed by Wolverine Software (originally developed by Geoffrey Gordon). GPSS/H Professional - Release 3.60 was used. The JAVA and GPSS/H simulations were both implemented independently by separate authors. In this manner codes were generated by examination of the model overviewed
11
above, and not by rewriting code into a new language. By implementing the simulation in two different coding languages, and using two different code authors, we were able to debug both codes in a more efficient manner. In particular, if the simulation outputs did not agree then it was clear that (at least) one of the codes had to be in error. By running controlled simulations we were able to track down errors quickly, and create final versions of both simulations in a realitively short period of time. The final versions of both simulations agree on all outputs allowing for stochastic fluctuation in the random number generators.
This provides a strong level of validation that the codes were
implemented correctly. (That is, any model errors are more likely to be result of model logic than of bugs in the code.) In general, the simulations used to implement the models are fairly straight forward. Indeed, there is only one area in the simulation codes that warrents further discussion. This is how to implement the nonstationary Poisson process used to simulate entry. As both code authors worked independently, it is not surprising that each author approached some of the technical aspects of the simulation in a different manner. Most notatable is the technical detail of how the nonstationary Poisson process was implemented. In the next two subsections we discuss how each code deals with this difficulty.
3.1
Implementing the Nonstationary Poisson in JAVA--Interweaving
As stated above, our simulation uses nonstationary Poisson arrival rates that change over the time periods. For each day, we have six 4-hour time blocks. In order to implement this in JAVA, we first import a random generator called Mersenne Twister to generate random numbers for inter-arrival times. We have 13 different patient generators (6 for E,
12
6 for D1, 1 for D2 stream (recall D2 only has one 24-hour interval)) each using different inter-arrival rates. By definition, any stationary Poisson process satisfies independence of disjoint time intervals and homogeneity in time. Independence of disjoint time intervals states that the probability of a given number of events in any time interval is independent of the number of events in any other disjoint time interval. Homogeneity in time states that the probability of having a given number of events in a time interval depends only on the length of the interval and not on the start time of the interval. These two properties provide us with a method to simulate a nonstationary Poisson process that is periodic in time when each time period consisting of a stationary process. One begins generating a list of events (patient arrivals) for each type of time block using the appropriate arrival rate; we will call these patient arrival lists. Following this, each patient arrival list is cut into sections of the appropriate length (in our case 4-hour long sections). Finally one interweaves the sections to create a single arrival list for each stream. The homogeneity in time and independence of time intervals properties for stationary Poisson processes show that this interweaving technique generates a valid simulation of a periodic piecewise stationary Poisson process. The following JAVA code demonstrates this process (pseudo code is contained in the comment lines – lines proceeded by “//”):
13
NextArrival.via.Interweaving //For stream E, D1: for (inti=0; i