A Generic Simulation Model to Improve Procedure Scheduling in Endoscopy Suites by Deborah Susanne Loach A thesis submitted in conformity with the requirements for the degree of Masters of Applied Science Graduate Department of Mechanical and Industrial Engineering University of Toronto Copyright c 2010 by Deborah Susanne Loach
Abstract A Generic Simulation Model to Improve Procedure Scheduling in Endoscopy Suites Deborah Susanne Loach Masters of Applied Science Graduate Department of Mechanical and Industrial Engineering University of Toronto 2010 In 2008 Ontario implemented a screening program for colorectal cancer, which drew attention to the increasing demand for colonoscopies in the province. This trend and the forecasted demand of the new screening program created a need to increase capacity in hospital endoscopy suites. This thesis addresses this need by investigating throughput gains from scheduling according to physician specic procedure durations in endoscopy suites. This is accomplished through the development of a scheduler and a generic discrete event simulation. Case study results show that physician specic scheduling can increase throughput in the endoscopy suite while reducing undertime and only slightly increasing overtime. They further indicate the trade o between a 1:2 and 1:1 physician to room ratio, nding that while a 1:1 ratio increases throughput by 33% over a 1:2 ratio, physicians are 1.5 times more productive under a 1:2 ratio. ii
Acknowledgements I would like to thank Dr. Mike Carter, my thesis supervisor, for his patience, guidance and insight during my time as a master's student. I particularly appreciate the freedom and independence he gave me in completing this project, as it really enhanced my learning experience. I would also like to thank the members of my lab at the Centre for Research in Healthcare Engineering, particularly Adrien Castellino for her insights during the CPIi, as well as Matthew Nelson for his help in getting started on the Arena code. I further acknowledge the members of the former Provincial Planning group at Cancer Care Ontario, particularly Nadia Berger and Graham Woodward, for their assistance in coordinating hospital visits to get me started and for their assistance along the way. In addition, I would like to thank all of the representatives from the participating hospitals: Markham Stouville, Uxbridge Cottage, Hamilton, Henderson, McMaster, and Owen Sound for sharing their knowledge and for their time. I particularly thank Caron Anderson from Markham for helping out with multiple data requests. Finally, I thank my boyfriend, AJ, for his constant encouragement and support, as well as his technical assistance through multiple discussions. iii
Contents 1 Introduction 1 2 Background and Problem Analysis 4 2.1 Colorectal Cancer............................... 4 2.1.1 Screening Tests............................ 5 2.1.2 Ontario's ColonCancerCheck Program............... 5 2.1.3 Colonoscopy Demand......................... 6 2.2 Endoscopy Suites............................... 7 2.3 Colonoscopy Process Improvement Initiative (CPIi)............ 9 2.3.1 Data Analysis............................. 11 2.3.2 CPIi Toolkit Implementation.................... 12 2.4 Research Objectives.............................. 13 3 Literature Review 14 3.1 Endoscopy Suite Eciency.......................... 14 3.2 Discrete Event Simulation in Health Care.................. 16 3.3 Colorectal Cancer and Endoscopy Simulations............... 16 3.4 Reusable Simulation Models......................... 17 3.5 Procedure Scheduling............................. 18 4 Methodology 19 iv
4.1 Design of the Endoscopy Model....................... 19 5 The Scheduler 23 5.1 Design..................................... 23 5.1.1 Endoscopist Secretary........................ 23 5.1.1.1 Wait List.......................... 24 5.1.1.2 Block Times........................ 25 5.1.1.3 Creating Endoscopist Schedules.............. 27 5.1.2 Booking Clerk............................. 29 5.1.3 Assumptions.............................. 29 5.1.4 Program Output........................... 29 5.1.5 Verication.............................. 30 6 The Generic Discrete Event Simulation Model 32 6.1 Model Design................................. 32 6.1.1 Making it Generic........................... 35 6.1.1.1 Dynamic Simulation Pathways.............. 35 6.1.1.2 Setting Model Parameters................. 36 6.2 Input Data.................................. 38 6.3 Assumptions.................................. 40 6.4 Model Output................................. 41 7 Validation 43 7.1 Throughput Validation............................ 43 7.2 Simulation Output Validation........................ 44 7.2.1 Correlated Inspection Approach................... 45 7.2.1.1 Validating Model Calculations............... 45 7.2.1.2 Validating Model Assumptions.............. 46 v
8 Sensitivity Analysis 48 8.1 Factorial Design................................ 48 8.2 Expected Eects............................... 49 8.2.1 Main Eects.............................. 50 8.2.2 Two-Factor Interaction Eects.................... 51 8.2.3 Summary of Eects.......................... 52 9 Results 53 9.1 Case Study: Markham Stouville Hospital................. 53 9.1.1 Block Schedule............................ 53 9.1.2 Procedure Durations......................... 54 9.1.2.1 Scheduled and Average Durations............. 54 9.1.2.2 Minimum Durations.................... 56 9.1.3 Room Turnover Times........................ 56 9.2 Scenario Testing................................ 57 9.2.1 Throughput Results......................... 57 9.2.2 Overtime and Undertime Results.................. 59 9.2.2.1 2-Room Models....................... 60 9.2.2.2 1-Room Model....................... 62 9.3 Summary of Results............................. 63 10 Conclusions 64 11 Future Research 66 Bibliography 68 A Generalized Process Maps for Ontario Endoscopy Suites 73 A.1 Process Map Symbols Key.......................... 73 A.2 Process Maps................................. 73 vi
B Simulation Data Templates 80 C Technical Documentation 90 C.1 Parsing the Data............................... 90 C.1.1 Data Checks.............................. 91 C.1.1.1 Assumptions........................ 91 C.1.2 Data Format............................. 91 C.2 The Scheduler................................. 94 C.2.1 Generating the Procedure Type................... 94 C.2.2 Class Design.............................. 94 C.2.3 The Endoscopist Class........................ 94 C.3 The Generic Discrete Event Simulation................... 95 C.3.1 Scheduled Patient Arrivals...................... 95 D Scheduler Output 97 vii
List of Figures 1.1 Thesis structure................................ 2 2.1 Colonoscopy demand............................. 6 2.2 High level endoscopy processes........................ 7 3.1 Four levels of genericity for simulation models............... 18 4.1 High-level design of the endoscopy model.................. 20 5.1 Process map for referral/booking...................... 24 5.2 Block assignment to groups of endoscopists................. 26 5.3 A portion of a generated hospital schedule................. 30 5.4 Case mix output from the scheduler..................... 30 6.1 Simulation design............................... 33 6.2 Common and site-specic simulation design................ 37 6.3 Lognormal distribution t to procedure duration data, large data sets.. 39 6.4 Lognormal distribution t to procedure duration data, small data sets.. 40 6.5 Sample simulation output data....................... 42 8.1 Interaction plots for factors 2 and 3..................... 52 9.1 Scheduled (2) and average (3) procedure times for Markham....... 55 9.2 Throughput increase in 1-room model................... 59 viii
9.3 Overtime and undertime results from simulations of each high level group with throughput increases shown...................... 61 A.1 Process mapping symbols legend....................... 74 A.2 Process map for referral/booking...................... 75 A.3 Process map for registration......................... 76 A.4 Process map for admission.......................... 77 A.5 Process map for procedure.......................... 78 A.6 Process map for recovery........................... 79 B.1 Scheduling worksheet (a)........................... 81 B.2 Endoscopist1 worksheet (b)......................... 82 B.3 Endoscopist2 worksheet (c)......................... 83 B.4 Endoscopist3 worksheet (top portion) (d.1 and d.2)............ 84 B.5 Endoscopist3 worksheet (middle portion) (d.3, d.4, and d.5)....... 85 B.6 Endoscopist3 worksheet (bottom portion) (d.6 and d.7).......... 86 B.7 Procedure data worksheet (e)........................ 87 B.8 Turnover worksheet (f)............................ 88 B.9 Calculated worksheet (g)........................... 89 C.1 Parser output data.............................. 93 C.2 Scheduler class interactions.......................... 95 D.1 Scheduler output............................... 98 ix
List of Tables 2.1 Variation in scheduled procedure durations among the six CPIi hospitals 12 2.2 Colonoscopy cases and durations by endoscopist at Markham Stouville Hospital.................................... 12 5.1 Sample block schedule............................ 27 6.1 Summary statistics.............................. 38 7.1 Throughput comparison........................... 44 7.2 Average overtime and undertime results by physician, simulation and historical data.................................. 46 7.3 Average overtime and undertime results by physician, lognormal procedure durations................................... 47 8.1 High (+) and low (-) factor values...................... 49 8.2 Design matrix with overtime (OT) and undertime (UT) results...... 49 8.3 98.75% condence intervals (CI) for the expected eects of the factors on OT and UT.................................. 50 9.1 Scenario legend................................ 58 9.2 Average daily throughput for each scenario (patients)........... 59 C.1 Parser input data and checks performed.................. 92 C.2 Calculating time between arrivals...................... 96 x
Chapter 1 Introduction This thesis evaluates the impact of physician specic scheduling in endoscopy suites through the development, validation, and results of an endoscopy model, which has at its core a generic discrete event simulation. It is motivated by the implementation of Ontario's colorectal cancer screening program in 2008. This program contributed and drew attention to the increasing demand for colonoscopy procedures in Ontario, which created a need to increase the capacity and eciency of Ontario's endoscopy suites. The report is organized as shown in Figure 1.1. It starts by giving a detailed description of the problem and providing an overview of the necessary background information to understand this problem. Background includes: a) colorectal cancer prevalence, risk, and screening tests as well as Ontario's colorectal cancer screening program; b) endoscopy suite processes and resources; and c) the Colonoscopy Process Improvement initiative (CPIi). This last initiative was carried out by Cancer Care Ontario (CCO) and led to the creation and implementation of an improvement toolkit for endoscopy suites, which includes the generic simulation model described in this thesis. Next, we review the relevant literature in ve areas: (1) techniques that have previously been used to improve endoscopy suite operations; (2) applications of simulation modeling in health care; (3) specic simulation applications in colorectal cancer and en- 1
Chapter 1. Introduction 2 Figure 1.1: Thesis structure doscopy; (4) reusable simulation frameworks; and (5) procedure scheduling techniques that have been used in the operating room setting. We nd that room turnover times 1, physician to room ratios, procedure and recovery durations are important factors to consider when modeling endoscopy suite operations. Our study of health care simulation models nds that most are not generic. After reviewing the relevant literature, we detail both the high-level and specic designs of our generic endoscopy model. The objectives of this model are to determine the throughput gains and overtime/undertime costs of scheduling according to physicianspecic procedure durations in hospital endoscopy suites. It includes templates for endoscopy personnel to use in providing site-specic data, a scheduler, and a generic discrete event simulation model. The scheduler generates patient schedules in two ways: (1) by mimicking a hospital's current booking process and (2) by scheduling procedures according to calculated physician specic durations. In the simulation, patients arrive according to these generated schedules and move through their procedure and recovery 1 The time to clean the procedure room and prepare it for the next patient.
Chapter 1. Introduction 3 processes. In this way, the overtime and undertime requirements of each schedule can be determined. Urgent patients are also modeled in the simulation. We validate the scheduler and the simulation model against 2008 data from Markham Stouville Hospital using Welch's method and the correlated inspection approach, respectively. Average patient throughput is calculated from these data and used to validate the scheduler.the simulation is validated using average overtime and undertime results from Markham's actual March 2008 schedule. Once we have demonstrated the validity of our endoscopy model, we conduct a sensitivity analysis and carry out scenario testing. The sensitivity analysis uses a factorial design with three factors: (1) the average number of urgent patients arriving each day; (2) physician turnover times 2 ; and (3) how far in advance of their scheduled procedure times patients arrive. All of these factors are found to be signicant. Scenario testing is carried out for Markham Stouville Hospital, our case study site. We describe the details of Markham's endoscopy suite and compare and contrast average daily overtime and undertime results from the simulation when the base case (how long Markham currently schedules for each procedure) is used with those from results when physician specic procedure durations are used. Results indicate that there is potential for Markham to increase throughput in its endoscopy suite by using physician specic procedure durations. We conclude the thesis with a summary of the contributions and results of our endoscopy model. Finally, we detail areas for future research, including additions that could be made to enhance the endoscopy model. 2 The time for a physician to complete post-procedure tasks for the current procedure and to prepare for the next procedure.
Chapter 2 Background and Problem Analysis Hospitals in Ontario are under pressure to provide additional colonoscopies due to growing demand. This issue became a priority with the April 2008 launch of Canada's rst screening program for colorectal cancer (CRC) by Cancer Care Ontario (CCO) and the Ontario Ministry of Health and Long Term Care [1]. This program, called ColonCancerCheck (CCC), targets Ontarians between the ages of 50 and 74. All those with a positive result on the Fecal Occult Blood Test (FOBT) or who have a rst degree relative with CRC are recommended for colonoscopy. In 2007/08 approximately 30% of the eligible Ontario population had participated in FOBT screening within the past two years. The CCC program aims to increase this participation rate to 40% by 2011 [2, 1]. Thus, the CRC screening program is a contributing factor to the increasing volume of endoscopic colonoscopies required in the province. 2.1 Colorectal Cancer Considered a western lifestyle disease, CRC is the second most common cancer in the developed world and the third most common worldwide [3]. However, with regular screening, this disease can be detected and treated in its early stages, leading to a 90% cure rate. If left untreated until advanced stages, the cure rate for CRC falls to approximately 4
Chapter 2. Background and Problem Analysis 5 10% [2]. The risk for CRC increases with age and is doubled in individuals with rstdegree relatives who have developed the disease [4]. On average, 7% of Canadians will develop CRC during their lifetimes [5]. 2.1.1 Screening Tests Although there is no international consensus on the best type of CRC screening test, the most commonly used test is the Fecal Occult Blood Test (FOBT) [3]. This is a simple test that looks for blood in a bowel sample. To reduce mortality, there must be a follow-up test for positive FOBT results, which is most commonly a colonoscopy. A colonoscopy is an investigation of the colon using a surgical viewing tube called a colonoscope [3]. 2.1.2 Ontario's ColonCancerCheck Program Ontario's ColonCancerCheck (CCC) program is a population-based CRC screening program, which uses the FOBT for initial screening and the colonoscopy as a follow-up test for average risk individuals between the ages of 50 and 74 [6]. In most cases, the program is initiated through a primary care provider (PCP) visit, wherein the patient is engaged in a discussion about CRC screening and his/her risk is assessed. Those at an increased risk for CRC are immediately referred to a participating hospital for colonoscopy, without rst completing an FOBT [7]. Average risk individuals are asked to complete an FOBT kit and to mail it to a participating laboratory for analysis. The lab processes the kit and sends the result to the participant's PCP and also to the CCC program. If the FOBT result is negative, the patient is informed via the CCC program and is asked to perform an FOBT again in two years. Patients with positive FOBT results are informed by their PCPs and are referred for colonoscopy. Symptomatic patients are outside the scope of the CCC program. The rst year of the CCC program saw an FOBT positivity rate of 4.3% and approximately 62% of those with a positive result had a follow-up colonoscopy performed within six months. This translates into approximately
Chapter 2. Background and Problem Analysis 6 5500 additional colonoscopy cases [1]. 2.1.3 Colonoscopy Demand Total colonoscopy demand increased dramatically during the rst year of the CCC program, with volumes rising 17% over those in scal year 2007/08, as shown in Figure 2.1. 1 However, only about 2% of this increase can be attributed to the CCC program. The graph shows a trend of increasing colonoscopy demand even before this program was implemented, with an average percent increase of 11% between 2003/04 and 2007/08. This provides further evidence of the need to increase throughput in the endoscopy suite in order to meet this increasing demand. Figure 2.1: Colonoscopy demand 1 Data for 2003 to 2006 were compiled from OHIP and NACRS databases. Data for 2007 and 2008 were drawn from the CIRT (Colonoscopy Interim Reporting Tool) database at CCO.
Chapter 2. Background and Problem Analysis 7 2.2 Endoscopy Suites Figure 2.2: High level endoscopy processes Colonoscopies are just one of many procedures performed in hospital endoscopy suites. An endoscopy is a day surgery procedure that involves investigation of the gastrointestinal (GI) tract using a surgical scope, called an endoscope [8]. Other types of endoscopy procedures include gastroscopy, endoscopic retrograde cholangiopancreatography (ERCP), and exible sigmoidoscopy (ex sig) procedures. Gastroscopy and ERCP procedures examine the upper GI tract, while ex sig and colonoscopy procedures examine the lower GI tract. ERCP is generally scheduled for the longest amount of time, as it requires the use of both an endoscope and x-rays [9]. Based on data gathered from six Ontario hospitals, colonoscopy procedures constitute the largest percentage of each hospital's yearly endoscopic case mix, followed by gastroscopy procedures. Flex sig and ERCP procedures tend to constitute a lower percentage of the case mix. Figure 2.2 illustrates the ve high-level endoscopy processes, which we describe. More detailed, generalized process maps for each of these high-level operations can be found in Appendix A. 1. Booking: A block-booking system is used to assign endoscopists to procedure rooms. For instance, Dr. A may be assigned to room 1 from 08:00 to 12:00 on Monday and then to room 2 from 13:00 to 17:00 on Wednesday. Each endoscopist books patients into his/her assigned block times and the hospital combines these endoscopist block schedules into a single procedure schedule for each day. 2. Registration: On the day of the procedure, the patient rst arrives to a (usually centralized) registration area, where his/her demographic and medical information
Chapter 2. Background and Problem Analysis 8 is recorded or veried and the patient is given a hospital ID. 3. Admission: After registering, the patient is sent to the area of the hospital where his/her procedure will be performed. In sites that have dedicated endoscopy suites, this would generally be either the endoscopy or day surgery area. For sites that do not have dedicated suites, this would be a waiting area near the operating rooms. The patient changes into a hospital gown and is admitted by a nurse. Admission involves checking the patient's vitals, medical history, and preparation for the procedure, as well as potentially putting in the patient's IV. For lower GI tract procedures, the patient must have completed `prep', which consists of cleansing the bowel prior to the procedure. If this has not been completed, the patient cannot have the procedure at this time. 4. Procedure: The patient is brought to the procedure room, sedated, and his/her procedure is performed by an endoscopist. 5. Recovery: Once the procedure is complete and a recovery bay is available, the patient is taken to the recovery bay, where his/her vitals are monitored by a nurse. The patient is discharged home once he/she meets the hospital's discharge criteria and minimum recovery time (if one exists). After an endoscopist completes a procedure, the procedure room must be cleaned and prepared for the next patient in a process called room turnover. Based on data collected during the Colonoscopy Process Improvement Initiative (CPIi), room turnover times ranged from three to eight minutes. However, Berg et al. suggested that they range from 10-15 minutes based on expert opinion and Zamir et al. found that they have a mean of approximately 27 minutes according to data from 20 endoscopy suites [10, 11]. Since the next procedure scheduled in a room cannot be started until room turnover is complete, this turnover time is an important consideration in modeling the endoscopy suite.
Chapter 2. Background and Problem Analysis 9 Another important consideration is the physician to room ratio, which we observed as being either 1:1 (1-room model) or 1:2 (2-room model) during the CPIi. When physicians are assigned to two rooms at a time, room turnover time becomes less important, as a procedure can be performed in the alternate room while turnover is completed in the current room. However, physician turnover becomes an important consideration in this case, as the next procedure cannot start until the physician is ready. Based on expert opinion, Denton et al. modeled physician turnover using a triangular distribution with a minimum of 3 minutes, a mean of 4 minutes, and a maximum of 5 minutes [12]. Finally, urgent patients must also be seen in endoscopy suites, generally within 24-48 hours of their arrival. 2.3 Colonoscopy Process Improvement Initiative (CPIi) Cancer Care Ontario, in collaboration with the Centre for Research in Healthcare Engineering (CRHE) at the University of Toronto, launched the Colonoscopy Process Improvement initiative to analyze the endoscopy suites of six Ontario hospital sites in 2008. Knowledge and data obtained through this initiative guided the development of the endoscopy model described in this thesis. The chosen sites included a mix of large and small community hospitals (Markham Stouville, Uxbridge, Henderson, Hamilton General), a rural hospital (Owen Sound), and an academic centre (McMaster University Medical Centre). The CPIi involved observing the endoscopy suites of these hospitals, creating process maps of responsibilities and steps from booking to discharge, and nding opportunities for improvement. Four main improvement opportunities were identied. We list them and give examples of recommendations for each one. 1. Increase understanding of the overall system among all sta: Creating process maps of each high-level endoscopy process and verifying these maps with a team of endoscopy personnel, including the manager, booking clerk, nurses, technicians,
Chapter 2. Background and Problem Analysis 10 endoscopist secretaries, and endoscopists, gave the team a better understanding of the system. Each sta member gained knowledge of how his/her work aected those upstream and downstream in the process. Process mapping also revealed tasks that could benet from simplication. For instance, one site had ve dierent methods by which information was received to book a patient. 2. Dene and standardize roles and responsibilities: The CPIi revealed duplication of tasks in areas such as pre- and post-op patient teaching and documenting of patient information. For instance, the recovery nurses at both Uxbridge and Markham Stouville hospitals recorded patient vitals on paper and later transferred them to a computer. This was partially due to a lack of computer access in the recovery areas. Uxbridge has since changed this process so that recovery nurses now only record vitals electronically. 3. Document and standardize administrative processes: Administrative processes, such as booking, were often not well documented or standardized at the sites. For instance, the Uxbridge clinic clerk (responsible for booking patients) did not receive a standardized form from each endoscopist listing patients, their procedures, when to book the procedures, and any adverse conditions or complications the patients had that would aect scheduling. This resulted in some patient complications being overlooked. We recommended creating a standard consult summary form for the endoscopists to ll in after patient consults, so all of the patient information would be provided in a standardized way. Uxbridge implemented this recommendation and found it to greatly reduce how often complications were overlooked. We also recommended electronic peri-operative charting to all sites that were not already using it. Markham and Uxbridge implemented this recommendation using OR Manager software to standardize their documentation processes. 4. Schedule according to actual physician-specic procedure durations: An initial
Chapter 2. Background and Problem Analysis 11 scheduling analysis of one to two weeks of procedure duration data was completed for each site. These analyses found that procedure rooms were not being fully utilized at most sites. Reasons for this included scheduling procedures for xed durations, where these durations did not reect the amount of time actually required, leaving unscheduled time at the end of physician blocks, and/or having large variations in room turnover times. Owen Sound Hospital had the best overtime results, with only two of their 20 analyzed blocks running more than 20 minutes overtime. We observed that Owen Sound was the only site scheduling according to physician average procedure durations (rounded up to the nearest ve minutes) and thus recommended that the other sites also use this scheduling method. Markham and Uxbridge have since investigated potential gains from scheduling according to average physician procedure durations. 2.3.1 Data Analysis Procedure scheduling data from the six participating hospitals showed wide variations in the amount of time scheduled for endoscopy procedures, as illustrated by Table 2.1. For instance, the minimum time scheduled for colonoscopy procedures at these sites was 20 minutes, while the maximum time was double this at 40 minutes. Furthermore, most of the hospitals were unsure of why they scheduled according to these procedure durations, stating that it is `what they have always done.' If we consider just one of these hospitals, Markham Stouville, and investigate physicianspecic colonoscopy procedure durations at this site, we obtain the means and standard deviations shown in Table 2.2. These data are based on procedures performed in scal year 2008. Markham Stouville schedules colonoscopy procedures for 20 minutes, but all physicians have mean procedure durations of less than 20 minutes. Additionally, there is a range of seven minutes between the lowest and highest mean procedure times. Similar observations were made for other endoscopy procedures at this site, indicating that the
Chapter 2. Background and Problem Analysis 12 Table 2.1: Variation in scheduled procedure durations among the six CPIi hospitals Hospital Colonoscopy Gastroscopy Colonoscopy & Gastroscopy Flexible Sigmoidoscopy Uxbridge 25 15 35 N/A Markham 20 20 20 20 Owen Sound* 20 15 25 20 Henderson 40 20 60 20 Hamilton 30 15 45 15 McMaster 30 15 45 15 * Owen Sound actually books according to physician-specic procedure durations, rounded up to the nearest ve minutes. Average times among all physicians are shown in the table. Table 2.2: Colonoscopy cases and durations by endoscopist at Markham Stouville Hospital Endoscopist Colonoscopy Cases Mean Standard Deviation Dr. A 464 19 6 Dr. B 285 14 4 Dr. C 168 15 6 Dr. D 488 18 8 Dr. E 326 16 6 Dr. F 290 13 5 hospital could benet from physician specic procedure scheduling.it should be noted that the two physicians performing the greatest number of colonoscopy cases are gastroenterologists (GIs) who specialize in endoscopy procedures. These physicians tend to perform more complex cases than general surgeons, which may partially account for their longer mean procedure durations. However, the GIs did not have longer mean procedure durations than the general surgeons for all endoscopy procedures at all sites, so this is not a generalizable result. 2.3.2 CPIi Toolkit Implementation The CPIi was well received by the participating hospitals and hence we made the tools and techniques used to complete it available on the CCO website. To do this, we compiled these tools into a toolkit for hospitals to use in evaluating their own endoscopy suites. Data input sheets for the generic simulation model described in this report form part
Chapter 2. Background and Problem Analysis 13 of this toolkit. Interested hospitals can complete these sheets and email them to CCO, where they will be used as input to the endoscopy simulation model in order to determine the potential throughput and overtime/undertime improvements of scheduling according to physician-specic procedure durations. The toolkit is available on the CCO website at www.cancercare.on.ca/cpitoolkit. 2.4 Research Objectives This thesis evaluates the benets of scheduling according to physician specic procedure durations, using Markham Stouville Hospital as a case study. More accurate scheduling will increase throughput in hospital endoscopy suites, allowing them to better meet the increased demand for colonoscopies. An endoscopy model is developed to determine the relative changes in throughput, overtime, and undertime from implementing physician specic scheduling methods, such as scheduling according to the mean, 66th, or 75th percentile procedure durations.
Chapter 3 Literature Review This chapter presents an overview of factors leading to an ecient endoscopy suite. It further reviews the use of discrete event simulation in health care and more specically in modeling the natural history of colorectal cancer and endoscopy suite operations. Finally, it details generic simulations, and gives some insight into procedure scheduling techniques by providing a review of the relevant literature. 3.1 Endoscopy Suite Eciency A number of researchers have investigated factors leading to ecient endoscopy suites. There is agreement that shorter room turnover times lead to greater patient throughput [10, 11, 13]. However, this observation depends on how many procedure rooms each physician is using. Zamir and Rex found that the suite was more ecient when each physician used two procedure rooms [11]. In a later paper, Rex et al. made the qualication that although this arrangement was more ecient for physicians, it led to a 24-41% decrease in non-physician sta utilization [14]. Denton et al. investigated assigning OR teams to more than one endoscopy procedure room, nding that patient throughput per team was greater when these teams were responsible for four rooms versus when there were two teams who were each responsible for two procedure rooms [15]. That is, when 14
Chapter 3. Literature Review 15 one OR team was assigned to all four rooms, 16 patients were seen in a block of ve hours. However, when two OR teams were each assigned to two rooms, each team was only able to complete 12 procedures. Since there were two teams in this case, this translates into a total throughput of 24 patients, which is 50% greater than the 16 that could be seen when only one team was assigned to the four rooms. Hence, there is a trade o between the productivity of individual endoscopy teams and overall patient throughput in the suite. There is also a trade o between individual endoscopist productivity and procedure room utilization, as shown by Berg et al. They used simulation to show that procedure room utilization decreased without an appreciable increase in patient throughput when endoscopists were assigned to more than two procedure rooms at a time [10]. Patient recovery times also aect throughput in endoscopy suites, as found by Grossman et al. in their simulation of an endoscopy lab. They simulated the lab for 20 days and evaluated the increase in patient throughput and the reduction in length of stay (LOS) gained by reducing patient preparation, procedure, and recovery times by 25-75%. Grossman et al. determined that combining improvements in these three areas led to the greatest overall results, but if only one area was to be improved, reducing recovery time would give the greatest throughput increase [16]. Joustra et al. used a combination of integer linear programming and simulation to reduce patient access times in an endoscopy suite. They found that more time was being set aside for urgent procedures than was needed and that by reassigning this time to procedures that were not currently meeting their access targets, an optimal master schedule could be created [8]. These studies indicate that an ecient endoscopy suite maximizes patient throughput by streamlining turnover times, maximizing room utilization, booking procedures for appropriate durations, and minimizing patient preparation, procedure, and recovery times. However, it should be noted that there is a trade o between maximizing room utilization and maximizing physician productivity. Although maximizing room utilization leads to greater overall patient throughput, it reduces the number of patients each physician can
Chapter 3. Literature Review 16 see during his/her block time. 3.2 Discrete Event Simulation in Health Care Discrete event simulation has been applied to health care problems for more than forty years. Jacobson et al. provide a comprehensive review of discrete event health care simulations during this time [17]. Their review builds upon that of Jun et al., which covered the twenty years preceding 1999 [18]. Both reviews focus on the modeling of health care clinics, including hospitals, emergency departments, and ambulatory surgery centers. Two main application areas are discussed: patient ow and resource allocation [17, 18]. This thesis is concerned with modeling patient ow and procedure room allocation in order to increase patient throughput in the endoscopy suite. 3.3 Colorectal Cancer and Endoscopy Simulations Simulations of colorectal cancer are usually concerned with modeling the progression or natural history of the disease and include microsimulation models such as those described in [19, 20]. Both of these microsimulation models simulated one million Americans sampled from the population in 1993 and 2000, respectively [19, 20]. The MISCAN-COLON model described by Loeve et al. provided a useful comparison of the costs and benets of CRC screening using exible sigmoidoscopy (FSIG) every three years versus using biennial FOBT screening. The results, though based on the unrealistic assumption of 100 percent screening attendance, showed that the FSIG program would reduce mortality by nearly 20 percent more than the FOBT program, but would also cost more than three times as much [19]. Endoscopy simulations are more process oriented and model patient ow, resource utilization, and/or scheduling policies in the endoscopy suite. Denton et al. simulated an outpatient endoscopy suite dedicated to CRC screening procedures using data from the
Chapter 3. Literature Review 17 Mayo Clinic [15]. They considered patient ow from arrival to discharge with the goal of minimizing both patient waiting time and overtime in the suite, as well as evaluating the assignment of OR teams [15]. Simulated annealing was used in combination with the simulation model to achieve a 50% improvement to the current schedule [15]. Joustra et al. used simulation and optimization to improve access times in an endoscopy suite in the Netherlands. They found that by simply reallocating current suite capacity all required access times could be achieved [8]. Both of these papers simulated endoscopy suites in a single hospital location to nd improvements for that site. The papers did not consider reusing the simulation models at other similar sites. 3.4 Reusable Simulation Models Reusability, also known as composability or genericity, has recently developed into an important simulation modeling concept. As such, numerous approaches and frameworks of reusability have been discussed and developed. Fletcher and Worthington provide a categorization of these approaches into four levels of genericity [21]. Their categorization expands on the three level description by Sinreich and Marmor [22]. An adaption of this categorization is shown in Figure 3.1. It is based on the level of abstraction and exibility of each model. The four types of models are shown in boxes, with a dark blue background indicating that they apply in one single process and industry and a light blue background indicating that they apply to multiple processes or in multiple industries. The categories range from specic models, which are developed for a single process in a single industry and location to generic models, which can be applied to multiple sites in a single industry, and further to generic framework and principle models. Generic framework models are developed to be used in multiple processes and generic principle models can further be applied to multiple industries. Most health care simulations are specic models, as they focus on individual hospital units [18]. However, generic health care models are becoming
Chapter 3. Literature Review 18 Figure 3.1: Four levels of genericity for simulation models more prevalent. See, for example [22, 23, 24]. Generic simulation models have also been applied outside of health care in areas such as designing automated material handling systems [25], comparing proposed designs for reusable launch vehicles [26], and modeling passenger handling processes at airports [27]. 3.5 Procedure Scheduling Scheduling procedures into operating rooms is dicult due to the uncertainty associated with surgical procedures. Dexter et al. found that surgeons' mean procedure durations provide reasonably accurate estimates of the actual procedure duration. However, schedules based on these durations fail to minimize overtime or undertime [28]. Since most surgical durations have been found to follow a left truncated lognormal distribution, some surgeries may take much longer than their mean due to the long tail of this distribution [29, 30, 31, 32]. Thus, Alvarez et al. suggested that the 75th percentile may be a better predictor of procedure durations [33].
Chapter 4 Methodology Although endoscopy procedures are generally shorter and less variable than surgical procedures, similar scheduling techniques can be applied to improve throughput and utilization in the endoscopy suite. This chapter details the high-level design of the endoscopy model. The goal of this model is to identify physician specic procedure scheduling methods that will increase throughput while reducing undertime and without signicantly increasing overtime. 4.1 Design of the Endoscopy Model The endoscopy model consists of ve modules, as shown in Figure 4.1, where parallelograms represent data modules and rectangles represent program modules. We describe each module in turn. 19
Chapter 4. Methodology 20 Figure 4.1: High-level design of the endoscopy model 1. Simulation Data Template: This is an Excel workbook containing site-specic input data for the scheduler and the generic discrete event simulation (DES) model. These data are arranged into seven worksheets (included in Appendix B), as follows: (a) Scheduling: This sheet contains procedure and recovery process data, including the number of procedure rooms and recovery bays, physician to room ratio, average number of urgent cases performed in a month, number of endoscopists regularly working in the suite, whether or not the hospital has a dedicated endoscopy suite, and the average and minimum recovery durations. (b) Endoscopist1 : This sheet contains a list of weekly block times. These block times are assigned either to a particular endoscopist or to a group of endoscopists. A hospital could provide a weekly block schedule instead of completing this worksheet. (c) Endoscopist 2: Wait list information for each endoscopist is provided in this worksheet. This includes how many days in advance procedures are being booked and whether each endoscopist's wait list is growing, shrinking, or staying the same when compared to the previous year. Endoscopist type, which is either general surgeon (GS) or gastroenterologist (GI), is also input in this worksheet. (d) Endoscopist 3: Physician- and procedure-specic data are input in this work-
Chapter 4. Methodology 21 sheet. These include the number of cases of each procedure type performed by each endoscopist in the previous year, the scheduled, average, standard deviation, and minimum procedure durations, and the average time between procedures (physician turnover time) for a physician to room ratio of 1:2. One nal table denes the physician-specic procedure durations to be used in creating schedules for the simulation. (e) Procedure Data: The data in this worksheet can be provided by a hospital and then analyzed by CCO to complete most of the tables in the Endoscopist3 worksheet. This worksheet asks for data on the procedures that were performed, who performed them, and their start and end times for one year. If hospital sta nd it easier to provide data in this form rather than the summary form required by the tables in the Endoscopist3 worksheet, this worksheet can be completed instead. (f) Turnover: This worksheet asks for the average scheduled room turnover times by procedure. It also includes a table for the calculated room turnover times, which can be estimated by calculating the time between procedures using the data in the Procedure Data worksheet, if these data are provided. Otherwise, the calculated turnover times are initially set equal to the scheduled room turnover times provided by the hospital. (g) Calculated: In this worksheet, data elements are calculated from the previous Excel sheets. These elements include the minimum and average scheduled and physician specic procedure durations over all procedures and endoscopists, and the proportion of patients who are having lower GI tract procedures and hence require prep. 2. Scheduler: The scheduler calls a data parser program to extract and format required data elements from the simulation data template. (Both the scheduler and
Chapter 4. Methodology 22 the parser are written in Python 2.6). It then creates wait lists and procedure schedules for each endoscopist. Two schedules are created; the rst uses scheduled procedure durations and the second uses physician specic durations. All endoscopist schedules are then combined by type and room into hospital-wide schedules and output to Excel. The scheduler is described in detail in Chapter 5. 3. Schedules for Each Procedure Room : These are the hospital-wide schedules that are output to Excel by the Scheduler. 4. Generic DES : The Basic Edition of Rockwell Arena Version 11 is used to create the generic DES, which reads in the schedules and data from the simulation data template to build procedure pathways for each hospital. The simulation then generates patient arrivals according to the schedules and simulates these patients going through their procedures and recovering. Urgent patients are also generated and simulated in two groups: those who must have their procedures completed within 24 hours and those who can wait for 48 hours. The simulation provides overtime and undertime results, which are output to Excel. The generic DES is described in detail in Chapter 6. 5. Results: The results of the generic DES consist of an Excel workbook containing the amount of overtime and undertime incurred for each block of the simulation run and the name of the endoscopist working in that block. Total overtime and undertime results for each endoscopist are also recorded for each replication of the simulation.
Chapter 5 The Scheduler The scheduler reads in data from the simulation data templates (using the data parser - see Appendix C for details) and outputs two hospital schedules for each endoscopy room as well as the procedure case mix for each endoscopist. One schedule for each room is based on scheduled procedure durations and the other uses physician specic durations. This chapter discusses the design, assumptions, output, and verication of the scheduler. 5.1 Design The scheduler mimics the essential steps followed by endoscopist secretaries and booking clerks to create an endoscopy schedule. A generic process map of all steps, with the essential steps highlighted, is provided in Figure 5.1. 5.1.1 Endoscopist Secretary The endoscopist secretary receives patient referrals, schedules patient consults with the endoscopist, if required, and places patients into the endoscopist's assigned block time. In our scheduler, the process begins after consults have been completed, since we are not interested in modeling wait times for access to endoscopy procedures. Procedure 23
Chapter 5. The Scheduler 24 Figure 5.1: Process map for referral/booking types to be scheduled are generated according to the endoscopist's case mix, which is the proportion of time a particular procedure is performed out of all procedures performed by the endoscopist. For instance, if Dr. A performed 300 colonoscopy procedures last year out of a total of 1000 procedures, her case mix for colonoscopy procedures would be 300 1000 = 0.3. The algorithm used to generate the procedure types can be found in Section C.2 of Appendix C. 5.1.1.1 Wait List As procedures are generated, they are placed on the endoscopist's wait list. We assume that this wait list is populated in order of patient priority. The length of the wait list is determined from data on the number of days in advance procedures are being booked by each endoscopist (provided in the Endoscopist2 data template sheet). We convert this value to weeks and multiply it by the average number of procedures the endoscopist performs in a week to determine how many procedures are initially on the wait list. Then, we add a week's worth of additional procedures to this initial wait list for every week being scheduled. For instance, if Dr. A had a 30-day wait list and procedures
Chapter 5. The Scheduler 25 were performed ve days per week, this would constitute a six week wait list. Assuming she performed 20 procedures/week on average, we would generate 120 procedures to populate her initial wait list. Then, if we were creating a four week schedule, we would add a total of 80 additional procedures to Dr. A's wait list. This ensures that, on average, enough patients are added to Dr. A's wait list to populate her four week schedule without changing her initial wait list length. Thus, we assume that, in the short run, endoscopists will see approximately the same number of patients in consult every week and hence will replenish their wait lists by the same amount. A second wait list is generated for each endoscopist based on the average number of procedures he/she could perform in a week if his/her schedule was created using physician specic procedure durations. In this case, the wait list is rst set equal to that created using scheduled procedure durations. Then, additional procedures are added to the end of it to account for the dierence between the average number of procedures completed per week using scheduled durations and that using physician specic durations. If using physician specic durations would reduce the size of the wait list, we simply do not add any additional procedures to it. 5.1.1.2 Block Times We have now created a list of patients, which is given to the secretary to schedule. The secretary knows which blocks have been assigned to the endoscopist and he/she schedules the procedures into these blocks. Our scheduler must assign blocks to the endoscopists according to the block schedule used by the hospital (provided in the Endoscopist1 data template sheet) before procedures can be scheduled. Although these blocks may be assigned directly to endoscopists, they may also be assigned to a group of endoscopists according to their type (GI or GS). Figure 5.2 details how blocks assigned to groups of endoscopists are divided among them each week.
Chapter 5. The Scheduler 26 Figure 5.2: Block assignment to groups of endoscopists There is one nal complicating factor in assigning block times, which is illustrated in the Friday block of Table 5.1. That is, one physician may be assigned to a block for one week of every month while a dierent physician is assigned for the remaining weeks. For instance, on Friday Dr. A is assigned to the morning block for the rst week of each month and a GS is assigned for the remaining weeks. To account for this, we include a column for the hospital to indicate how many weeks each block time is assigned to each endoscopist in the Endoscopist1 data template. We then only assign the blocks to that endoscopist for the listed number of weeks.
Chapter 5. The Scheduler 27 Room 1 Table 5.1: Sample block schedule Monday Tuesday Wednesday Thursday Friday Dr. A (AM) 08:00-12:00 GS (PM) 13:00-17:00 Dr. B (AM) 08:00-12:00 Dr. A (PM) 13:00-17:00 GS (AM) 08:30-12:30 Dr. B (PM) 13:30-17:30 Dr. B (AM) 08:00-12:00 GS (PM) 13:00-17:00 Dr. A (AM) 1st GS 2nd-5th 08:00-12:00 GS (PM) 1st-3rd Dr. A 4th-5th 13:00-17:00 5.1.1.3 Creating Endoscopist Schedules Now we are ready to create schedules for the endoscopists by populating their assigned blocks with procedures from their wait lists. Each time a procedure is scheduled, its duration is subtracted from the time remaining in the block and it is removed from the wait list. If the next procedure to be scheduled requires more than the remaining block time, we apply Algorithm 5.1 to decide whether subsequent procedures can be scheduled into the block. A subsequent procedure can be scheduled if the time remaining in the block (timeleft) is greater than or equal to the duration (dur[i + 1]) of this procedure. We only look back one week's worth of procedures (W L_length), as this allows us to more closely reect what happens in practise where not all blocks are completely lled. In addition, since we assume the wait list is in order of priority, we try to t as many higher priority patients as possible into the available block time for each endoscopist. Since it is not known in advance whether or not a polypectomy (resection of a polyp) will need to be performed during a procedure, when mimicking the hospital's current scheduling practise, we schedule polypectomy procedures for the same amount of time as the corresponding procedure without polypectomy. When scheduling according to physician specic procedure times, these procedures are scheduled for a weighted average of the duration (dur) of the polypectomy procedure and the similar procedure without polypectomy, using Equation 5.1. For instance, if Dr. A took an average of 15 minutes to perform a colonoscopy procedure and 18 minutes to perform a colonoscopy with polypectomy procedure, where these procedures constituted 0.5 and 0.2 of her procedure
Chapter 5. The Scheduler 28 Algorithm 5.1 Scheduling remaining block time if dur[i] == mindur then complete else for pt = 1 to W L_length do if pt == W L_length then complete else if WL empty then complete else proc W L[pt + 1] if dur[i + 1] < dur[i] and dur[i + 1] timeleft then sch W L[pt + 1] timeleft = timeleft dur[i + 1] if timeleft == 0 or timeleft mindur then complete end if else if dur[i + 1] < mindur then complete end if end if end if end for end if
Chapter 5. The Scheduler 29 case mix, respectively, then each of these procedures would be scheduled for 15.9, or approximately 16 minutes. 2 casemix i (dur i ) 2j=1 (5.1) i=1 casemix j 5.1.2 Booking Clerk Once the schedules have been created for each endoscopist, they are sent to the booking clerk who combines them to create a schedule for the endoscopy suite. Unlike the actual booking clerk, our scheduler does not consider patient complications such as sleep apnea or antibiotic resistance when creating the endoscopy suite schedule, as we were unable to obtain data on the proportion of endoscopy patients with each complication. We also do not open unused block time in the scheduler because we assume that endoscopists schedule all of their assigned blocks and hence there are not any unused blocks. 5.1.3 Assumptions The scheduler is designed with the following assumptions: The wait lists are ordered according to patient priority. If block time is assigned to a group of endoscopists, it is assigned to them according to their type (GI or GS). Endoscopists fully schedule their assigned blocks, but only look back one week in their wait list in order to do so. 5.1.4 Program Output The scheduler outputs overall endoscopy suite schedules and case mix information to Excel. Figure 5.3 shows a portion of a schedule, which is saved as Schedules.xls by
Chapter 5. The Scheduler 30 Figure 5.3: A portion of a generated hospital schedule Figure 5.4: Case mix output from the scheduler the scheduler (See Appendix D for a full schedule output example). The time between procedures is in minutes and the rst value is calculated as the minutes from 0:00, since this is the time at which the simulation model starts. Other data elements included in the schedule are the mean, standard deviation, and minimum procedure durations, as well as the calculated turnover time. Case mix values are output to the le CaseMix.xls and a portion of these values are shown in Figure 5.4. 5.1.5 Verication Both inputs to and outputs from the scheduler were veried to be correct. The input data, read using the data parser, were checked against the values in the simulation data template for each endoscopist to ensure they were correct. In each instance, they were found to be accurate. The scheduler was run using data for 1-room and 2-room endoscopy models. Output schedules were checked to ensure the blocks had been assigned and lled correctly and all of the procedure and turnover data were accurate. The case mix values
Chapter 5. The Scheduler 31 were also veried to be correct by calculating them from the input data and by ensuring that each row of the output le added to one.
Chapter 6 The Generic Discrete Event Simulation Model While the scheduler determines the potential throughput gains from scheduling according to physician-specic procedure durations, the generic simulation model shows any additional overtime/undertime costs that may be incurred from increasing the throughput to this new level. The simulation model is built using the Basic Edition of Rockwell Arena version 11. This chapter details the design and assumptions of the generic simulation model. 6.1 Model Design The simulation models patients from arrival to the procedure area to discharge, as shown in Figure 6.1. It does not consider pre-procedure steps, as we are interested in comparing dierent procedure scheduling methodologies, which are only aected by pre-procedure processes to the extent that they delay patient arrivals to the endoscopy suite. Each patient arrives to the endoscopy suite before his/her scheduled procedure time. The patient then waits for a procedure room and endoscopist, and, once obtained, his/her procedure is performed. After the procedure, the patient is sent to the recovery area 32
Chapter 6. The Generic Discrete Event Simulation Model 33 Figure 6.1: Simulation design (when a space is available) where his/her vitals are monitored, and, after recovering, he/she is discharged home. Once the patient has left the procedure room, it is cleaned and prepared for the next patient (turned over).the physician completes post-procedure tasks after the patient's procedure has been completed in a process called physician turnover. We describe the detailed design of each numbered process. 1. Patient Arrivals: Both scheduled and urgent patient arrivals are accounted for in the simulation. (a) In general, scheduled patients arrive 40 minutes before their procedure times (See Section C.3 for a technical explanation of how these arrivals are generated). Forty minutes was chosen because most sites we visited asked patients to arrive one hour before their procedures and we allow 20 minutes for preprocedure tasks. It should be noted that the endoscopist does not arrive until the scheduled start time of the rst block of each day, and hence procedures do not begin until then. (b) Urgent patients are created at the beginning (01:00) of each day, and the number created is generated from a Poisson distribution. The mean of this distribution is equal to the average number of urgent endoscopy cases performed at the hospital each day. There are two types of urgent patients: those
Chapter 6. The Generic Discrete Event Simulation Model 34 who require prep and those who do not. We assume that patients requiring prep have already completed it before arriving at the endoscopy suite. Hence, these patients must be seen on the day they arrive. All other urgent patients must be seen within 48 hours of their arrival. 2. Patient Queue: After patients have arrived, they are placed in a queue where they wait for a procedure room and endoscopist to become available. Scheduled patients are given priority in this queue to ensure that urgent patients do not disrupt the schedule. Thus, urgent patients are only seen when there are no scheduled patients waiting in the queue and both a room and an endoscopist are available. Most sites have unscheduled block time set aside for urgent patients each day. For instance, Markham leaves an hour of unscheduled time over the lunch break, a gap between the morning and afternoon blocks each day, as well as two hours at the end of most days. In the simulation, urgent patients will most likely be seen during these unscheduled blocks, but they may also be seen between scheduled patients if an endoscopist gets ahead of schedule. 3. Procedure: Each endoscopist performs the procedures that are scheduled in his/her blocks. The procedure durations are generated from a left-shifted lognormal distribution, with parameters equal to the mean (less minimum) and standard deviation of procedure duration for this endoscopist and procedure. A lognormal distribution was chosen because it is recommended in the scheduling literature, is used to generate colonoscopy procedure durations by Denton in [12], and provides a good approximation of the endoscopy procedure durations provided by Markham Stouville Hospital (see Section 6.2). Urgent procedures are completed by the endoscopist who performed the preceding procedure in the room to which they are assigned. 4. Recovery: After a patient's procedure is complete, he/she seizes an available re-
Chapter 6. The Generic Discrete Event Simulation Model 35 covery bay. If no recovery bays are available, the patient waits in the procedure room until one becomes available. A patient's recovery time is generated as the hospital's minimum recovery time plus a lognormal distribution with the mean set equal to the average recovery time (less the minimum) and the standard deviation set to 25% of this mean. We chose this standard deviation because we did not have data on recovery durations and it is supported by Denton in his colonoscopy suite study, where he observed a recovery standard deviation that was slightly higher than 25% of the observed mean recovery time [12]. 5. Room Turnover: Once the patient has left the procedure room, it must be cleaned and prepared for the next procedure. The duration of this process is set to the average turnover time, as calculated from historical data. 6. Physician Turnover: Physicians may require some time between procedures to complete post-procedure tasks, such as dictating procedure results. Hence, we include a module to allow for this delay in the simulation. 6.1.1 Making it Generic A key contribution of this simulation is its genericity, as it can be used to model the endoscopy operations of many sites, based on input data provided in the simulation data template. This is accomplished by dynamically building simulation pathways for each site and by using site-specic data to populate variables and to set model parameters. 6.1.1.1 Dynamic Simulation Pathways The simulation model initially consists only of pathways that are common to all sites, regardless of the number of procedure rooms or the physician to room ratio at a site. These include the pathway for urgent patients, the recovery pathway, and the nal modules in the room and physician turnover pathways (room ready and endoscopist ready).
Chapter 6. The Generic Discrete Event Simulation Model 36 Although each of these paths are driven by site-dependent data, the general patient ow through them is the same regardless of the site being modeled. These common modules are shaded grey in Figure 6.2. The rst time the simulation is run for a particular site, it generates the site-specic portion of the model. An example of a site-specic generated design for a site with two rooms and a 1:1 physician to room ratio is shown in Figure 6.2. This design is the same as that shown in the initial simulation design gure (see Figure 6.1), except now we show each room with its own patient arrivals, patient queue, procedure process, and turnover operations. In a 1-room model, separate paths are created for each room because dierent endoscopists are assigned to these rooms and each has its own patient schedule. In a 2- room model (1:2 physician to room ratio), only one pathway is created for each set of two rooms in a suite because the same endoscopist is assigned to both rooms and both follow the same schedule. When an urgent patient arrives, he/she is randomly assigned to one of the patient queues to wait for a room and endoscopist. In Figure 6.2, an urgent patient would either be assigned to the queue for room 1 or that for room 2. However, these patients can switch between queues if, for instance, they were assigned to the queue for room 1, but procedure room 2 has nished early. We assume that all endoscopy patients recover in the same area, which is why the recovery pathway is common (shaded grey). Finally, we do not restrict the number of rooms undergoing turnover at a time, but this could be restricted by explicitly modeling the sta responsible for this operation. 6.1.1.2 Setting Model Parameters Once the simulation pathways have been created, we use data from both the schedule and the simulation data templates to populate model variables. There is a variable array corresponding to nearly every element of the schedule, including the time between procedures, procedure type, endoscopist performing the procedure, room turnover time, and the mean, standard deviation, and minimum procedure durations. The time between
Chapter 6. The Generic Discrete Event Simulation Model 37 Figure 6.2: Common and site-specic simulation design procedures variable is used to generate scheduled patient arrivals and then the remaining variables are assigned to patients as attributes. Procedure duration attributes are used to specify the parameters of the lognormal procedure time distribution for each patient, while the turnover time is used as a constant for modeling room turnover. End times of each block and each day, as well as the number of blocks in the schedule are also stored as variables in the model. Urgent patients are not assigned to a particular procedure room or endoscopist, but obtain these as available. We assume that the endoscopist who performed the previous procedure in the room seized by the urgent patient also performs his/her procedure. Once a procedure room and endoscopist have been obtained by an urgent patient, this patient is assigned a procedure type according to the case mix of his/her assigned endoscopist, and is also assigned the mean, standard deviation, and minimum procedure durations corresponding to this endoscopist and procedure.
Chapter 6. The Generic Discrete Event Simulation Model 38 Table 6.1: Summary statistics Large Data Sets Small Data Sets Dr. A Colon Dr. D Colon and Gastro Dr. C Colon and Poly Dr. E Flex Sig Data Size 462 249 33 34 Min 8 12 10 5 Max 48 82 35 18 Mean 18.6 27.6 19.6 9.0 Std. Dev 6.0 9.9 6.7 3.1 6.2 Input Data Input data for the simulation were drawn from the simulation data template, completed by endoscopy personnel, the procedure schedules created by our scheduler, and potentially from a year's worth of endoscopy procedure duration data. We obtained procedure duration data from Markham Stouville Hospital for scal year 2008 and t probability distributions to physician- and procedure-specic groups from these data. For each group, we removed any data observations that were less than the minimum procedure times specied by the endoscopists at Markham. On average, three observations were removed from each group, with the maximum being 26 out of 347, or 7%, of the observations being removed for gastro procedures performed by Dr. D. Although we did not have enough data to validate the t of the lognormal distribution for every procedure and endoscopist group, we were able to validate it in most cases. We show the t of a lognormal distribution to procedure duration data for dierent physician and procedure groups in two cases: (1) large data sets, and (2) small data sets. Summary statistics for these data sets are shown in Table 6.1, where all data elements except the rst are in minutes. Figure 6.3 shows the t of a two parameter lognormal distribution to the large data sets using histograms and quantile-quantile graphs. Both histograms appear to be well approximated by the lognormal distribution with parameters equal to the mean and standard deviation of each data set. In addition, the quantile-quantile (Q-Q) graphs
Chapter 6. The Generic Discrete Event Simulation Model 39 Colonoscopy Dr. A Colonoscopy Dr. A Density 0.00 0.02 0.04 0.06 0.08 0.10 Sample Quantiles 10 20 30 40 10 20 30 40 50 Duration(min) 10 20 30 40 Theoretical Quantiles Colonoscopy and Gastroscopy Dr. D Colonoscopy and Gastroscopy Dr. D Density 0.00 0.01 0.02 0.03 0.04 0.05 Sample Quantiles 10 20 30 40 50 60 70 80 20 40 60 80 Duration(min) 10 20 30 40 50 60 70 Theoretical Quantiles Figure 6.3: Lognormal distribution t to procedure duration data, large data sets indicate adequate ts of the data to lognormal distributions, as most of the points fall along the x = y line, with some deviation occurring in the tails. However, it is well known that a Q-Q plot amplies dierences that occur in distribution tails, so we are not concerned with these deviations [34]. For Dr. D, the chi square goodness of t test accepts the lognormal hypothesis at the 0.05 signicance level, with a p-value of 0.0607, but the Anderson-Darling (AD) test rejects this hypothesis at the same level of signicance with a p-value of 0.0369. Both the chi square and AD tests reject the lognormal hypothesis for Dr. A's data. Despite this, the graphs provide evidence that the lognormal distribution gives a reasonably good t to both data sets. The t of a two parameter lognormal distribution to the small data sets is shown in Figure 6.4.Due to the smaller number of data points, we test the goodness of t of these distributions using only the AD test. This test accepts the lognormal hypothesis at the
Chapter 6. The Generic Discrete Event Simulation Model 40 Colonoscopy and Polypectomy, Dr. C Colonoscopy and Polypectomy Dr. C Density 0.00 0.02 0.04 0.06 0.08 0.10 Sample Quantiles 10 15 20 25 30 35 10 15 20 25 30 35 Duration(min) 10 15 20 25 30 35 Theoretical Quantiles Flexible Sigmoidoscopy Dr. E Flexible Sigmoidoscopy Dr. E Density 0.00 0.05 0.10 0.15 0.20 Sample Quantiles 6 8 10 12 14 16 18 4 6 8 10 12 14 16 18 Duration(min) 4 6 8 10 12 14 16 18 Theoretical Quantiles Figure 6.4: Lognormal distribution t to procedure duration data, small data sets 0.05 level of signicance in both cases, with p-values of 0.3625 and 0.2555, respectively. Hence, we conclude that the lognormal distribution provides a good t to these data. 6.3 Assumptions The simulation model was designed with the following assumptions: Endoscopy suites can only follow a 1-room or a 2-room model, not a mixture of these or any other physician to room ratio. Urgent patients arrive independently and the number arriving each day can thus be modeled by a Poisson distribution. If urgent patients require prep for their procedures, we assume they enter the system with it already completed and hence must be seen within 24 hours.
Chapter 6. The Generic Discrete Event Simulation Model 41 Recovery times are independent and can be generated using the minimum recovery time plus a lognormal distribution with its mean equal to the average recovery duration (less the minimum) and its standard deviation set to 25% of the mean. There is one common recovery area for all endoscopy patients. More than one room can be undergoing turnover at a time. Scheduled patients either arrive at their procedure time or a specied number of minutes (initially set to 40) before their procedures begin. 6.4 Model Output The generic simulation model outputs the overtime or undertime incurred by each physician for each of his/her blocks as well as a summary of this information. The summary includes the total number of times each physician ran overtime or undertime as well as how many total minutes of overtime and undertime were incurred by each physician during the simulation run. These results are output to Excel (Simulation_Output.xls) and can be used to determine the overtime and undertime costs of scheduling according to physician specic procedure durations. A portion of simulation output based on a schedule with 40 blocks and six physicians is shown in Figure 6.5, where overtime and undertime results are in minutes (undertime values are negative). These results are based on scheduled, rather than physician specic procedure durations and hence large variations exist between physicians due to dierences in how long they actually take to perform each of their procedures. The `Day' column shows a numeric value for each day, with zero representing Monday, 1 representing Tuesday, etc.
Chapter 6. The Generic Discrete Event Simulation Model 42 Figure 6.5: Sample simulation output data
Chapter 7 Validation This chapter describes our validation of the scheduler and the simulation model using 2008 procedure duration data from Markham Stouville hospital. 7.1 Throughput Validation To validate the number of procedures output by the scheduler, we generated 10 four-week (20-day) schedules based on Markham's 2008 endoscopy block schedule. We combined these schedules to compute the average daily patient throughput. Using Welch's approach, we compared this value against the average throughput from 10 months (March - Dec.) of Markham's 2008 endoscopy data (after removing urgent patients from these data). Welch's test showed that the dierence between the means was in the 95% condence interval (0.5, 1.5). Since this interval does not contain zero, the dierence between the means is statistically signicant. This can be partially explained by the much smaller variance in the scheduler data (see Table 7.1). Since the scheduler uses an algorithm to assign procedures to blocks and does not account for factors such as sta absenteeism, under-utilization of blocks, or large delays between procedures, we expect its throughput to have less variance than that of the actual system. However, the scheduler still results in an average of one extra procedure per day more than what is observed in the actual 43
Chapter 7. Validation 44 Table 7.1: Throughput comparison Markham Data Scheduler Data Days 198 200 Mean 17.3 18.3 Variance 9.9 2.7 system. This can likely be explained by the optimization step included in the scheduler's algorithm to ensure that it always attempts to ll each block. The historical data show that blocks are not always lled in practise, as buer time is often scheduled in a physician's block to account for factors such as late block start times, late patient arrivals, urgent cases running overtime, and specic equipment, such as a desired scope, not being ready for the procedure [35]. Most of these are process issues that Markham is currently addressing. For instance, Markham implemented a late start policy for its physicians in Oct. 2008, which has reduced the occurrence of late block start times. Given these explanations, we conclude that the dierence between the means is practically insignicant and hence the scheduler is valid. 7.2 Simulation Output Validation We used the correlated inspection approach to validate the simulation model, with overtime and undertime results as the comparison factors. We dene overtime and undertime as the dierence between when the last procedure of a block is completed and when that block is scheduled to end. A positive dierence means the procedure nished after the scheduled end time of the block and hence overtime is recorded, whereas a negative difference represents undertime. For instance, if a block was scheduled to end at 11:30 and the last procedure was completed at 11:36, six minutes of overtime would be recorded. If instead the last procedure was completed at 11:20, 10 minutes of undertime would be recorded.
Chapter 7. Validation 45 7.2.1 Correlated Inspection Approach The correlated inspection approach involves `driving' the simulation from historical data and comparing its results with those of the actual system [34]. To do this, we took data from Markham Stouville Hospital for the month of March, 2008, and arranged it into the format output by the scheduler. The data included the procedure performed, its duration, the endoscopist who performed it, and the time between its start and that of the previous procedure. 7.2.1.1 Validating Model Calculations To validate the model calculations, we removed urgent patients from consideration and used the exact historical times between procedures to drive patient arrivals in the model. We also used the exact historical procedure durations, rather than lognormally generated ones, to model the length of each patient's procedure. Finally, we continued to use constant average turnover times and lognormally distributed recovery times, as we did not have exact historical values for these data. Since Markham uses a 2-room model, turnover times should not have a signicant eect on room availability. Additionally, recovery times will only inuence procedure room availability if the recovery bays become blocked, preventing a patient from leaving the procedure room and entering a recovery bay. We ran 10 replications of the model with this schedule as input and obtained average values for overtime and undertime by physician that closely match those of the actual system, as shown in Table 7.2 (all times are in minutes). It should be noted that each replication gave the exact same overtime and undertime results, since procedure durations and patient arrivals were based on the historical data and were hence deterministic. Dr. A's average undertime value varies most from the historical value (a dierence of 4.1 minutes) when all results are considered. However, when Dr. A's undertime is compared to the historical data on a block-by-block basis, the largest individual dierence is only
Chapter 7. Validation 46 Table 7.2: Average overtime and undertime results by physician, simulation and historical data Overtime Undertime Endoscopist Simulation Historical Simulation Historical Dr. A 18.6 19.0 17.4 21.5 Dr. B 82.7 83.0 11.7 11.3 Dr. C 0.0 0.0 82.5 82.0 Dr. D 45.7 46.0 3.7 5.0 Dr. E 0.0 0.0 36.8 36.5 Dr. F 48.5 49.0 21.7 22.0 Total 40.8 41.1 23.4 26.8 0.9 minutes. Hence, we conclude that the simulation provides a valid representation of the actual system. 7.2.1.2 Validating Model Assumptions We validated the use of lognormal procedure durations in a modied application of the correlated inspection approach. In this case, we again ran Markham's March 2008 schedule through the simulation, but we now used lognormally generated procedure durations and took urgent patients into consideration. We ran 30 replications of the simulation and obtained the overtime and undertime results shown in Table 7.3. For the most part, the historical results are well approximated by the simulation. The largest minute dierences are found in Dr. B's overtime data and Dr. C's undertime data, both of which are about 23 minutes less in the simulation than in the historical data. For Dr. C this can be partially explained by noticing that he/she was only assigned one block during March, 2008 and hence the historical data is only based on the calculated undertime for this single block. For Dr. B, the historical data show that he/she generally took longer to complete procedures than his/her mean procedure durations during March, 2008. Thus, since Dr. B's procedure durations are generated based on a lognormal distribution with this mean as a parameter in the simulation, we would expect that his/her overtime would be underestimated and undertime would be overestimated, as Table 7.3 shows.
Chapter 7. Validation 47 Table 7.3: Average overtime and undertime results by physician, lognormal procedure durations Overtime Undertime Endoscopist Simulation Historical Simulation Historical Dr. A 21.4 19.0 17.1 21.5 Dr. B 60.0 83.0 15.9 11.3 Dr. C 0.0 0.0 59.2 82.0 Dr. D 42.4 46.0 12.2 5.0 Dr. E 1.1 0.0 39.8 36.5 Dr. F 44.0 49.0 28.6 22.0 Total 37.8 41.1 26.5 26.8
Chapter 8 Sensitivity Analysis This chapter provides the results of a 2 3 factorial design to determine the eects of: (1) the frequency of urgent patient arrivals; (2) physician turnover; and (3) patient arrival time on the average daily overtime and undertime results of the simulation. 8.1 Factorial Design We chose to investigate the eects of these three factors due to their potential to signicantly increase overtime if set beyond a reasonable threshold. We were uncertain of appropriate values for these factors, as the rst two were estimated from Markham's procedure duration data and the third was set arbitrarily. Hence, we carried out a factorial design with eight design points each corresponding to a combination of high and low values of each factor. We chose the high and low values provided in Table 8.1. The lower bounds of factors (1) and (2) were set to zero, which implies that, on average, no urgent patients would arrive each day and physicians would not take any turnover time between procedures, respectively. Upper bounds of these two factors were set to ve, meaning that an average of ve urgent patients would arrive to the endoscopy suite each day and each physician would take ve minutes of turnover time after each procedure he/she performed. These upper bounds were chosen because, for factor (1), ve was signicantly 48
Chapter 8. Sensitivity Analysis 49 Table 8.1: High (+) and low (-) factor values Factor - + Urgents (1) 0 5 Turnover (2) 0 5 Arrival Time (3) -60-10 Table 8.2: Design matrix with overtime (OT) and undertime (UT) results Design Point Urgents (1) Turnover (2) Arrival Time (3) Avg Daily OT Avg Daily UT 1 - - - 1.3 100.4 2 + - - 2.4 93.0 3 - + - 10.8 36.1 4 + + - 19.4 30.3 5 - - + 2.2 40.5 6 + - + 4.3 32.1 7 - + + 11.6 23.4 8 + + + 24.3 14.0 more than the 1.5 estimated from Markham's data and, in the case of factor (2), a ve minute turnover time after each procedure was the maximum used by Denton in [12]. For patient arrival time (factor (3)), the lower bound was set such that patients would arrive 60 minutes before their procedures were scheduled to begin and the upper bound had them arrive 10 minutes early. Table 8.2 shows the design matrix and average daily overtime and undertime results (in minutes) from 30 replications of each design point. 8.2 Expected Eects We calculated the eects of each factor as well as interaction eects between factors for each replication of the simulation. From these results, we determined the average and variance of each eect and formed approximate 98.75% condence intervals (CI) for the expected eects using a t-distribution with n 1 degrees of freedom, as described by Law in [34]. We chose to form 98.75% condence intervals for each eect since, by Bonfer-
Chapter 8. Sensitivity Analysis 50 Table 8.3: 98.75% condence intervals (CI) for the expected eects of the factors on OT and UT Expected Eect 98.75% CI for OT 98.75% CI for UT E(e 1 ) 6.1 ± 1.6 7.8 ± 1.8 E(e 2 ) 14.0 ± 1.3 40.5 ± 1.0 E(e 3 ) 2.1 ± 0.8 37.4 ± 1.1 E(e 12 ) 4.5 ± 1.1 0.1 ± 1.0 E(e 13 ) 1.3 ± 0.8 1.2 ± 1.1 E(e 23 ) 0.7 ± 0.7 23.0 ± 1.0 E(e 123 ) 0.8 ± 0.8 0.6 ± 0.9 roni's inequality 1, this gives us at least 91.25% condence that each eect simultaneously falls within its calculated CI [34]. The condence intervals for the expected eects of each factor on OT and UT are provided in Table 8.3. An expected eect is considered signicant if its condence interval does not contain zero, as is the case for all except the last two listed eects on OT. In the case of UT, condence intervals for E(e 12 ), E(e 13 ), and E(e 123 ) all contain or nearly contain zero, so we have no statistical evidence that these eects are real. 8.2.1 Main Eects All of the main eects (e 1, e 2, e 3 ) are real since their condence intervals do not contain zero. These eects can be interpreted as the average change in daily OT or UT from moving each factor from its negative to positive level while holding all other factors constant [34]. For instance, in the case of OT, factor (1) would cause an average increase of 6.1 minutes when it moves from its low of zero to its high of ve. That is, we would expect an average of 6.1 additional OT minutes each day when there are an average of ve urgent patients arriving compared to when zero urgent patients arrive. We would additionally expect an average of 7.8 less minutes of undertime in this case. For each factor, an expected increase in OT is coupled with an expected decrease in UT. How- 1 P (e s ɛi s s = 1, 2,..., k) 1 k s=1 α s, where e s is the eect of which there are k and I s is a 100(1 α s ) percent CI for this eect [34]. In this case, α s = 1 0.9875 and k = 7.
Chapter 8. Sensitivity Analysis 51 ever, the expected changes are not proportional to each other. For instance, factor (3) is expected to increase OT by an average of 2.1 minutes each day, but to decrease UT by a much larger average of 37.4 minutes. This tells us that if patients arrive closer to their scheduled procedure start times (10 minutes before rather than 60 minutes before), undertime will be greatly reduced without a proportional increase in overtime. Logically, this makes sense because if patients are not arriving as early for their procedures, whenever a physician completes a procedure in 10 or more minutes less than the scheduled time, he/she will have to wait for the next patient to arrive. This, in turn, will prevent the block from nishing as early and make it more likely to nish late. 8.2.2 Two-Factor Interaction Eects In the case of UT, only one two-factor interaction eect was found to be signicant, e 23. An interaction plot for this eect is shown in graph A of Figure 8.1. The non-parallel lines on this graph indicate a signicant interaction between factors 2 and 3. This interaction eect means that the increase in undertime is larger when patients arrive 60 minutes before their procedures (factor 3 = -60) and physician turnover (factor 2) reduces from ve minutes to 0 minutes per procedure. Thus, if patients arrive earlier and physician turnover takes less time more undertime will occur on average. The overtime interaction between these factors is not signicant, as shown by the nearly parallel lines in graph B of Figure 8.1. The largest two-way interaction eect for OT occurs between factors 1 and 2, meaning that when there are ve minutes of physician turnover time (factor 2 = 5), there is a greater increase in average daily OT when the average number of urgent patient arrivals (factor 1) increases from zero to ve. That is, higher physician turnover coupled with more urgent patient arrivals leads to more overtime.
Chapter 8. Sensitivity Analysis 52 8.2.3 Summary of Eects Figure 8.1: Interaction plots for factors 2 and 3 Overall, the sensitivity analysis showed that all three factors we investigated: (1) the frequency of urgent patient arrivals; (2) physician turnover; and (3) patient arrival time have signicant eects on the average daily overtime and undertime results of the simulation. In addition, three signicant two-factor interactions exist. This means that the levels of all three factors are important when running simulation experiments. In the results section that follows, we set urgent patient arrivals to an average of 1.5 each day, our best estimate from Markham's 2008 procedure data. Since physician turnover had the largest eect on overtime and undertime out of all of the factors, we investigate results from three dierent levels of physician turnover, one based on Markham's data, one assuming no turnover occurs, and one in which we schedule ve minutes of additional procedure time to allow for turnover. Finally, we assume patients arrive approximately 40 minutes before their procedures are scheduled to begin. We choose 40 minutes because Markham tells its patients that their procedures begin one hour before they are actually scheduled in the endoscopy suite. In this way, patients generally arrive at least one hour before their procedures. Before arriving at the endoscopy suite, they must complete registration, for which we allow 20 minutes.
Chapter 9 Results This chapter describes the endoscopy suite of our case study site, Markham Stouville Hospital, and presents results from multiple scenarios that were run for this site. 9.1 Case Study: Markham Stouville Hospital We present results for Markham Stouville Hospital, a large, multi-site community hospital serving a catchment area of 300,000 people, and one of the CPIi sites [36]. Although Markham Stouville Hospital includes both the Markham and Uxbridge sites, we present results using data from the Markham site only. When this study began in 2008, Markham's endoscopy suite had two procedure rooms and six endoscopists, consisting of two gastroenterologists (GI) and four general surgeons (GS). 9.1.1 Block Schedule In 2008, Markham used a 2-room model, wherein one physician would move between two procedure rooms during his/her block time. Gastroenterologists were assigned to specic blocks each week, while each general surgeon was assigned to one or two of the ve blocks set aside for the four of them each week. The endoscopy suite ran two blocks 53
Chapter 9. Results 54 every week day, with the rst block starting at 08:00 and running until 11:30 and the second block starting at 12:30 and running until 16:00 every day except Wed. On Wed., the morning block started at 09:00 and ran until 12:00 and the afternoon block started at 13:00 and ran until 16:00. Friday blocks were not assigned to the same GI or to the GS group every week. That is, a specic GI may be assigned to the Friday morning block on the rst week of a month and one of the general surgeons may be assigned to this block every other week during the month. In addition to these blocks for scheduled patients, time was set aside for urgent patients during the gap between the morning and afternoon blocks each day as well as from 16:00 to 18:00 every day except Friday. 9.1.2 Procedure Durations 9.1.2.1 Scheduled and Average Durations Most procedures at Markham were scheduled for 20 minutes, independent of the physician performing them. However, ERCP procedures and Dr. D's colonoscopy + gastro procedures were scheduled for longer, as illustrated in the top table of Figure 9.1. The bottom table of this gure shows the average procedure times for each endoscopist at Markham, according to data from the 2008 scal year (Mar. 2008 to Mar. 2009). Not all endoscopists perform all procedure types, so some cells are left blank. The average duration is signicantly less than the scheduled duration for most of the gastro procedures, as well as for the ex sig procedures. It is also less for the colonoscopy procedures, but generally not for the colonoscopy + gastro procedures. This makes sense because Markham schedules colonoscopy and colonoscopy + gastro procedures for the same amount of time (except in the case of Dr. D) even though two procedures, a colonoscopy and a gastroscopy, need to be performed to complete a colonoscopy + gastro procedure. The procedure types included in Figure 9.1 are those that had more than 10 procedures completed during scal year 2008.
Chapter 9. Results 55 Figure 9.1: Scheduled (2) and average (3) procedure times for Markham
Chapter 9. Results 56 9.1.2.2 Minimum Durations The data from scal year 2008 included some unrealistic procedure durations, such as colonoscopy durations of one to ve minutes. Thus, to determine realistic minimum durations for each procedure, we asked Markham's endoscopists for estimates. Based on these estimates and considering the data, we set the minimum durations to values ranging from ve minutes for ex sig and gastro procedures to 15 minutes for ERCP procedures. For colonoscopy procedures, we further based the minimum duration on a literature review of colonoscopy standards, which found that colonoscopy withdrawal times should be at least six minutes [37]. Thus, we set the minimum colonoscopy duration to seven minutes to ensure procedures would always take longer than this regulated time in the simulation. The unrealistic procedure durations likely represent procedures that were started but could not be fully completed due to complications such as the patient not completing prep. Hence, these procedures could be modeled by adding a separate pathway to the simulation to account for incomplete procedures. Since these procedures represented only 2.5% of the total procedures performed at Markham in scal year 2008, we did not account for them in our endoscopy simulation. 9.1.3 Room Turnover Times Since Markham uses a 2-room model, room turnover times are unlikely to delay procedure start times in most cases. Despite this, room turnover is still included in the model and Markham schedules it for 10 minutes for all procedures except ERCP. The turnover time for ERCP procedures is 30 minutes. Based on historical data from March 2008, Markham's average turnover time was calculated as eight minutes by taking the dierence between when the next patient entered the procedure room and the current patient left it. This is the value that turnover is set to in the simulation model for all procedures
Chapter 9. Results 57 except ERCP. Due to a lack of turnover data on ERCP procedures, we model its turnover time as 30 minutes. 9.2 Scenario Testing Markham's data were input into the simulation data template to drive the endoscopy simulation model. Nine scenarios were run within each of four high level groups: (1) 2-room model without physician turnover; (2) 2-room model with physician turnover; (3) 2-room model with ve minutes scheduled for physician turnover; and (4) 1-room model without physician turnover. For the 1-room model we decided not to include physician turnover because room turnover is accounted for in scheduling each procedure, so the physician has this time to use in preparing for the next procedure. We ran three dierent high level groups of scenarios for the 2-room model to determine the signicance of physician turnover as well as the eect of scheduling additional procedure time to account for it. 9.2.1 Throughput Results Using the scheduler, we generated 10 schedules for each scenario and calculated the average daily scheduled patient throughput. To ensure the comparability of these schedules between scenarios, we used common random numbers (CRN) in generating them, assigning dierent random number streams to divide blocks among the general surgeons each week and to generate the procedure types for each endoscopist's wait list. This ensured that general surgeons were assigned to the same blocks and each endoscopist's wait list was populated in the same way for each scenario. Table 9.1 denes the types of scenarios for which schedules were generated and simulations were run. For instance, `75 Per' means procedures were scheduled according to the 75th percentile of procedure duration for each endoscopist and procedure and `R 75' means the 75th percentiles were rounded
Chapter 9. Results 58 Scenario Base Avg x Per R x Table 9.1: Scenario legend Description Hospital's current procedure durations Physician specic average durations for each procedure Physician specic x percentile of duration for each procedure x Per or Avg with each duration rounded up to the nearest ve minutes up to the nearest ve minutes. Although a throughput loss will result from rounding up to the nearest ve minutes, we decided to evaluate the impact of this scheduling method since it is used by Owen Sound Hospital. The procedure durations for each scenario were calculated using data from scal year 2008. The scenarios and their average daily throughputs, in order of smallest to largest, are provided in Table 9.2 for each high level scenario group. Groups (1) and (2) have the same scheduled throughput because no additional time is added to each procedure to account for physician turnover being modeled in group (2). When additional time is scheduled for physician turnover, as in group (3), patient throughput decreases because each procedure is alloted more time. In the 1-room model, group (4), room turnover is accounted for, which also allots more time to each procedure. However, this does not result in less throughput because two rooms are now operating in parallel. In fact, the results show that an average of seven more patients can be seen each day under a 1-room model, an approximately 33% increase in throughput over the higher throughput 2-room models. Figure 9.2 explains this result using the base case as an example. It shows that if a 2-room model is used, assuming procedures are scheduled for 20 minutes each, it would take 40 minutes for a physician to complete two procedures. However, in a 1-room model, two physicians are working in parallel, so each one would complete a procedure and the room would be ready for the next procedure in about 30 minutes. Hence, moving from a 2-room model to a 1-room model would allow 33% ( 40 /30) more procedures to be completed overall. However, each physician would be less productive and would be working more blocks of time since two physicians would need to be working during each
Chapter 9. Results 59 Table 9.2: Average daily throughput for each scenario (patients) High Level Group Base R 75 75 Per R 66 R Avg 66 Per R 50 Avg 50 Per (1), (2) 18.3 18.9 20.3 20.5 21.0 21.9 23.0 23.4 25.1 (3) 14.7 15.1 16.1 16.2 16.5 17.0 17.8 17.9 18.8 (4) 25.1 26.1 27.8 27.8 28.4 29.2 30.1 30.4 31.9 Figure 9.2: Throughput increase in 1-room model of the current blocks. If we consider the above analysis from the perspective of one physician, he/she could complete two procedures in 60 minutes under a 1-room model, whereas, in a 2-room model, this could be done in 40 minutes. Hence, the physician is 1.5 times more productive under a 2-room model. Thus, there is a trade o between achieving more throughput by using a 1-room model and enabling each physician to be as ecient as possible during each of his/her blocks by using a 2-room model. 9.2.2 Overtime and Undertime Results We ran 30 replications of each scenario in the endoscopy simulation model and calculated the average daily overtime (OT) and undertime (UT) for each. The results are plotted in Figure 9.3, with the scenarios arranged in order of increasing average daily throughput in each graph. The graphs are numbered according to the high level scenario groups that
Chapter 9. Results 60 they represent. The throughput line on each graph shows the increase in throughput of each scenario over the previous one. Error bars indicate one standard deviation above and below the mean for each scenario. In most cases, as throughput increases, overtime (blue) increases and undertime (red) decreases, as expected. In comparing scenarios with the base case, an improvement is achieved if all of the following three conditions are met: (1) throughput increases, (2) overtime decreases, and (3) undertime decreases. However, we must consider the relative levels and importance of these factors in determining an ideal scheduling method. 9.2.2.1 2-Room Models We used the same schedules for scenario pairs in high level scenarios (1) and (2). That is, we did not schedule additional time for endoscopist turnover, but instead added it as a delay in the simulation model. The result of this is that when physician turnover was included, much more overtime was incurred in each scenario, and hence the three improvement conditions were never achieved. When we did not include physician turnover, the R 75 scenario achieved all of the improvement conditions and hence we conclude that it is a more ecient way to schedule than Markham's current method. This does not, however, mean that it is an ideal way to schedule, as it still results in an average of 75 undertime minutes each day, which translates into nearly 3.5 lost procedures (using the weighted average procedure duration of 22 minutes). An `ideal' scheduling method is one that has a signicant decrease in UT over the preceding scenario without a large increase in OT. Additionally, the scenario should have a large throughput gain over the preceding one. Considering graph (1) in Figure 9.3, the 66 Per scenario satises all of these objectives. It shows a throughput gain of one patient over the previous scenario with a decrease in undertime of nearly 20 minutes and an overtime increase of only two minutes. Hence, if physician turnover could be adequately reduced, we would recommend this method of scheduling to Markham.
Chapter 9. Results 61 Figure 9.3: Overtime and undertime results from simulations of each high level group with throughput increases shown
Chapter 9. Results 62 High level group (3) takes physician turnover into account by scheduling ve extra minutes at the end of each procedure to account for it. Based on the graph of this group, either the 75 Per scenario or the 66 Per scenario would be most `ideal.' The choice depends on the relative costs of OT and UT to Markham. For instance, if UT was weighted more heavily than OT, the 66 Per scenario would prevail. This scenario reduces UT by enough to enable one additional procedure to be completed each day. However, it also increases OT by an average of close to ve minutes each day. Markham must decide whether it is worth the ve extra minutes of OT each day to complete one additional procedure. It should be noted that scheduling according to any scenario, other than 50 Per, in high level group (3) would result in less throughput than achieved in the base case of the other 2-room scenario groups. Hence, ve minutes is too much to schedule for physician turnover if an increase in throughput is to be achieved. 9.2.2.2 1-Room Model As a result of discussion in the literature comparing 1-room and 2-room models, we decided to see how Markham's OT and UT results would change under a 1-room model. We assumed that Markham's endoscopists would be willing to take on twice as many blocks each week and made block assignments for the second room by redistributing the GI block times and assigning the same set of blocks to the GS group. It is unlikely that all of the endoscopists would be willing or able to take on twice as many blocks, especially considering the results from Table 9.2 showing that only a 33% increase in daily throughput would be achieved if a 1-room model were used. In addition, this increase would not be achieved by each physician, but would be split between the two physicians working during each block. Hence, each physician would be spending twice as much time in the procedure room but not completing twice as many procedures. Despite this and considering graph (4) in Figure 9.3, we see that a 1-room model results in much less average daily overtime for all scenarios than any of the 2-room models. Thus, under
Chapter 9. Results 63 a 1-room model, Markham could ideally schedule according to the average scenario. Although the average scenario has a low throughput gain over the preceding scenario, it also has less overtime and undertime than this scenario, so is a better choice. Under the average scenario, an average of 30.4 patients could be seen each day, compared with only 22 in the 66 Per case of high level group (1). If we split these procedures evenly among the physicians working each day at Markham, we would have nearly eight procedures/physician in the 1-room case and 11 in the 2-room case. Hence, each physician would have to give up about three procedures/block to enable the hospital to see close to 8 additional patients each day under a 1-room model. 9.3 Summary of Results Overall, the results show that Markham can increase throughput by scheduling according to physician specic procedure durations in its endoscopy suite. The greatest throughput gain would be made by switching to a 1-room model, but this would lead to higher stang costs due to two physicians working during each block and would reduce endoscopist productivity.despite this, the 1-room model best meets our thesis objectives of increasing throughput while reducing undertime and only slightly increasing overtime. Hence, we recommend that Markham investigate scheduling according to average physician procedure durations under a 1:1 physician to room ratio.
Chapter 10 Conclusions This thesis detailed the development, validation, and results of an endoscopy model, the objective of which was to determine how scheduling according to physician specic procedure durations could help accommodate Ontario's increased demand for endoscopy procedures. The model, consisting of a scheduler and a generic discrete event simulation, showed relative changes in throughput, overtime, and undertime from implementing physician specic scheduling methods under both a 1-room and a 2-room model. The average daily overtime and undertime results of the 2-room model were found to be signicantly eected by three factors investigated in a sensitivity analysis. These factors were: (1) the frequency of urgent patient arrivals, (2) physician turnover times, and (3) how early patients arrived in advance of their procedures. The largest main eect was that of factor (2), which was found to cause an average increase of 14 minutes in overtime and an average decrease of 40 minutes in undertime when it was changed from a low value of 0 minutes to a high value of 5 minutes per procedure. Hence, we investigated three dierent methods of handling this factor when testing scenarios for Markham Stouville Hospital. Specic results were provided for Markham Stouville Hospital for 2-room scenarios with dierent levels and means of handling physician turnover as well as for 1-room 64
Chapter 10. Conclusions 65 scenarios. The scenarios included scheduling according to average, 50th percentile, 66th percentile, and 75th percentile procedure durations for each physician, as well as scheduling according to each of these durations rounded up to the nearest ve minutes. A comparison of the 1-room and 2-room model results showed that 33% more procedures could be completed if Markham switched to a 1-room model from its existing 2-room model. However, physicians were found to be 1.5 times more productive under a 2-room model. The 1-room scenarios did not consider physician turnover since room turnover was taken into account, and each resulted in less overtime and more throughput than its corresponding 2-room scenario without physician turnover. Hence, we recommended that Markham switch to a 1-room model and schedule according to average physician procedure durations. Since the endoscopy model dynamically generates simulation pathways based on the number of rooms and the physician to room ratio of the hospital being modeled, it can be applied to multiple hospital sites. The model's data templates are available online on CCO's website, so any interested hospital in Ontario can provide its data to be run through the endoscopy model. In this way, multiple sites can benet from the model and can determine how to increase their endoscopy throughput in order to meet the demands of the ColonCancerCheck program.
Chapter 11 Future Research Future research would involve extending the endoscopy model to gain additional insight into how physician specic scheduling inuences sta utilization in the suite. Firstly, the existing model should be applied to more hospital sites to ensure that its assumptions hold and improvements can be found for these sites as well. After successfully applying the model to at least three sites, additional results and modules could be added to it. For instance, it would likely be benecial to calculate procedure room and endoscopist utilization to see how these are impacted by the change in scheduling technique. In addition, hospitals may benet from explicitly modeling their endoscopy resources, including scopes, beds, and additional sta, such as nurses, technologists, and anesthetists. This would indicate whether any of these resources were being under- or over-utilized or creating bottlenecks in the suite. Modeling the sta responsible for procedure room turnover would further allow us to restrict the number of rooms undergoing turnover at a time. Additional considerations for the model would include adding some site-specic details to investigate specic questions, such as the impact of bed to chair recovery on recovery bay availability. The endoscopy model was designed based on data and observations from only six Ontario endoscopy suites, so may be limited in its applicability. Thus, future research 66
Chapter 11. Future Research 67 should also involve visiting additional endoscopy suites to gain further insight into how they operate. With this knowledge, advancements could be made to the model to enhance its exibility and applicability. For instance, other physician to room ratios than just the 1:1 and 1:2 ratios could be included. Based on feedback from the 2009 ORAHS conference, where we presented this thesis as a work in progress, other countries have similar endoscopy processes and could potentially benet from this research as well. Thus, future work would also involve teaming up with researchers in other countries, such as Dr. Brian Denton in the United States, to examine their endoscopy suites and to determine potential adjustments to the endoscopy model so it could benet them as well.
Bibliography [1] Cancer Care Ontario. ColonCancerCheck 2008 program report. http://www. cancercare.on.ca/colorectalscreening, 2010. [2] Cancer Care Ontario. Colorectal Cancer Screening (FOBT) Participation. http: //www.cancercare.on.ca/cms/one.aspx?pageid=41058, 2009. [3] V.S. Benson, J. Patnick, A.K. Davies, M.R. Nadel, R.A. Smith, and W.S. Atkin. Colorectal cancer screening: A comparison of 35 initiatives in 17 countries. International Journal of Cancer, 122(6):13571367, 2008. [4] L. Gibbons, C. Waters, Y. Mao, and L. Ellison. Trends in colorectal cancer incidence and mortality. Statistics Canada Health Reports, 12(2):4155, 2001. [5] Canadian Cancer Society, Statistics Canada, Provincial/Territorial Cancer Registries, and Public Health Agency of Canada. Canadian Cancer Statistics 2009. http://www.cancer.ca/canada-wide/about/%20cancer/cancer% 20statistics/Canadian%20Cancer%20Statistics.aspx?sc_lang=en, 2009. [6] L. Del Giudice and J. Meuser. Clinical Tool: Reference Card. http://health.gov. on.ca/en/ms/coloncancercheck/docs/ccc_refcard_20080606.pdf, 2008. [7] L. Del Giudice and J. Meuser. Clinical Tool: Screening Evidence Summary. http://health.gov.on.ca/en/ms/coloncancercheck/docs/ccc_foldout_ 20080606.pdf, 2008. 68
BIBLIOGRAPHY 69 [8] P.E. Joustra, J. de Wit, V.M.D. Struben, B.J.H. Overbeek, P. Fockens, and S.G. Elkhuizen. Reducing access times for an endoscopy department by an iterative combination of computer simulation and Linear Programming. Health Care Management Science, 13:1726, 2010. [9] National Digestive Diseases Information Clearinghouse. ERCP(Endoscopic Retrograde Cholangiopancreatography). http://digestive.niddk.nih.gov/ ddiseases/pubs/ercp/, Nov. 2004. [10] B. Berg, B. Denton, H. Nelson, H. Balasubramanian, A. Rahman, A. Bailey, and K. Lindor. A discrete event simulation model to evaluate operational performance of a colonoscopy suite. Unpublished, 2009. [11] S. Zamir and D.K. Rex. An initial investigation of eciency in endoscopy delivery. The American Journal of Gastroenterology, 97(8):19681972, 2002. [12] B. Denton, H. Nelson, B. Berg, H. Balasubramanian, A. Rahman, A. Bailey, and K. Lindor. A computer simulation model to evaluate operational performance of a colonoscopy suite. Unpublished, 16 Dec. 2007. [13] E. Yong, O. Zenkova, F. Saibil, L.B. Cohen, K. Rhodes, and L. Rabeneck. Eciency of an endoscopy suite in a teaching hospital: delays, prolonged procedures, and hospital waiting times. Gastrointestinal Endoscopy, 64(5):760764, 2006. [14] D.K. Rex, B.J. Lahue, R.W. Dronzek, and M.J. Lacey. Impact of two procedure rooms per physician on productivity: Computer simulation examines the impact of process change in the hospital gastroenterology department [abstract]. Gastrointestinal Endoscopy, 61(5):AB154, 2005. [15] B. T. Denton, A.S. Rahman, H. Nelson, and A.C. Bailey. Simulation of a multiple operating room surgical suite. In L.F. Perrone, F.P. Wieland, J. Liu, B.G. Lawson,
BIBLIOGRAPHY 70 D.M. Nicol, and R.M. Fujimoto, editors, Proceedings of the 2006 Winter Simulation Conference, 2006. [16] P. Grossman, B.J. Lahue, R. Dronzek, and M.J. Lacey. Where are ambulatory surgery center (ASC) bottlenecks? Use of computer simulation modeling to evaluate eciency targets [abstract]. Gastrointestinal Endoscopy, 61(5):AB150, 2005. [17] S.H. Jacobson, S.N. Hall, and J.R. Swisher. Discrete-event simulation of health care systems. In R.W. Hall, editor, Patient Flow: Reducing Delay in Healthcare Delivery. Springer, Los Angeles, 2006. pp. 211252. [18] J.B. Jun, S.H Jacobson, and J.R. Swisher. Application of discrete-event simulation in health care clinics: A survey. Journal of the Operational Research Society, 50:109 123, 1999. [19] F. Loeve, R. Boer, G.V. van Oortmarssen, M. van Ballegooijen, and J.D.F Habbema. The miscan-colon simulation model for the evaluation of colorectal cancer screening. Computers and Biomedical Research, 32(1):1333, 1999. [20] S. Roberts, L. Wang, R. Klein, R. Ness, and R. Dittus. Development of a simulation model of colorectal cancer. ACM Transactions on Modeling and Computer Simulation, 18(1), Dec. 2007. Article 4. [21] A. Fletcher and D. Worthington. What is a `generic' hospital model?, 2007. Retrieved June 20, 2008 from http://www.lums.lancs.ac.uk/publications/ viewpdf/004583/. [22] D. Sinreich and Y.N. Marmor. A simple and intuitive simulation tool for analyzing emergency department operations. In R.G. Ingalls, M.D. Rossetti, J.S. Smith, and B.A. Peters, editors, Proceedings of the 2004 Winter Simulation Conference. pp. 19942002, 2004.
BIBLIOGRAPHY 71 [23] S.P. Sangster and J.T. Blake. Developing a reusable simulation model to improve access to diagnostic imaging clinics in Nova Scotia. In Proceedings of the 2008 Spring Simulation Multiconference. pp. 539544, 2008. [24] A.M. Hay, E.C. Valentin, and R.A. Bijlsma. Modeling emergency care in hospitals: A paradox The patient should not drive the process. In L.F. Perrone, F.P. Wieland, J. Liu, B.G. Lawson, D.M. Nicol, and R.M. Fujimoto, editors, Proceedings of the 2006 Winter Simulation Conference. pp. 439445, 2006. [25] G.T. Mackulak, F.P. Lawrence, and T. Colvin. Eective simulation model reuse: A case study for AMHS modeling. In D.J. Medeiros, E.F. Watson, J.S. Carson, and M.S. Manivannan, editors, Proceedings of the 1998 Winter Simulation Conference. pp. 979984, 1998. [26] M.J. Steele, M. Mollaghasemi, G. Rabadi, and G. Cates. Generic simulation models of reusable launch vehicles. In E. Yücesan, C.-H. Chen, J.L. Snowdon, and J.M. Charnes, editors, Proceedings of the 2002 Winter Simulation Conference. pp. 747 753, 2002. [27] A. Verbraeck and E. Valentin. Simulation building blocks for airport terminal modeling. In E. Yücesan, C.-H. Chen, J.L. Snowdon, and J.M. Charnes, editors, Proceedings of the 2002 Winter Simulation Conference. pp. 11991206, 2002. [28] F. Dexter, R.D. Traub, and F. Qian. Comparison of statistical methods to predict the time to complete a series of surgical cases. Journal of Clinical Monitoring and Computing, 15:4551, 1999. [29] W.M. Hancock, P.F. Walter, R.A. More, and N.D. Glick. Operating room scheduling data base analysis for scheduling. Journal of Medical Systems, 12(6):397409, 1988. [30] J.H. May, D.P. Strum, and L.G. Vargas. Fitting the lognormal distribution to surgical procedure times. Decision Sciences, 31(1):129148, 2000.
BIBLIOGRAPHY 72 [31] D.J. Robb and E.A. Silver. Scheduling in a management context: Uncertain processing times and non-regular performance measures. Decision Sciences, 24(6):1085 1106, 1996. [32] D.P. Strum, J.H. May, A.R. Sampson, L.G. Vargas, and W.E. Spangler. Estimating times of surgeries with two component procedures. Anesthesiology, 98:232240, 2003. [33] R. Alvarez, G.A. Sandoval, M. Carter, and S. Brown. Allocating surgeries to a block time: a heuristic method to estimate the probability distribution of the total schedule duration by summing random surgical times. In Proceedings of the XXXIV Operations Research Applied to Health Services (ORAHS) Conference, 2009. [34] Averill M. Law. Simulation Modeling & Analysis. McGraw-Hill, Toronto, 4th edition, 2007. [35] Caron Anderson. Personal communication, April 2010. [36] Markham Stouville Hospital. About us: Marham Stouville Hospital Corporation. http://www.msh.on.ca/about_us, 2007. [37] L. Rabeneck, R.B. Rumble, and Axler J. et al. Cancer Care Ontario colonoscopy standards: Standards and evidentiary base. Canadian Journal of Gastroenterology, 21 (Suppl D):5D24D, 2007. [38] Chris Withers and John Machin. Working with Excel les in Python. http://www. python-excel.org/. EuroPython 2009, Birmingham, 2009.
Appendix A Generalized Process Maps for Ontario Endoscopy Suites A.1 Process Map Symbols Key The symbols shown in Figure A.1 are used to represent steps that occur throughout the patient endoscopy process. A.2 Process Maps Figures A.2 to A.6 show the process maps for each high-level endoscopy process. 73
Appendix A. Generalized Process Maps for Ontario Endoscopy Suites 74 Figure A.1: Process mapping symbols legend
Appendix A. Generalized Process Maps for Ontario Endoscopy Suites 75 Figure A.2: Process map for referral/booking
Appendix A. Generalized Process Maps for Ontario Endoscopy Suites 76 Figure A.3: Process map for registration * SARS information is collected due to the SARS (Sudden Acute Respiratory Syndrome) outbreak of 2003 and includes such things as tracking which hospitals patients have been to within the past year. ARO stands for Antibiotic Resistant Organisms.
Appendix A. Generalized Process Maps for Ontario Endoscopy Suites 77 Figure A.4: Process map for admission
Appendix A. Generalized Process Maps for Ontario Endoscopy Suites 78 Figure A.5: Process map for procedure
Appendix A. Generalized Process Maps for Ontario Endoscopy Suites 79 Figure A.6: Process map for recovery
Appendix B Simulation Data Templates The simulation data templates are shown in Figures B.1 to B.9. These templates, to be lled out by endoscopy personnel, contain the input data necessary to drive the endoscopy simulation model. They are also available online at www.cancercare.on.ca/ cpitoolkit. In Appendix C, each worksheet is referenced by the letter in parentheses following its name. 80
Appendix B. Simulation Data Templates 81 Figure B.1: Scheduling worksheet (a)
Appendix B. Simulation Data Templates 82 Figure B.2: Endoscopist1 worksheet (b)
Appendix B. Simulation Data Templates 83 Figure B.3: Endoscopist2 worksheet (c)
Appendix B. Simulation Data Templates 84 Figure B.4: Endoscopist3 worksheet (top portion) (d.1 and d.2)
Appendix B. Simulation Data Templates 85 Figure B.5: Endoscopist3 worksheet (middle portion) (d.3, d.4, and d.5)
Appendix B. Simulation Data Templates 86 Figure B.6: Endoscopist3 worksheet (bottom portion) (d.6 and d.7)
Appendix B. Simulation Data Templates 87 Figure B.7: Procedure data worksheet (e)
Appendix B. Simulation Data Templates 88 Figure B.8: Turnover worksheet (f)
Appendix B. Simulation Data Templates 89 Figure B.9: Calculated worksheet (g)
Appendix C Technical Documentation This appendix provides technical details on the data parser, the scheduler, and the simulation. C.1 Parsing the Data Data from the Excel simulation data templates are parsed to format them for direct assignment to the objects in the scheduler using the python-excel package [38]. The data parser consists of a single class (ExcelParser) with three functions. The rst function ( init ) opens the simulation data template and nds the Scheduling (a), Endoscopist2 (c), Endoscopist3 (d), and Turnover (f) worksheets. This function also creates lists and dictionaries to be used for storing the data once it has been read. In the second function (private_read), the data are read from the Excel worksheets and checks are performed to ensure that these data are formatted correctly. Finally, the third function (parse) organizes the data into lists or dictionaries to be assigned to Endoscopists, Turnover, and BlockTime objects in the scheduler. 90
Appendix C. Technical Documentation 91 C.1.1 Data Checks Since the data are entered into the simulation data template manually, they may not be formatted correctly. Although the accuracy of the inputs can be checked by visually scanning the completed template, it is also important for the parser to ensure that the data it is parsing make sense and are correctly formatted. Table C.1 shows the checks that the parser performs on each listed data item. C.1.1.1 Assumptions Although a number of data format checks are performed, some assumptions still need to be made in parsing the data. We make one assumption about the layout of the data tables, which will hold as long as the user does not change the position of the charts in a worksheet. This assumption is that the row and column location of the rst endoscopist's name in worksheet (c) is the same as that in worksheet(d.1). That is, both of these values are found in column C, row 10. We also assume that the procedure names in the turnover charts in worksheet (f) are in the same order as in each procedure data chart in worksheet (d). Finally, if a procedure name is listed more than once in worksheet (f), we use the turnover value from the rst time it is listed. C.1.2 Data Format The data output from the parser consists of a dictionary containing three main elements: EndoData, Blocks, and TurnoverType. The EndoData is a list of dictionaries of data to be assigned to Endoscopist objects in the scheduler. A dictionary uses key values to index data, such as {name: Dr. A}, whereas lists are simply the data values in square brackets, separated by commas, such as [Mon, 7:30, 12:30]. Using these constructs, the EndoData is formatted as shown at the top of Figure C.1, using data for a physician named Dr. A as an example. In this diagram, the lists of numbers following each procedure key are in the order of the charts in worksheet (d) of the simulation data template. That is, using
Appendix C. Technical Documentation 92 Table C.1: Parser input data and checks performed Input Data Item Checks Performed (worksheet.chart) Number of Rooms (a) Z + Day (b) rst two characters correspond to rst two characters of a valid day name (e.g., MO, TU) Block Start and Block End (b) Block End > Block Start and each are time values Room (b) Z +, 0 < Room Number of Rooms weeks/month (b) empty or 0-4 Endoscopist Type (c) GI or GS Wait List Length in Days (c) Z + Wait List Characteristic (c) shrinking, growing, or same Procedure Names (d.1) unique, not empty, do not include the entry asking users to enter additional procedure names (`Other (list as needed)') Endoscopist Names (d.1) unique, not empty, do not include the example name provided (`Example: Dr. Smith') Cases Performed (d.1) empty or Z + Scheduled Procedure Durations empty or mint ime and Z (d.2) Mean Procedure Durations (d.3) empty or mint ime and R Standard Deviation of Procedure empty or 0 and R Durations (d.4) Minimum Procedure Durations empty or Z + (mint ime) (d.5) Time Between Procedures (d.6) empty or Z + Physician-specic Procedure empty or mint ime and Z Durations (d.7) Turnover Times (f) 0, R, not empty, same number of turnover times as procedure names
Appendix C. Technical Documentation 93 Figure C.1: Parser output data gastro procedures as an example, Dr. A performed 275 gastro procedures, which were each scheduled for 20 minutes. His/her average procedure duration was 11 minutes with a standard deviation of 5 minutes and the minimum time to perform these procedures was 5 minutes. On average, Dr. A's time between gastro procedures was 8 minutes, and his/her gastro procedures were scheduled for 11 minutes using physician specic durations. The block start and end times are formatted as datetime.time(hour,minute) values. The `u' characters that appear before values in the output indicate that these values are unicode objects, the standard for text representation. The Blocks dictionary is shown in the middle of Figure C.1 and contains a list of lists of block times that are not assigned to a specic endoscopist. For this example, blocks assigned to general surgeons (GS) and urgent blocks are recorded here. The data listed for each block are the day, block start, block end, room, and number of weeks/month each block time applies. Finally, TurnoverType is a dictionary containing the scheduled and calculated (average) turnover times for each procedure.
Appendix C. Technical Documentation 94 Algorithm C.1 Choosing the procedure type ptt ype Uniform(0, 1) cumcasemix 0 for i = 1 to len(casemix) do cumcasemix cumcasemix + casemix[i] if ptt ype < cumcasemix then W L proc[i] break end if end for C.2 The Scheduler C.2.1 Generating the Procedure Type The type of procedure is chosen using Algorithm C.1, whereby a random number ( ptt ype) is generated between 0 and 1 and the procedure (proc[i]) is added to the wait list (W L) if this number is less than the cumulative casemix value. C.2.2 Class Design The scheduler generates objects from the parsed data, with EndoData list elements being used to create Endoscopist objects, Blocks dictionary entries populating BlockTime objects, and TurnoverType dictionary entries generating Turnover objects. Figure C.2 illustrates the scheduler classes and their associations. The Endoscopist class is the primary class, as it is associated with or uses data from all other classes. C.2.3 The Endoscopist Class Each endoscopist who regularly performs endoscopy procedures at a hospital site is represented by an Endoscopist object. As such, this object contains attributes that identify and are associated with these physicians, including their names, types (GI or GS), block times assigned to them, procedure data (cases performed, times), a wait list (WL) of patients who require procedures, the current schedule of procedures they will be performing,
Appendix C. Technical Documentation 95 Figure C.2: Scheduler class interactions their case mix, and the room turnover times for each procedure. While the name, type, and procedure elements are assigned to each endoscopist from the parsed data, the other elements need to be calculated and assigned, as described in Chapter 5. C.3 The Generic Discrete Event Simulation C.3.1 Scheduled Patient Arrivals Scheduled patients arrive according to the time between procedures data from the schedule. The rst patient in a block arrives right at the start of the block to enable it to start on time and to prevent it from starting early. (We actually subtract 0.1 minutes from this patient's arrival time to ensure he/she is served before urgent patients). Subsequent patients are initially set to arrive 40 minutes before their scheduled procedure times. However, we also ensure that patients arrive according to their scheduled order, so if there are not 40 minutes between the start time for the rst patient and that for the second patient of the block, we have the second patient arrive 0.1 minutes after the rst. We continue to do this until patient arrivals are oset by a total of 40 minutes. This procedure is illustrated by the portion of a schedule shown in Table C.2. At the start
Appendix C. Technical Documentation 96 Table C.2: Calculating time between arrivals Week Day Block Block Procedure Time Btw Calculation Arrival Time Start End Start Procedures 0 Mon 08:00 11:30 08:00 480 480-0.1 07:59:54 08:20 20 20-40 *08:00:00 08:40 20 20-20 *08:00:06 09:00 20 20-0.1 **08:20 09:20 20 08:40 09:40 20 09:00 10:00 20 09:20 10:20 20 09:40 10:40 20 10:00 11:00 20 10:20 0 Mon 12:30 16:00 12:30 90 90+40-0.1 12:29:54 * Just add 0.1 minutes (6 seconds) to the previous arrival time since the calculation gives a value 0. ** Oset by 0.1 so resulting arrival time is exactly 40 minutes less than procedure start time. of the second block, we add 40 minutes back onto the time between procedures value to ensure the rst patient once again arrives at the start time of the block. It should be noted that the time between patient arrivals can never be set to zero.
Appendix D Scheduler Output This appendix shows an example of the scheduler output data in Figure D.1, where the time between procedures (column F) and columns I through M are in minutes. 97
Appendix D. Scheduler Output 98 Figure D.1: Scheduler output