You are on page 1of 23

Health Care Management Science (2021) 24:460–481

https://doi.org/10.1007/s10729-020-09527-z

Stochastic programming for outpatient scheduling with flexible


inpatient exam accommodation
Yifei Sun 1 & Usha Nandini Raghavan 2 & Vikrant Vaze 1 & Christopher S Hall 2 & Patricia Doyle 3 &
Stacey Sullivan Richard 3 & Christoph Wald 3

Received: 10 September 2019 / Accepted: 21 October 2020 / Published online: 4 January 2021
# Springer Science+Business Media, LLC, part of Springer Nature 2021

Abstract
This study is concerned with the determination of an optimal appointment schedule in an outpatient-inpatient hospital system
where the inpatient exams can be cancelled based on certain rules while the outpatient exams cannot be cancelled. Stochastic
programming models were formulated and solved to tackle the stochasticity in the procedure durations and patient arrival
patterns. The first model, a two-stage stochastic programming model, is formulated to optimize the slot size. The second model
further optimizes the inpatient block (IPB) placement and slot size simultaneously. A computational method is developed to solve
the second optimization problem. A case study is conducted using the data from Magnetic Resonance Imaging (MRI) centers of
Lahey Hospital and Medical Center (LHMC). The current schedule and the schedules obtained from the optimization models are
evaluated and compared using simulation based on FlexSim Healthcare. Results indicate that the overall weighted cost can be
reduced by 11.6% by optimizing the slot size and can be further reduced by an additional 12.6% by optimizing slot size and IPB
placement simultaneously. Three commonly used sequencing rules (IPBEG, OPBEG, and a variant of ALTER rule) were also
evaluated. The results showed that when optimization tools are not available, ALTER variant which evenly distributes the IPBs
across the day has the best performance. Sensitivity analysis of weights for patient waiting time, machine idle time and exam
cancellations further supports the superiority of ALTER variant sequencing rules compared to the other sequencing methods. A
Pareto frontier was also developed and presented between patient waiting time and machine idle time to enable medical centers
with different priorities to obtain solutions that accurately reflect their respective optimal tradeoffs. An extended optimization
model was also developed to incorporate the emergency patient arrivals. The optimal schedules from the extended model show
only minor differences compared to those from the original model, thus proving the robustness of the scheduling solutions
obtained from our optimal models against the impacts of emergency patient arrivals.

Highlights
& Timestamped operational data was analyzed to identify sources of uncertainty and delays.
& Stochastic programming models were developed to opti-
mize slot size and inpatient block placement.
& A case study showed that the optimized schedules can
reduce overall costs by 23%.
& Distributing inpatient and outpatient slots evenly through-
out the day provides the best performance.
& A Pareto frontier was developed to allow practitioners to
choose their own best tradeoffs between multiple objectives.

Keywords Outpatient scheduling . Stochastic programming . Discrete-event simulation . Inpatient exam cancellation .
Appointment scheduling/sequencing . Operations research

* Yifei Sun 2
Philips Healthcare, Cambridge, MA, USA
yifei.sun.th@dartmouth.edu 3
Lahey Hospital and Medical Center, Burlington, MA, USA

1
Thayer School of Engineering, Dartmouth College, College, 14
Engineering Dr, Hanover, NH 03755, USA
Stochastic programming for outpatient scheduling with flexible inpatient exam accommodation 461

1 Introduction one of the following two categories: (a) standard outpatient


slots (green colored slots in Fig. 1) which are available for
Hospitals in the US are continually trying to find more effi- scheduling outpatients in advance, and (b) inpatient blocks
cient ways to manage their resources and improve workflows (IPBs) (red colored slots in Fig. 1 that are not open for
in an effort to control costs while maintaining or expanding advanced scheduling). IPBs serve multiple functions. First,
patient access to care. One main factor that impacts workflow they can accommodate STAT inpatient exam requests (de-
efficiency is patient scheduling. Patient scheduling involves fined as requests for inpatients that need immediate attention)
determination of the start time (appointment time), duration, and emergency room patients, i.e. patients that must be seen
end time, and resources required to provide services to pa- on a short notice due to medical emergencies. Second, based
tients [1]. Existing studies have shown that long waiting times on availability, they can be used to accommodate non-
caused by, among other factors, poor scheduling and execu- emergency inpatients as per the requests from radiologists
tion is a “constant and significant” contributing factor to pa- and/or the referring physician base. Finally, they can be used
tient dissatisfaction [18, 28, 32]. Patient scheduling is compli- as time buffers if previous exams are running late; in such
cated because of the variability in procedure durations, patient cases the inpatient exam in such a slot will be postponed to
arrival patterns, patient preferences for appointment times, the night shift and the exam for the next regularly scheduled
availability of resources, variability in exam lengths based patient will be performed instead. This flexible use of IPBs,
on patient-related factors, and the presence of cancellations common at many outpatient-inpatient hospital systems such
and no-shows. as LHMC, while beneficial in practice, introduces a signifi-
Our work presented in this paper is motivated by the need cant amount of complexity in patient scheduling optimization.
to address the real-world problem of long patient waiting In Sect. 5, we will take into account only the second and third
times observed in the outpatient-inpatient hospital systems, above-mentioned functions of IPBs and disregard STAT in-
such as the MRI (Magnetic Resonance Imaging) centers of patient requests and emergency patients because they are only
Lahey Hospital and Medical Center (LHMC). LHMC is a a small fraction of all the patients whose exams are performed
mid-sized, tertiary care hospital of an Integrated Care in this modality. Then, in Sect. 9, we extend our optimization
Delivery Network (IDN) located in Burlington, MA. On a models to additionally incorporate emergency patient arrivals.
typical weekday, outpatients wait an average of 54 min from This paper focuses on the scenario of a hospital-based MRI
arrival at the facility to the beginning of their exam. One factor department providing services to both inpatients and outpa-
complicating the scheduling problem is that the procedure tients as opposed to an independent testing facility focused
durations and the patient arrival patterns both have a consid- solely on outpatient services. This paper outlines an end-to-
erable degree of uncertainty. Another complicating factor is end process of resolving real-world healthcare operations
that the hospital appointment system consolidates multiple workflow challenges associated with such hospital-based
classes of patients (namely, inpatients, outpatients, and emer- MRI departments, ranging from data analysis, identification
gency patients), each with their own specific clinical require- of the most relevant decision variables and sources of uncer-
ments given their different levels of acuity. Figure 1 is an tainty, development of a sophisticated optimization approach,
example of the patient scheduling system currently followed to demonstration of the superiority of the optimization solu-
at LHMC. Patients are scheduled in advance at equally spaced tion via a simulation-based evaluation. Finally, we present a
time intervals referred to as slots. The slot size, i.e. the sched- real-world implementation of some of the recommendations
uled appointment duration, is pre-set at either 45 min or emerging from this analysis. Specifically, we first provide a
60 min. When a patient is scheduled for an MRI procedure, thorough analysis of the causes of long patient waiting times
they are given an appointment time and are asked to arrive by analyzing patient arrival patterns and procedure durations.
30 min in advance of that time to ensure sufficient time for We find that, while the early arrivals of patients do contribute
MRI safety screening and procedure preparation. The differ- to long patient waiting times, the sub-optimal slot sizes are
ent colors in Fig. 1 represent slots that are used to schedule shown to further increase the waiting times significantly.
patients of different classes. Most inpatients are scheduled Secondly, we develop a stochastic programming model to
between 12am and 6am (i.e., during the 6-h night shift), and build a patient scheduling template, such as the one shown
all outpatients are scheduled between 6am and 12am (i.e., in Fig. 1, which allows flexibility to accommodate inpatients
during the 18-h day shift). Day shift appointments fall under by adjusting slot sizes and the placement of IPBs. Inpatient

Fig. 1 Current patient appointment schedule for one MRI machine with a 60-min slot size. The red slots represent the IPBs, while the green ones are the
outpatient slots
462 Sun Y. et al.

exam accommodations in this approach are rule-based: the and solve the scheduling problem. We then evaluate the opti-
day shift exam will be rescheduled to the night shift if, during mization results using a simulation software called FlexSim
the day shift, the start time of the inpatient exam is behind Healthcare [29], to demonstrate the effectiveness of the
schedule by a certain threshold amount of time. When focus- schedules generated by our optimization approach. The sim-
ing only on the day shift, this flexible rescheduling of inpatient ulation approach allows modeling of several additional real-
exams from day shift to night shift amounts to simply a can- world complexities that are difficult to incorporate in the sto-
cellation. This is a common practice used by radiology depart- chastic programming formulation, thus allowing a more com-
ments, such as the one at LHMC, with a combined inpatient/ prehensive and independent evaluation of our optimization
outpatient patient base, resulting in greater scheduling flexi- approach and its underlying assumptions.
bility. In this paper, we do not attempt to modify this practice; A majority of the previous literature on outpatient schedul-
instead, we optimize the patient scheduling template given a ing has focused on only one class of patients (namely outpa-
predefined inpatient exam “cancellation” rule. tients) while some of the more recent literature has analyzed
Our focus is on optimizing the appointment schedule by the impact of interruptions on outpatient scheduling due to the
explicitly accounting for such flexible inpatient cancellation emergency patients. To the best of our knowledge, no research
practices. The goal is the minimization of the total cost of study in the existing operations research literature to date has
outpatient waiting time, radiology equipment idle time, day explored optimal outpatient scheduling with flexible
shift staff overtime, and the number of inpatient exam cancel- cancellation/accommodation of inpatient exams. Among the
lations during the day shift. The waiting time in this cost previous studies that took into consideration different patient
function is restricted to only one class of patients, namely classes, many used rule-based and heuristic-based approaches,
outpatients. This is because, outpatients are the only ones which were evaluated using simulation. In this paper, we use
who are given an appointment in advance and it comes with stochastic programming to handle uncertainty in patient arriv-
an implicit guarantee of providing “timely” service, which is al patterns and exam durations, and evaluate the results using a
strongly linked to patient satisfaction. Inpatients, on the other simulation.
hand, are already physically present in the hospital so that they The rest of this paper is organized as follows: Sect. 2 re-
can be held in their rooms before the exam starts. views the relevant literature on patient scheduling and iden-
Inpatient accommodation, such as the one done at LHMC, tifies the contributions of this paper to the healthcare schedul-
is a common practice in many hospitals. According to market ing literature. Section 3 provides an overview of the typical
research report by IMV Medical Information Division [11], baseline MRI workflow motivating this research. Section 4
17.7 million MRI procedures were performed in hospitals in presents a brief analysis of the hospital workflow data.
the US in 2017, as opposed to 18 million performed in non- Section 5 presents the two optimization models. Section 6
hospital facilities. With such a high proportion of MRI proce- presents the corresponding solutions and results. Section 7
dures done in hospitals, they typically engage in strategies that provides comparisons with simpler heuristic-based sequenc-
can accommodate a mix of outpatients and inpatients. In par- ing approaches to deal with situations in which sophisticated
ticular, mid-sized hospitals commonly use an inpatient accom- optimization tools are not available for optimizing IPB place-
modation strategy, such as the one at LHMC, at some or all of ment decisions. Section 8 presents a sensitivity analysis of
their MRI machines. weights for outpatient waiting time, machine idle time, and
There are two major types of decisions to be made when the number of exam cancellations, as well as the Pareto
developing the optimal outpatient scheduling template, while Frontier between patient waiting time and machine idle time,
explicitly accounting for the policy of flexible inpatient exam in order to generalize our conclusions to decision-makers with
cancellations. First and foremost, the size of each exam slot different priorities. Section 9 extends the optimization model
needs to be decided. The second decision is related to the in Sect. 5 to additionally incorporate emergency patient ar-
placement of the inpatient blocks (IPBs) within the scheduling rivals and demonstrates the robustness of our main findings
template. From a practitioner’s standpoint, the slot size deci- to the different ways of capturing the effects of the extra un-
sions are the relatively easier ones to modify. Therefore, in our certainty added by the emergency patient arrivals. Section 10
Model 1, we focus on the problem of optimizing the slot sizes concludes the paper.
while holding the IPB placement unchanged. Then, in our
Model 2, we expand the problem scope by simultaneously
optimizing both decisions. In both models, we explicitly ac- 2 Literature review
count for the complexities introduced by the practice of flex-
ible inpatient exam cancellation. There is a substantial body of literature on outpatient sched-
To ensure the robustness of the schedule in the face of the uling under uncertainty. Queuing theory, stochastic program-
stochasticity in the procedure durations and patient arrival ming, and simulation are the most commonly used methodol-
patterns, we use a stochastic programming approach to model ogies. Early research studies used the analytical methods in
Stochastic programming for outpatient scheduling with flexible inpatient exam accommodation 463

queuing theory, assuming procedure durations to be exponen- the optimal booking, sequencing, and scheduling decisions
tial or normally distributed, and concluded that the optimal were made iteratively considering patient no-shows and ran-
schedule is “dome-shaped” ([17, 27, 31, 33]). However, the dom procedure durations. Methodologically, a widely
limitations on the choice of distributions negatively impact the adopted method to solve stochastic programming formula-
reliability and generalizability of the results. In the past few tions is sample average approximation (SAA) [1, 19], applied
decades, discrete event simulation methods have been widely by Begen et al. [3], Ge et al. [13], and Mancilla and Storer
used in the context of patient scheduling under uncertainty [26]. All these studies focused only on outpatients while
using mature simulation software like FlexSim and Arena sometimes adding extensions like patient no-shows, cancella-
([15, 16, [20–22]). Compared to the queuing theoretic tions, and interruptions. The impact of inpatient procedures is
methods, simulation methods require fewer restrictions on not well-studied, and the integration of flexible inpatient
the distributions of procedure durations and patient arrival scheduling and outpatient scheduling has not been achieved
patterns, and hence are able to better approximate reality. in the current literature. Bridging this gap is an important
However, due to its inability to find optimal solutions, the role contribution of our paper to the healthcare scheduling
of the simulation software has mostly been confined to eval- literature.
uating the results of different appointment and sequencing The literature focusing on multi-class patient scheduling
rules. typically uses simulation to evaluate different scheduling
The stochastic programming method is widely used to and sequencing rules. Cayirli et al. [7] compare the impact
tackle the randomness in procedure durations and patient ar- of patient classification on appointment scheduling by com-
rival patterns. It provides a framework for modeling optimi- paring the results of applying patient classification only to
zation problems under uncertainty. In the first stage of such patient sequencing and to both patient sequencing and sched-
problems, scheduling decisions must be made before the uling interval adjustment. Similarly, Bhattacharjee and Ray
values of uncertain variables are realized. In single-stage sto- [5] evaluate the combination of different sequencing rules
chastic programming, the expected costs of first-stage deci- (e.g., IPBEG: scheduling all inpatients before outpatients,
sions are directly minimized across second-stage uncertainty OPBEG: scheduling all outpatients before inpatients) and
scenarios. In contrast, two-stage stochastic programming ad- scheduling rules (e.g., IBFI: scheduling one patient in each
ditionally includes second stage decisions (known as re- fixed-length block, 2BEG: scheduling two patients in the first
course), which are made after the uncertainty realization. block, but one each in the others). They also conducted a case
Two-stage stochastic linear programming is commonly used study for MRI scanning rooms in a multi-specialty hospital in
in patient scheduling problems where the uncertain second- India using simulation. Patrick and Puterman [30] categorized
stage values only become known after the first-stage variables patients into high-priority inpatients and low-priority outpa-
are decided. tients. They assumed that there is a pool of on-call outpatients
Single-stage stochastic programming is used by Begen and and non-emergency inpatients who can be moved to the next
Queyranne [2] to make appointment scheduling decisions day. However, their methods and findings aren’t applicable in
without recourse. Two-stage stochastic programming has our setting, because outpatients in our case are scheduled
been used to formulate the appointment scheduling problem, ahead of time and once their schedule is set, it is relatively
with appointment time decisions as the first-stage variables, inflexible without incurring significant patient dissatisfaction.
and patient waiting times and operating room idle times as the Additionally, from a methodological standpoint, these studies
second-stage variables. Denton and Gupta [9] developed a used simulation to evaluate the scheduling and sequencing
two-stage stochastic linear program assuming continuous pro- rules, whose results may not be optimal.
cedure durations and a pre-determined appointment sequence. In recent literature, simulation-based optimization methods
Their stochastic programming framework minimized the have provided promising results. While simulation allows ac-
weighted sum of the costs of patient waiting times, doctors’ curate evaluations of different solutions, optimization can gen-
idle times and doctors’ overtimes. They developed a erate potential solutions which are likely to improve the results
sequential-bounding algorithm to solve small instances and a based on prior simulation outputs. Most simulation software
heuristic for larger instances. The aforementioned study by platforms, like Arena and FlexSim, also incorporate optimiza-
Begen and Queyranne [2] presented an optimization frame- tion tools, e.g., OptQuest, to help users make better decisions
work and developed an algorithm based on discrete procedure [25]. Klassen and Yoogalingam [23] applied a simulation-
durations, which solved their problem instances in polynomial based optimization method to explore different combinations
time. These studies typically assumed the patient arrival pat- of scheduling rules in order to mitigate the impact of late
tern to be deterministic and appointment durations to be sto- arrivals of patients. This study concluded that the combination
chastic. Berg et al. [4] developed a two-stage stochastic of variable-length intervals and block scheduling works better
mixed-integer programming method to optimize the booking than the traditional dome-shaped or plateau dome rules.
and appointment times, maximizing the profit. In their study, Klassen and Yoogalingam [24] further examined the benefits
464 Sun Y. et al.

of adding mid-level service providers (MLSPs) to a single- requirements. This can lead to specific protocolling requests
physician outpatient office. Multi-stage appointment schedul- by radiologists for the use of MR3 for specific exams. A
ing rules were also developed using simulation-based optimi- significant majority of the procedures is performed on week-
zation. In both these studies, the authors used linear combina- days (approximately 12,000 procedures) and a significant ma-
tions of prior solutions to generate new solutions. As summa- jority of the outpatient procedures is performed during the day
rized by Fu [12], the commonly used search methods are shift (between 6am and 12am). This results in approximately
stochastic approximation, response surface, sample path, and 49 daily procedures being performed on all three machines in
random search. The first three methods work well with opti- total (during the day shift). More than 123 different types of
mizing continuous variables while random search is the only imaging procedures are performed throughout the year. In an
one that is relevant for the combinatorial optimization prob- attempt to handle this high demand, the MRI department uses
lems such as the ones dealt with in our research. a fixed 45-min slot size for MR2 and MR4, and a fixed 60-min
In our study, since we optimize slot size and IPB place- slot size for MR3. However, under this somewhat restrictive
ment simultaneously, the combinatorial nature of the IPB scheduling approach, the department suffers from long patient
placement variables restricts the application of most of the waiting times, with an average outpatient waiting time of
commonly used simulation-based optimization methods to 54 min. A practical approach for solving this challenge is to
our model. Even with the random search method, the identify the causes of the long waiting times and to improve
stochasticity and large choice set make it computationally the patient schedule by combining optimization and simula-
expensive to achieve robust results using random search. tion modeling techniques.
Therefore, we decided to first formulate the problem into a Figure 2 shows the workflow of an outpatient in the MRI
stochastic programming model capable of handling such un- room, with blue blocks representing key actors, rectangles
certainty, and subsequently used simulation to evaluate its representing different processes, and diamonds representing
results, instead of attempting to perform a simulation-based decision points. Outpatient appointments are booked by a
optimization exercise. scheduler in advance of the exam date at the request of refer-
In this paper, we construct and solve a stochastic program- ring primary care and specialty physicians. Patients are sched-
ming model to optimize the sequencing and scheduling con- uled for an exam on a certain MRI machine at a specific time
sidering flexible cancellation of inpatient exams. This topic is on a specific date. The patients are asked to arrive 30 min
not studied in the literature on outpatient scheduling. before the appointment time, check in at the reception desk,
Moreover, the studies on the multi-class patient settings with and wait until the previous exam is finished. Typically, two
hospital-determined flexible cancellations have not developed technologists (Technologist 1 and Technologist 2) are
an optimization approach. The models and methods devel- assigned to work on each MRI machine. When Technologist
oped in this paper address these gaps and are tested using 2 estimates that approximately 10 min of scanning time re-
detailed real-world datasets from a mid-sized outpatient-inpa- main of the currently ongoing exam, then Technologist 1
tient MRI department. starts preparation of the next patient. Exam preparation can
include verification of patient information, the insertion of an
intravenous line if the procedure requires it, and educating the
3 Case study background: MRI workflow patient about the procedure.
at LHMC Inpatients are also scheduled in advance, but unlike outpa-
tients, the lead time to scheduling an inpatient is much smaller.
LHMC provides magnetic resonance (MR) based imaging Outpatients are scheduled by a scheduler at least 2 days in
services at three different locations. The largest operation is advance. In contrast, an inpatient is scheduled by the technol-
located at the main campus in Burlington, MA and the case ogists depending on how far along or behind they are with the
study in this paper is focused on the data from the imaging patient queue. If the procedures are running behind schedule
workflow at this Burlington campus. At this facility, three by a certain threshold amount, which in the case of LHMC is
individual MRI machines (different brands, ranging 4– 15 min later than the appointment time, the technologists will
16 years since installation) perform approximately 17,000 cancel the original inpatient exams and make use of IPBs to
MRI procedures every year. We denote the three machines continue to work on outpatients who have already arrived.
as MR2, MR3, and MR4, a naming convention used in the But, when the procedures are running close to the scheduled
LHMC practice. The majority of the procedures can be per- durations, the technologists examine inpatient orders and re-
formed using any of the three MRI machines, but differences quest the attending nurse and/or transporting person to bring
in capability exist. Prostate procedures, for instance, are re- the inpatient from their room to the imaging area to perform
quired to be done on MR3 due to its bigger room size and the procedure. This inpatient scheduling typically happens at
specific coil types used. MR3 is a 3T (3-Tesla) MRI machine least one slot in advance.
used for some exams with specific higher signal-to-noise ratio
Stochastic programming for outpatient scheduling with flexible inpatient exam accommodation 465

Ordering Physician Receponist Paent Technologist 1

Place order Appointment made Paent Arrives

Check in

Technologist 2
<10 min
Wait in the
before no
waing
previous exam
room
end me?
yes Get changed in the Prepare paent for
changing room exam

Perform Get into the exam


Help paent get
exam room and get
into exam room
scanned
Exam geng
late & next yes Cancel next
paent is inpaent exam
inpaent?
no

Finish
paperwork
Get out of exam
Help paent get out
room with help of
of exam room
Technologist

Change
clothes Clean exam
room
Paent
leaves

Fig. 2 Workflow flowchart

All procedures, irrespective of patient class, require an or- emergency patients are “disruptors” in MR and our goal is
der request from a physician indicating the reason for the to optimize a typical patient schedule as opposed to optimiz-
exam and how soon the procedure needs to be performed ing disruption recovery within the workflow. Finally, even
(e.g., immediately, within 4–6 h, or within 12 h). While the though sometimes patients end up being switched to different
data we obtained is able to discriminate a STAT request from MRI machines than where they were originally scheduled, we
a routine one, it does not provide detailed information on do not model this real-world observation. This is because it
whether the STAT requests should be completed immediately, happens intermittently and the complexity of modeling this
or within 4–6 h, or within 12 h. From the data, we see that part of the workflow outweighs its effect on patient waiting
about 12% of the procedures performed are STAT requests. times. Hence, for the three different MRI machines, we devel-
Given an average of 49 procedures performed in a day, this op three separate optimal patient schedules independently of
translates into approximately six patients in a day with a each other.
STAT request. Moreover, based on our interviews of technol-
ogists and managers at LHMC, we found that only a small
percentage of these STAT requests actually requires immedi- 4 Problem identification and data analysis
ate attention and execution of the imaging exam. In our ob-
servations of the native workflow, we noticed that most pro- LHMC’s Radiology Information System (“Radiant” RIS)
cedures are performed on MRI machines where the patients supported by Epic Electronic Medical Record software appli-
were originally scheduled for appointments. cation [10] tracks every radiology transaction a patient has
Based on this workflow analysis, we make the following with the radiology department. It collects timestamped data
three modeling assumptions. First, the slot sizes are held fixed on the patient appointment, patient arrival, performed imaging
per MRI machine. Second, only two classes of patients (name- procedure, machine, and the start and end time of the exam.
ly, inpatients and outpatients) are modeled, because For our analysis, we collected data on all MRI exams
466 Sun Y. et al.

performed during the five-month time period between and improved. On the one hand, when procedure durations exceed
including January 2018 and May 2018. We used the slot sizes, it can result in patients waiting longer and its effects
timestamped information to derive patient waiting times, pa- propagating throughout the day. On the other hand, when
tient arrival patterns and procedure durations. We focus on the procedure durations are lower than slot sizes, it can lead to
weekday schedule from 6am to 12am, where most outpatients unnecessary machine idle times.
are scheduled. In light of this understanding of the inconsistency between
The waiting time of an outpatient is defined as the duration procedure duration and slot size on each MRI machine, we
from the time when the patient arrives up to the time when the examined the procedure durations for the 10 most common
imaging exam for that patient begins, i.e., the actual time that a types of procedures (of the total 123 types of procedures) to
patient waits after arrival. While the hospital expects patients see which procedures have durations exceeding the slot size
to wait 30 min or less (as previously noted, the patients are (see Table 5). It is important to note that, since some proce-
asked to arrive 30 min in advance of their appointment), the dures on MR2 and MR4 require double slots, in those cases
current waiting time is 54 min on average. In particular, as can we compare the actual procedure duration to 90 min instead of
be seen in Table 1, only 24.13% of the patients wait 30 min or 45 min of slot size. As we can see from Table 5, the duration
less, 40.69% wait between 30 and 60 min, and 35.18% wait of over 73% of the “Brain WWO” (here “WWO” stands for
more than an hour. From Fig. 3, in which the red line repre- “with and without contrast”) exams – the most common type
sents the 30-min threshold, it is clear that a significant fraction of procedure – exceeds the slot size, and “MRCP” (“Magnetic
of the patients waits longer than the hospital expects, with Resonance Cholangiopancreatography”) has the largest pro-
some patients waiting more than 2 h. portion (83.08%) of exams exceeding its slot size. With a
The long waiting times can be caused by the uncertainty in significant number of procedure durations exceeding the cor-
two factors: patient arrival patterns and procedure durations. responding slot sizes, the patient waiting time, especially for
Patients who arrive more than 30 min in advance of their those scheduled later in the day, is likely to be long.
appointment time can inflate the average waiting time; on Then we examined the average procedure durations for
the other hand, patients who arrive late and cause delays in different procedure types on different machines. Figure 4 re-
the workflow will adversely affect waiting times for subse- veals that two of these top 10 procedures, namely, “Prostate
quent patients too. Table 2 shows that a majority of the pa- WWO” and “Breast WWO”, are done only on certain ma-
tients (70%) arrive earlier than the expected 30 min in advance chines. Though MR3 has a 60-min slot size, the procedure
of the appointment time. Also noteworthy is that only 3% of duration for the same procedure on MR3 (marked in red) is
patients arrive later than the appointment time. not necessarily always longer than those on MR2 (blue) and
As shown in Table 3, the long patient waiting times at MR4 (grey). Figure 4 also shows that for many types of pro-
LHMC is a systemic issue caused by factors beyond just the cedures (e.g., “MRCP”, “Cervical Spine WO”, “Breast
inflated average waiting time of early arriving patients. We WWO”, etc.), MR4 has the longest procedure duration among
notice that over 60% of the procedures begin later than the the three machines. This further indicates that the slot sizes are
appointment time and over 16% of the procedures begin more inconsistent with procedure durations.
than 30 min after the appointment time (even though only By analyzing both patient arrival patterns and procedure
about 3% patients arrive later than the appointment time). durations on each machine for the ten most common proce-
Table 4 shows the summary statistics on the procedure dures, it is clear that although patients tend to arrive earlier
durations for the three MRI machines. We can conclude that than asked, the mismatch between procedure durations and
the slot sizes of 45 min on MR2 and MR4, and the slot size of slot sizes does increase patient waiting times. Figure 5 shows
60 min on MR3, currently in use at LHMC, are sub-optimal. a clear growing trend in patient waiting times across the day
Mean procedure durations on MR2 (49 min) and MR4 (as marked by the red line).
(57 min) exceed their slot sizes while the mean procedure
duration of 52 min (with a median of 45 min) on MR3 is
below its allocated slot size. These findings show that the time 5 Models
slots do not align with the procedure durations and could be
For each machine, we consider a single server system where
Table 1 Outpatient waiting times two types of customers are served in a certain order. Both the
patient arrival patterns and service durations are stochastic.
Waiting time <30 min 30–60 min 60–90 min >90 min Total The cancellation of one type of customers (inpatients) is
rule-based which means that if their service starts a certain
Frequency 930 1568 869 487 3854
amount of time later than the appointment time, that service
Percentage 24.13% 40.69% 22.54% 12.64% 100.00%
will be canceled. The service for the other type of customers
(outpatients) cannot be canceled. While different days of the
Stochastic programming for outpatient scheduling with flexible inpatient exam accommodation 467

Fig. 3 Histogram of outpatient waiting times

week have different IPB placements and also different number to estimate distributions, the LHMC data was fitted to
of IPBs, requiring them to be modeled differently, the hospital Gamma, Log-normal, Logistic, Normal, and Weibull distribu-
requires the slot sizes to be identical across all weekdays. As a tions where necessary linear transformations were made to
result, the five problems associated with the five weekdays are ensure that all the data points are within the domain of a
coupled and need to be solved jointly using a single integrated specific distribution. After comparing the Akaike
optimization formulation. In Model 1 (presented in Sect. 5.1), Information Criterion (AIC) values [6] of the above distribu-
we optimize the slot size alone given a certain IPB placement. tions, we decided to use Logistic distribution to model patient
In Model 2 (presented in Sect. 5.3), we determine the optimal arrival patterns and Weibull distribution to model procedure
values of IPB placement and slot size, simultaneously. durations. Each scenario in the stochastic programming
model’s second stage uncertainty realization is one set of pa-
tient arrival patterns and procedure durations generated from
5.1 Model 1: Slot size optimization the aforementioned distributions.

Model 1 decides the optimal slot size for each MRI machine Sets
while fixing the IPB placement as per the hospital’s current J ¼ f1; …; J g Set of slots in a day
schedule, and taking the practice of flexible inpatient cancel- S ¼ f1; …; S g Set of scenarios
lations into account. D ¼ f1; …; Dg Set of days of the week
This model is a two-stage stochastic programming model,
with the first stage deciding the slot size and the second stage
deciding waiting times, idle times, overtimes and cancella- Parameters
tions. The slot size decisions in the first stage are the only true Procj, d, s: Procedure duration of patient in slot j∈ J on day
decision variables. The second stage decides the values of d∈D in scenario s∈S
waiting times, idle times, overtimes and cancellations based Fj, d, s: Arrival lateness of patient in slot j∈ J on day d∈D
on the first-stage decisions and the uncertainty realization. The in scenario s∈S with respect to the appointment time; a
uncertainty comes from patient arrival patterns and procedure positive (negative) value indicates a patient arriving after
durations, both of which are assumed to have independent (before) the appointment time
identical distributions regardless of the exam order. In order Ij, d: 1 if slot j∈ J on day d∈D serves an inpatient (i.e., is
an IPB), 0 otherwise
Table 2 Outpatient arrival pattern
Cwt, Cid, Covt, Ccc: The cost coefficients for patient
Earliness Late <30 min 30–60 min 60–90 min >90 min waiting time (in minutes), machine idle time (in minutes),
overtime (in minutes) and the number of inpatient exam
Frequency 152 1357 2281 817 423 cancellations respectively
Percentage 3.02% 26.98% 45.35% 16.24% 8.41% Twk: The official working hours in a day for MRI room
468 Sun Y. et al.

Table 3 Time from scheduled appointment time to exam start time

Exam start time – scheduled appointment time <−30 min −30 to 15 min −15 to 0 min 0 to 15 min 15 to 30 min >30 min

Frequency 257 341 911 1041 667 629


Percentage 6.68% 8.87% 23.69% 27.07% 17.34% 16.35%

Tprep: The preparation time for patient to get ready for Model
exams  
Tlate: The delay threshold after the appointment start time Min C wt *E½TWO þ C id *E ½ID þ C ovt *E ∑ OV d
that will lead to inpatient exam cancellation d∈D
" #
k: Minimum increment in slot size (minute)
E ½TWI 
Smin, Smax: The lower/upper threshold for the number of þ þ C cc *E ∑ y j;d ð1Þ
M d∈D; j∈ J
k-minute increments constituting each slot
M: A large positive constant number
First-stage constraints
5.2 Decision variables s:t: G j ¼ G j−1 þ k*x∀ j∈ Jnf1g ð2Þ
G1 ¼ 0 ð3Þ
First-stage decision variable
x: Number of k-minute increments per slot S min ≤ x ≤ S max ð4Þ
x∈ℤ þ ð5Þ

Second-stage decision variables


yj, d, s: 1 if the exam for patient in slot j∈ J on day d∈D in Second-stage constraints
scenario s∈S is canceled, 0 otherwise    
TWOs ≥ ∑d∈D; j∈ J 1−I j;d * B j;d;s −A j;d;s ∀s∈S ð6Þ
 
T WI s ≥ ∑d∈D; j∈ J I j;d * B j;d;s −A j;d;s ∀s∈S ð7Þ
Auxiliary variables  
TWOs: Total waiting time for all outpatients in a week in IDs ≥∑d∈D; j∈ J B j;d;s −E j−1;d;s ∀s∈S ð8Þ
scenario s∈S OV d;s ≥ E J ;d;s −60*T wk ∀s∈S; d∈D ð9Þ
TWIs: Total waiting time for all inpatients in a week in
scenario s∈S A j;d;s ¼ G j þ F j;d;s ∀s∈S; d∈D; j∈J ð10Þ
IDs: Total machine idle time in a week in scenario s∈S B j;d;s ≥ A j;d;s þ T prep ∀s∈S; d∈D; j∈ J ð11Þ
OVd, s: Overtime on day d∈D in scenario s∈S
Aj, d, s: Arrival time of patient in slot j∈ J on day d∈D in B j;d;s ≥E j−1;d;s ∀s∈S; d∈D; j∈ J ð12Þ
scenario s∈S E 0;d;s ¼ 0∀d∈D; s∈S ð13Þ
Bj, d, s: Exam start time of patient in slot j∈ J on day d∈D  
I j;d * B j;d;s −G j ≤ T late þ M *y j;d;s ∀s∈S; d∈D; j∈ J ð14Þ
in scenario s∈S
Gj: Appointment time of patient in slot j∈ J y j;d;s ≤ I j;d ∀s∈S; d∈D; j∈ J ð15Þ
Ej, d, s: Exam end time of patient in slot j∈ J on day d∈D  
in scenario s∈S E j;d;s ¼ B j;d;s þ 1−y j;d;s *Proc j;d;s ∀s∈S; d∈D; j∈ J ð16Þ

y j;d;s ∈f0; 1g∀s∈S; d∈D; j∈ J ð17Þ

Table 4 Procedure durations and waiting times on different machines TWOs ; TWI s ; IDs ≥ 0∀s∈S ð18Þ

Machine MR2 MR3 MR4


B j;d;s ; E j;d;s ≥ 0∀s∈S; d∈D; j∈ J ð19Þ
G j ≥ 0∀ j∈ J ð20Þ
Mean procedure durations (min) 49 52 57
Mean waiting time (min) 54 51 55 OV d;s ≥ 0∀s∈S; d∈D ð21Þ
Median procedure time (min) 47 45 49
The objective function seeks to minimize the weighted sum
Median waiting time (min) 47 45 48
of the expected values of outpatient waiting time, machine idle
Slot size (min) 45 60 45
time, overtime and penalty for canceling inpatient exams. For
Stochastic programming for outpatient scheduling with flexible inpatient exam accommodation 469

Table 5 Procedure durations for top 10 most frequent procedures

Procedure Procedure duration within the slot size Procedure duration exceeding the slot size

Frequency Percentage Frequency Percentage

Brain WWO 227 26.71% 623 73.29%


Abdomen WWO 360 54.05% 306 45.95%
Lumbar spine 326 83.38% 65 16.62%
Brain WO 202 77.99% 57 22.01%
Prostate WWO (90 min) 199 78.97% 53 21.03%
Cervical spine WO 173 77.58% 50 22.42%
MRCP 33 16.92% 162 83.08%
Breast WWO (90 min) 85 63.91% 48 36.09%
Cervical spine WWO 26 22.61% 89 77.39%
Knee left WO 77 69.37% 34 30.63%

MRCP Magnetic Resonance Cholangiopancreatography, WWO With Or Without Contrast, WO Without Contrast

technical reasons described later in this section, the total inpa- than time 0 (as in Constraints (12)), and also to ensure that the
tient waiting time is also added to the objective function to machine idle time before the first patient is correctly defined
correctly define the operational workflow, and the small coef- (as in Constraints (8)). Constraints (14), (15), and (16) simu-
ficient (1/M) of this term guarantees that this term will have no late flexible inpatient cancellation if the exam is more than
impact on the optimality of the resulting solution. Tlate minutes behind schedule. In particular, Constraints (14)
Constraints (2), (3), (4) and (5) are first-stage constraints, ensures that the inpatient exams that fail to start by Tlate mi-
which are directly related to slot size decisions. Constraints (2) nutes past the appointment time are canceled. Constraints (15)
and (3) calculate the appointment time. Constraints (4) and (5) ensure that no outpatient exams are canceled. Constraints (16)
together define the permissible set of values for the feasible set the exam end time equal to the sum of the exam start time
slot sizes. Constraints (6)–(21) are second-stage constraints and the procedure duration for the non-canceled exams, and
defining the patient waiting time, machine idle time, worker equal to the exam start time for the canceled exams.
overtime and inpatient cancellations. Constraints (6), (7), (8), Constraints (17) ensure that the cancellation variables are bi-
and (9) define the total outpatient waiting time, inpatient nary. Constraints (18)–(21) ensure the non-negativity of the
waiting time, machine idle time, and overtime, respectively, auxiliary variables.
for each scenario. Constraint (10) gives the arrival time of When formulating the optimization model without includ-
each patient. Constraints (11) and (12) ensure that the exam ing inpatient waiting time in the objective function, the gen-
starts after the current patient arrives and is prepared for the erated solution sometimes has invalid inpatient exam start
exam, and also after the previous exam finishes. Constraint times. The patient exam start time is constrained by
(13) defines the exam end time for an imaginary “Patient 0”, Constraints (11) and (12) to be no earlier than the later of
so that the real first patient’s exam start time will not be earlier the two entities: previous patient’s exam end time and the time

Fig. 4 Average procedure 120


durations for top 10 procedures
on different machines 100
80
60
40
20
0

MR2 MR3 MR4


470 Sun Y. et al.

Fig. 5 Change in waiting times 80


and procedure durations across 70
the day
60

Time (min)
50
40
30
20
Waing Time (min) Procedure Duraon (min)
10
0
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Hour of the Day

when the current patient’s preparation is complete. For outpa- B′j, d, s: Auxiliary variable representing the product of Bj,
tients, the inclusion of outpatient waiting time in the objective d, s and zj, d for slot j∈ J on day d∈D in scenario s∈S
function ensures that at optimality, each outpatient exam starts
as soon as the previous exam is finished and the patient is A new first-stage decision variable, zj, d, is created as a
prepared, whichever happens later. However, this is not guar- binary variable indicating whether block j is an inpatient block
anteed for inpatients and some of the optimal solutions for this on day d. The objective function is the same as that for Model
formulation may have neither of the Constraints (11) and (12) 1 (Expression 1). However, since Ij, d, which was a constant in
tight. In practice, however, the next exam should start as soon Model 1 Constraints (6), (7), (14) and (15), has now become a
as that machine and the patient are both ready. In order to decision variable zj, d in Model 2, the multiplication of zj, d and
eliminate this discrepancy between the model and practice, Bj, d, s as well as zj, d and Aj, d, s will introduce nonlinearities
we add the inpatient waiting time to the objective function. into the model. Therefore two additional auxiliary variables,
0 0
By giving it a negligibly small cost coefficient, we ensure that B j;d;s , representing Bj, d, s ∗ zj, d, and A j;d;s , representing Aj, d,
this term does not reduce the solution quality in terms of the
s ∗ zj, d, are introduced to linearize the model. Constraints (23)
original objective function but allows us to pick correctly to (26) correspond to Constraints (2) to (5), respectively, in
among the multiple optimal solutions of the original problem 0
Model 1. Constraints (27) to (32) ensure that B j;d;s ¼ B j;d;s *
formulation. 0
z j;d and A j;d;s ¼ A j;d;s *z j;d . Constraints (33) are the linearized
5.3 Model 2: Integrated slot size and IPB placement versions of Constraints (14). Constraints (34) correspond to
optimization Constraints (15) in Model 1. Constraints (35) require the num-
ber of IPBs in a single day to be equal to the number of IPBs in
While Model 1 determines the optimal slot size for a the current schedule. Constraints (36) ensure that the IPB
predetermined IPB placement, Model 2 calculates the optimal placement decision variables are binary. Constraints (37),
values of slot size and IPB placement at the same time. (38), (39) and (40) respectively define the total outpatient
waiting time, inpatient waiting time, machine idle time and
overtime. Constraints (41) to (46) are identical to Constraints
5.4 Extra notation (10)–(13) and (16)–(17) in Model 1. Constraints (47) to (50)
ensure the non-negativity of the auxiliary decision variables.
Parameters
NIPBd: Number of IPBs on day d∈D  
Min C wt *E½TWO þ C id *E ½ID þ C ovt *E ∑ OV d
d∈D
" #
5.5 Decision variables E ½TWI 
þ þ C cc *E ∑ y j;d ð22Þ
M d∈D; j∈ J
First-stage decision variable
zj, d: 1 if the slot j∈ J on day d∈D is an IPB, 0 otherwise First-Stage Constraints:
s:t: G j ¼ G j−1 þ 5*x∀ j∈ Jnf1g ð23Þ
Auxiliary variables G1 ¼ 0 ð24Þ
A′j, d, s: Auxiliary variable representing the product of Aj,
S min ≤ x ≤ S max ð25Þ
d, s and zj, d for slot j∈ J on day d∈D in scenario s∈S
Stochastic programming for outpatient scheduling with flexible inpatient exam accommodation 471

x∈ℤ þ ð26Þ given machine to be the same across all days of week. To
0
 
þ M 1−z j;d ∀s∈S; d∈D; j∈ J
j;d;s ≤ B j;d;s ð27Þ
B ensure that the results remain amenable to practical implemen-
  tation, we too constrained the slot sizes for a given machine to
B j;d;s ≤B0 j;d;s þ M 1−z j;d ∀s∈S; d∈D; j∈ J ð28Þ be the same across all days of the week. All exams are sched-
 
A0 j;d;s ≤ A j;d;s þ M 1−z j;d ∀s∈S; d∈D; j∈ J ð29Þ uled sequentially from 6am. IPBs are optimized in Model 2. In
  Model 1, the sequencing of inpatient and outpatient slots is
A j;d;s ≤A0 j;d;s þ M 1−z j;d ∀s∈S; d∈D; j∈ J ð30Þ held constant as per the hospital’s current schedule, which in
B0 j;d;s ≤ z j;d *M ∀s∈S; d∈D; j∈ J ð31Þ turn fixes the IPB placement. We allow changing the slot sizes
in multiples of 5 min to remain consistent with practice. As
0
A j;d;s ≤ z j;d *M ∀s∈S; d∈D; j∈ J ð32Þ shown in Sect. 4, the long waiting times were caused in many
   
B j;d;s −G j − 1−z j;d *M ≤ T late cases because of the slot sizes being too small for the exam. In
order to keep outpatient waiting times under control, we set
þ M*y j;d;s ∀s∈S; d∈D; j∈ J ð33Þ the lower bound on the candidate slot sizes to 45 min; in other
y j;d;s ≤ z j;d ∀s∈S; d∈D; j∈ J ð34Þ words, Smin = 9. We do not need to consider slot sizes smaller
than 45 min because, as shown in Table 4 in Sect. 4, the mean
∑ j∈ J z j;d ¼ NIPBd ∀d∈D ð35Þ procedure time for each machine is already larger than 45 min.
z j;d ∈f0; 1g∀d∈D; j∈ J ð36Þ During the day-shift (6am to 12am) length of 18 h, the max-
imum allowable time per exam equals 18*60/17 = 63.5 min.
Second-Stage Constraints: Hence the candidate slot sizes with a duration of 70 min and
 0
 longer do not need to be considered; in other words, Smin=13.
TWOs ≥ ∑d∈D; j∈ J B j;d;s −A j;d;s þ A j;d;s −B0 j;d;s ∀s∈S ð37Þ This implies that our list of candidate slot sizes includes 45,
 0
 50, 55, 60, and 65 min.
TWI s ≥ ∑d∈D; j∈ J B0 j;d;s −A j;d;s ∀s∈S ð38Þ Table 6 shows the values used for the model parameters.
  The choices regarding some of these cost coefficients were
IDs ≥ ∑d∈D; j∈ J B j;d;s −E j−1;d;s ∀s∈S ð39Þ made based on expert opinions. At LHMC, an MRI machine
OV d;s ≥ E J ;d;s −60*T wk ∀s∈S; d∈D ð40Þ remaining idle is considered about twice as expensive as a
patient waiting for the same amount of time, which is reflected
A j;d;s ¼ G j þ F j;d;s ∀s∈S; d∈D; j∈ J ð41Þ in the relative values of cost coefficients Cwt and Cid (Table 6).
B j;d;s ≥A j;d;s þ T prep ∀s∈S; d∈D; j∈ J ð42Þ In cases where day shift overtime occurs, the technicians from
the day shift need to finish the current exams before handing it
B j;d;s ≥E j−1;d;s ∀s∈S; d∈D; j∈ J ð43Þ
over to the night shift staff. Thus, the overtime cost coefficient
E 0;d;s ¼ 0 ∀d∈D; s∈S ð44Þ (Covt) is determined based on the technicians’ wages. Due to
  the limited number of technicians in the night shift, the image
E j;d;s ¼ B j;d;s þ 1−y j;d;s *Proc j;d;s ∀s∈S; d∈D; j∈ J ð45Þ quality is significantly worse for inpatients in night shift than
y j;d;s ∈f0; 1g ∀s∈S; d∈D; j∈ J ð46Þ in day shift, which sometimes results in requiring additional
exams. Therefore, the cost coefficient for inpatient exam can-
TWOs ; TWI s ; IDs ≥ 0∀s∈S ð47Þ cellation (Ccc) is calculated based on this expected cost of
B j;d;s ; E j;d;s ≥ 0 ∀s∈S; d∈D; j∈ J ð48Þ additional exams. Twk is set at 18 h because we wish to opti-
mize for the day shift which is the time between 6am and
G j ≥ 0∀ j∈ J ð49Þ 12am. In practice, Tlate, can vary by technologist, but 15 min
OV d;s ≥ 0∀s∈S; d∈D ð50Þ was found to be a good approximation. This implies that if the
prior procedure runs late and extends into an IPB by more than
15 min, then the inpatient exam in that IPB is canceled. As
mentioned in the previous paragraph, Smin and Smax, reflecting
6 Computational experiments and results the minimum and maximum possible slot sizes, are set to 45
and 65 min respectively. Proc j;d;s ∀ j∈ J; d∈D; s∈S and F j;d;s ∀
Since the IPB placement and number of IPBs are different j∈ J; d∈D; s∈S are simulated via Monte-Carlo Simulations
across different days of the week, we jointly optimize the from the distributions fitted to the data. I j;d ∀ j∈ J; d∈D values
weeklong schedule. A total of 17 exams, including both inpa- are assigned according to the current IPB placement. In Model
tient and outpatient exams, are scheduled from 6am to 12am 2, IPB placements are optimized while keeping the number of
for each machine per day from Monday to Friday, resulting in IPBs for each day at the same level as in the current schedule.
a total of 85 exams per week per machine during the day shift. The numbers of IPBs are 5, 6, 5, 2, and 7 from Monday to
The current practice at LHMC requires the slot sizes for a Friday respectively, for MR2. The numbers of IPBs are 5, 5, 4,
472 Sun Y. et al.

Table 6 Parameter values used in the optimization models

Parameter Cwt Cid Covt Ccc Twk Tprep Tlate M Smin Smax N_scenario

Value 8.75 16 1.5 50 18 10 15 10,000 9 13 80

6, and 6 from Monday to Friday respectively, for MR4. The Table 8. The optimal slot size is found to be somewhat var-
number of IPBs is 6 for each weekday for MR3. iable across the week, due to the differing IPB placements.
All results in Sect. 6 are based on these parameter values. In Monday, Tuesday, Thursday, and Friday still have an opti-
Sect. 8, we test the robustness and sensitivity of our model mal slot size of 55 min, while Wednesday has an optimal slot
results to variations in some of these parameters. Optimization size of 60 min. Compared to the total costs under the current
Model 1 is solved using the “GLPK” optimizer Version 4.65 schedule, which are listed in the second-last column, we are
[14] while Model 2 is solved using a numerical method. A able to reduce the total weekly cost by 17% in the optimal
dual-core Intel i5-X6300 CPU with 8GB RAM and Windows schedule (costs presented in the last column), a slight addi-
10 as the operating system was used for all computational tional improvement relative to the 16% increase in Table 7. It
experiments. also shows that with fewer IPBs in a day, equivalent to hav-
ing fewer buffers between the outpatient exams, the optimal
slot size increases to compensate for the reduced buffers.
6.1 Model 1 results
This result is directionally consistent with our intuition.
As mentioned in Sect. 2, Sample Average Approximation
(SAA) is one of the most widely used methods for solving 6.2 Model 2 results
stochastic programming problems. All of the computational
results in this section are obtained using the SAA method. The When solving Model 2 using SAA on GLPK, we were faced
number of scenarios (N_scenario) is set to 80, which was with very long runtimes. It takes the optimizer more than
found to provide a good balance between the competing goals 10 h to solve the problem. Therefore, we implemented a
of ensuring stability of the numerical results and avoiding the numerical approach by enumerating all the combinations of
run-times becoming too large. The runtime for Model 1 using IPB placement and slot sizes, and then computing the second
GLPK was found to be 10 min on average. The results pre- stage decision variables for each combination using the
sented in Table 7 give optimal slot sizes with the current IPB GLPK optimization solver. The number of IPBs per week-
placement. As can be seen, the optimal slot size is 50 min for day in the current schedule ranges from 2 to 7. Therefore, the
MR2, 50 min for MR3, and 55 min for MR4, which means the largest number of IPB placement solutions is C(17, 7) =
current slot sizes for MR3 (60 min) and MR4 (45 min) are far 19,448 (i.e., the number of combinations of seven items cho-
from optimal, while the current slot size for MR2 (45 min) is sen from a set of 17 items). For each combination of IPB
somewhat closer to optimal. The average waiting time for placement and slot size, the expected costs were evaluated by
each outpatient ranges from 33 to 38 min, a decrease of averaging across all scenarios. For Model 2, the number of
18 min on average compared to the current practice. The last evaluated scenarios was increased to 500 (from 80 for Model
two columns list the total costs of the current and the optimal 1) to ensure robustness of the results. The runtime for this
schedules, respectively, for each MR machine. By optimizing numerical method was 245 min on average. As expected, the
slot size, we are able to reduce the total cost by 9%, 16%, and runtime varied considerably with the number of IPBs, rang-
16% for MR2, MR3, and MR4 respectively. ing from 51 to 456 min.
We also examine the changes in the optimal slot sizes if The results presented in Table 9 show that the optimal slot
allowed to vary with the day of the week. For this analysis, size when optimizing IPB placement and slot size simulta-
MR4 was used as an example, and the results are presented in neously is smaller, by 5 min each, than when optimizing only

Table 7 Results from optimizing slot size with current IPB placement and requiring the same slot sizes across the week

Machine Slot Waiting time Idle time Canceled Overtime Total cost for current Total cost for optimal
size schedule schedule

(Min) (Min per patient) (Min per day) (Number per day) (Min per day) ($ per day) ($ per day)
MR2 50 36 132 1.48 0 6466 5879
MR3 50 33 127 1.80 0 6235 5240
MR4 55 38 128 2.06 0 7167 6003
Stochastic programming for outpatient scheduling with flexible inpatient exam accommodation 473

Table 8 Results from optimizing slot size with current IPB placement and allowing for different slot sizes across the week (for MR4)

Machine Day of Number of Slot IPB Waiting time Idle time Canceled Total cost for Total cost for
week IPBs size placement current schedule optimal schedule

(Min) (Min per patient) (Min per day) (Number per day) ($ per day) ($ per day)
MR4 Mon 5 55 7 8 14 16 36 128 2.04 7095 5848
17
Tue 5 55 5 6 7 8 17 40 130 1.91 7301 6210
Wed 4 60 5 6 16 17 33 164 1.25 8364 6327
Thu 6 55 5 6 7 8 16 37 133 2.27 6538 5706
17
Fri 6 55 5 6 7 8 16 37 133 2.27 6538 5706
17

for slot size, as presented in Table 7. Two important observa- the week, with this new constraint the optimal slot size will be
tions are that (1) the IPB placements are, for the most part, 45 min for MR2, 45 min for MR3 and 55 min for MR4, as
evenly distributed across the 17 slots, and (2) the average shown in Table 10. Since there are only two IPBs on Thursday
number of canceled exams is higher, in all cases, than in for MR2, there is no feasible solution for any slot size when
Model 1’s optimal solutions. However, in practice, some restricting the probability of performing at least two inpatient
STAT inpatients may need to be treated within the 4 or 6 h exams to be at most 5%. Thus, the optimal slot size for MR2
after the order is placed; so, hospital prefers to be able to treat was determined by minimizing the total cost for all the other
at least two inpatients each day. In the last column of Table 9, days of the week.
the probabilities of fewer than 2 inpatients being treated are Optimization models have potential limitations. The
presented. The probability is very high for MR2 on Thursday models simplify patient activities, patient movements from
with only 2 IPBs, while the probabilities for all days on MR4 one room to another, the interactions among medical staff,
are over 10%. To limit the number of inpatient exam cancel- and the use of hospital facilities. In order to provide practical
lations, another constraint is added requiring that the proba- evaluation of the impact of the optimization outputs, we used
bility of fewer than 2 inpatient exams being performed should FlexSim Healthcare [29] to develop a simulation model of the
be less than or equal to 5%. If the slot sizes are the same across MRI room workflow in the Department of Radiology to

Table 9 Results for optimal slot size and IPB placement requiring the same slot size for each day of the week

Machine Day of Number of Slot IPB Waiting Canceled Prob (<2 inpatients Total cost for current Total cost for optimal
week IPBs size placement time treated) schedule schedule
(Min) (Min per (Number ($ per day) ($ per day)
Patient) per day)

MR2 Mon 5 45 3 6 9 12 16 32 2.51 0.16 6488 5125


Tue 6 45 3 6 9 12 14 31 2.78 0.07 5534 4765
17
Wed 5 45 3 6 9 12 16 32 2.51 0.16 6488 5125
Thu 2 45 6 11 44 1.3 0.87 8182 6961
Fri 7 45 3 5 7 9 12 28 2.96 0.01 5637 4472
14 16
MR3 Mon–Fri 6 45 4 6 8 11 13 30 2.61 0.04 6235 4582
15
MR4 Mon 5 50 4 8 11 13 33 2.79 0.22 7095 5246
16
Tue 5 50 4 8 11 13 33 2.79 0.22 7301 5246
16
Wed 4 50 4 6 9 14 36 2.22 0.41 8364 5753
Thu 6 50 3 5 8 10 13 30 3.02 0.12 6538 4896
15
Fri 6 50 3 5 8 10 13 30 3.02 0.12 6538 4896
15
474 Sun Y. et al.

Table 10 Results for optimal slot size and IPB placement with the probability of fewer than two inpatients treated being at most 5% and requiring the
same slot size for each day of the week

Machine Day of Number of Slot IPB Waiting Canceled Prob (<2 inpatients Total cost for current Total cost for optimal
week IPBs size placement time treated) schedule schedule
(Min) (Min per (Number ($ per day) ($ per day)
patient) per day)

MR2 Mon 5 45 4 7 8 11 12 35 2.06 0.05 6488 5387


Tue 6 45 3 4 7 10 13 31 2.71 0.04 5534 4807
16
Wed 5 45 4 7 8 11 12 35 2.06 0.05 6488 5387
Thu 2 NA NA NA NA NA 8182 NA
Fri 7 45 3 5 7 9 12 28 2.96 0.01 5637 4472
14 16
MR3 Mon–Fri 6 45 4 6 8 11 13 30 2.61 0.04 6235 4582
15
MR4 Mon 5 55 1 4 7 11 14 30 1.87 0.05 7095 5468
Tue 5 55 1 4 7 11 14 30 1.87 0.05 7301 5468
Wed 4 55 1 2 4 10 39 1.23 0.04 8364 6441
Thu 6 55 2 5 8 12 14 27 2.43 0.02 6538 5069
17
Fri 6 55 2 5 8 12 14 27 2.43 0.02 6538 5069
17

model the activities of patients from their arrival in the depart- main features of the actual workflow and is an accurate repre-
ment to their discharge from the system after finishing the sentation of it. In particular, the average outpatient waiting
exam. This model aims to evaluate the waiting time, idle time, time was found to be 57 min, which is close to the actual
overtime and cancellations in the MRI rooms under different waiting time of 54 min in practice. Additionally, as shown
slot sizes and IPB placements. FlexSim Healthcare simulation in Fig. 6, the increasing trend in patient waiting times during
tool enables us to set detailed patient activities, incorporate the the day is consistent with the trend shown in Fig. 5 in Sect. 4.
floor plan of the hospital environment, coordinate technicians Figure 6 shows that the waiting times in simulation and reality
in the exam room, simulate the use of changing rooms and track each other closely throughout the day, thus validating
other facilities. The software also allows for customized code, the accuracy of the simulation model.
which enabled us to model the rule-based inpatient exam Next, the results from the various optimization runs with
cancellation. the same slot size across the week are evaluated using this
First, we tested the simulation model with the current slot simulation model and compared to the current timetable. As
size, current IPB placement, and current patient arrival pattern shown in Table 11, the total cost for all three machines in a
to validate model parameters. Comparing the simulation re- week decreases by 11.6% if we use the output of the model
sults to the actual data showed that the model captures the that optimizes slot sizes alone, and it further decreases by an

Fig. 6 Change in average


Outpaent Waing Time in Simulaon and Real Data
outpatient waiting time across the
120
day in the simulation (red) and
real data (grey) 100
Waing me (min)

80

60

40

20

0
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Time of the day (hour)

Real Data Simulaon


Stochastic programming for outpatient scheduling with flexible inpatient exam accommodation 475

Table 11 Simulation results with current timetable and the timetables obtained from model 1 and model 2 with the same slot sizes across the week

Timetable Machine Waiting time Idle time Total cost for all machines Change of total cost

Simulation Optimization Simulation Optimization Simulation Optimization Simulation Optimization

Current timetable MR2 68 48 102 82 124,760 99,340 NA NA


MR3 34 24 255 244
MR4 67 58 85 55
Model 1 optimal MR2 48 36 153 132 110,259 85,610 12% 14%
MR3 43 33 170 127
MR4 45 38 170 128
Model 2 optimal MR2 43 35 136 99 96,312 78,660 23% 21%
MR3 31 30 153 97
MR4 35 31 187 140

additional 12.6% if we use the output of the model that opti- Table 10. We chose three commonly used sequencing rules
mizes both slot sizes and IPB placement simultaneously. The as benchmarks: (1) IPBEG (inpatient exams first, then outpa-
simulation results are also compared with the results obtained tient exams), (2) OPBEG (outpatient exams first, then inpa-
directly by running the optimization models in Table 11, for tient exams), and (3) a variant of the sequencing rule called
the current timetable as well as for the Model 1 and Model 2 ALTER. ALTER was defined in Bhattacharjee and Ray [5] as
solutions. Specifically, the results for the Current Timetable “… scheduling inpatient exams and outpatient exams alterna-
from the Optimization model are calculated using the numer- tively. If the number of a particular class of scheduled patients
ical approach in which we set the slot time and IPB placement exceeds the other one, the excess of that class is scheduled at
to be the same as the current timetable. The waiting time, the end …”. In our problem setting, since more outpatient
machine idle time, and total costs are smaller in the optimiza- exams are scheduled than inpatient exams during the day,
tion results than in simulation results for all the cases. This we use a simpler variant of the ALTER rule by placing inpa-
phenomenon can be explained by the fact that the simulation tient exams evenly across the day.
model allows a more detailed depiction of the use of changing As shown in Table 12, even with the same slot size, differ-
room, patient movement from one room to the other and the ent sequencing rules will give very different total costs and
coordination among medical staff. Nevertheless, the change of waiting times. The IPBEG and OPBEG sequencing rules have
total cost is very consistent between simulation results and significantly worse performances compared to the “Optimal”
optimization results, which shows the robustness of the sched- sequences (defined as the sequences obtained from running
ule derived from optimization model. the Optimization Model 2) and also compared to the ALTER
variant, in terms of total costs and waiting times. However,
more inpatients are treated with IPBEG and OPBEG rules.
7 Sequencing rules analysis The ALTER variant gives a near-optimal solution in terms
of the total expected cost minimization. The sequences gener-
In Sect. 6, we obtained the optimal IPB placement using sto- ated by the “Optimal” solution also resemble the ones gener-
chastic programming methods. However, when optimization ated by the ALTER variant, in that they distribute the IPBs
tools are not available, rule-based sequencing methods are evenly across the day. To conclude, if optimization tools are
widely used due to their simplicity. In this section, we com- not available, then using ALTER variant sequencing rule, in
pare the performances of different sequencing rules (e.g., general, gives a better performance than IPBEG and OPBEG.
IPBEG) to each other and to the optimal sequencing provided
by the stochastic programming approach, under fixed slot
sizes. The goal is to identify the most adequate sequencing 8 Sensitivity analysis
rules that can be used for deciding IPB placement to replace
stochastic programming with minimal loss of optimality. In order to generalize our conclusions to decision makers with
We first examine several sequencing rules and compare different priorities, in this section we perform sensitivity anal-
them to the optimal sequences with the lowest total cost, on ysis of weights for outpatient waiting time, machine idle time,
MR4 with a 55-min slot size. These results reported in and exam cancellations.
Table 12 are computed without imposing the additional con- In Table 13, we demonstrate the impacts of applying dif-
straints restricting the minimum number of treated inpatients ferent combinations of weights for waiting time, machine idle
and hence are slightly different from those reported in time and inpatient exam cancellations using Model 2. Because
476 Sun Y. et al.

Table 12 Results for different sequencing rules, and the “Optimal” sequences (defined as the sequences obtained from optimization model 2) on MR4
with 55-min time slot and different number of IPBs

Sequencing rule Number of IPBs IPB placement Waiting time Idle time Canceled Overtime Total cost
(Min per patient) (Min per day) (Number per day) (Min per day) ($ per day)

IPBEG 4 1234 52 120 0.87 1.69 7833


5 12345 48 120 1.06 0.71 7054
6 123456 45 139 1.30 1.06 6937
OPBEG 4 14 15 16 17 48 101 1.50 0 7141
5 13 14 15 16 17 50 105 1.78 0 7060
6 12 13 14 15 16 17 48 123 1.90 0 6681
ALTER variant 4 1 5 9 13 34 128 1.67 0.55 6036
5 1 4 7 10 13 30 150 2.09 0 5669
6 1 4 7 10 13 16 29 142 2.35 0 5165
Optimal sequence 4 5 8 12 15 30 137 1.78 0.01 5718
5 4 7 10 12 15 29 142 2.08 0.1 5423
6 2 5 8 12 14 17 27 146 2.43 0.02 5069

overtime durations, which in our results are usually 0 min (or found to be evenly distributed across the day for all the com-
small positive values) despite the small weights assigned to binations of weights, similar to the ALTER variant sequenc-
them, are not big contributors to the objective function, we fix ing rule discussed in Sect. 7. However, the IPB placements
the weight of overtime to 0. We consider various ratios of the differed with different ratios of weights for waiting time and
weights of waiting time and idle time, namely 1:1, 1:2, 1:3, cancellations. If we fix the ratio of weights for waiting time
2:1, and 3:1, as well as various ratios of the weight of the and idle time to 1:1 and progressively reduce the weights of
number of exam cancellations to the sum of the weights of exam cancellation (e.g., rows 1, 5, 11, and 14 of Table 13), the
the other two, from 2:3 to 9:1. We present the optimal slot IPB placement shifts to later in the day. All of these IPB
sizes and IPB placements, as well as the average waiting placements can be interpreted as variants of the ALTER se-
times, idle times and the number of cancellations in quencing rule. If exam cancellations are more costly, then we
Table 13. In these optimal results, the IPB blocks are still should apply the ALTER variant sequencing rule in which the

Table 13 Optimization results from sensitivity analysis to objective function weights of patient waiting time, machine idle time and cancellations for
MR4 with 6 IPBs across the day

Row Ratio of weights for waiting time: idle time: exam Slot IPB Waiting time Idle time Canceled
number cancellation size placement
(Min) (Min per (Min per (Number per
patient) day) day)

1 5%:5%:90% 55 2 4 7 9 11 15 27 154 2.17


2 5%:10%:85% 45 2 5 8 10 12 15 35 82 3.53
3 5%:15%:80% 45 3 6 9 11 13 15 35 77 3.49
4 10%:5%:85% 60 2 5 7 10 12 15 23 203 1.92
5 10%:10%:80% 55 3 5 7 10 12 15 26 161 2.43
6 10%:20%:70% 45 3 6 9 10 12 15 36 72 3.49
7 10%:30%:60% 45 3 5 7 10 14 16 36 69 3.67
8 15%:5%:80% 65 1 4 7 9 14 16 21 263 1.41
9 15%:30%:55% 45 2 5 8 11 13 16 36 72 3.66
10 20%:10%:70% 65 1 3 5 8 12 16 21 259 1.44
11 20%:20%:60% 50 3 5 8 11 14 16 30 110 3.04
12 30%:10%:60% 65 1 4 6 8 11 15 21 261 1.46
13 30%:15%:55% 65 1 3 6 8 12 15 21 257 1.33
14 30%:30%:40% 50 4 7 9 11 13 16 30 119 2.97
Stochastic programming for outpatient scheduling with flexible inpatient exam accommodation 477

first IPB starts early, so the probability of them being canceled Interestingly, as shown in Fig. 7, the solutions with the same
will be lowered under the same slot size. On the other hand, if slot size tend to cluster together. The idle time increases with slot
the patient waiting time is more costly, we should use the size while patient waiting time shows the opposite trend, as ex-
ALTER variant sequencing rule in which the first IPB starts pected. When the slot size is small, the IPB placement has greater
later, so that the function of IPBs as a buffer for outpatient impact on patient waiting time. The waiting time ranges from
exams can be better utilized. 40 min to more than 80 min by changing the IPB placement when
We further analyze the impact of the change in the ratio the slot size is 45 min. However, the idle time doesn’t change as
between the weights of patient waiting time and machine idle much when the slot size is small. By drawing and analyzing this
time. When the ratio of the weights of waiting time and idle frontier, medical centers can choose scheduling solutions based
time is 1:2 or 1:3, the optimal slot sizes are always 45 min on their own priorities regarding the tradeoff between multiple
(rows 2, 3, 6, 7, and 9 of Table 13), which is the lowest objectives, such as patient waiting time and machine idle time.
possible value in our choice set. The waiting time is on aver-
age 35 min for a ratio of 5%:15% (row 3 of Table 13) com-
pared to 21 min for a ratio of 15%:5% (row 8 of Table 13).
This is compensated by an impact on idle times that is 9 Extended model: Emergency patient arrivals
directionally exactly the opposite (77 min vs. 263 min). It
shows how the different weights change our optimal solution Even though the number of emergency patient exams is small
by sacrificing patient waiting time to lower the machine idle as a fraction of the total number of exams conducted at
time and vice versa. LHMC, emergency patients have a disruptive effect on non-
Finally, we analyze how the weight of the number of exam emergency patient workflow due to the unpredictability and
cancellations affects our optimal slot sizes. When the ratio of urgency associated with emergency patient exams. Therefore,
the weights of waiting time and idle time is 1:1 (rows 1, 5, 11, we extended our models to additionally incorporate emergen-
and 14 of Table 13), the slot size increases with the weight of cy patient arrivals. Specifically, we assumed that the emergen-
the number of exam cancellations from 50 min for the ratio of cy patients will have a non-preemptive priority, that is, as soon
30%:30%:40% in row 14 of Table 13 to 55 min for the ratio of as an emergency patient comes in, that patient will be assigned
5%:5%:90% in row 1 of Table 13. Accordingly, a comparison to a machine and will get an MRI exam right after the current
of row 14 and row 1 of Table 13 shows that the average idle exam is finished. If multiple emergency patients arrive during
time increases, while the average waiting time and the average an exam, their exams are performed on a first-come-first-
number of cancellations decrease with the weight of exam served basis.
cancellation. That happens because the larger slot size de- The revised and added parameters, variables and con-
creases the probability of the exam getting delayed, leading straints required for the extended model are as presented next.
to a decrease in both the number of cancellations and patient Except for the idle time constraints – Constraints (51), all the
waiting time while increasing the machine idle time. Note, other constraints presented below are newly added constraints
however, that these patterns are not completely monotonic for the extended model. These parameters, variables, and con-
across rows 1, 5, 11 and 14, due to the discrete nature of the straints can be integrated directly into both Optimization
allowable slot sizes. Model 1 and Model 2 by adding these constraints and revising
Due to the inherently multi-objective nature of the the idle time constraints. Note that all new variables and con-
problem, different medical centers may have different straints being added are second-stage variables and
priorities when it comes to the optimal tradeoff between constraints.
patient waiting time and machine idle time. Therefore,
we provide the Pareto frontier using NSGA-II (Fast Sets
Non-dominated Sorting Genetic Algorithm) method de- K ¼ f1; …; K g: Set of emergency patients in a day, in
veloped by Deb et al. [8], which is known to be compu- increasing order of arrival times
tationally efficient. We implement their algorithm (Sect.
3 in Deb et al. [8]) in Python with a runtime of 11.6 h.
We only examine the solutions in which the probability Parameters
of fewer than 2 inpatients being treated is less than or B0, d, s: Exam begin time for an imaginary patient 0 on
equal to 5%. The patient waiting time and machine idle day d∈D in scenario s∈S
time for each solution were compared with all the other ProcEk, d, s: Procedure duration of emergency patient k∈k
solutions. Since the worker overtime is positively associ- on day d∈D in scenario s∈S
ated with machine idle time, we only focus on two major ETk, d, s: The arrival time of emergency patient k∈k on
objectives: patient waiting time and machine idle time. day d∈D in scenario s∈S
478 Sun Y. et al.

Slot size: 65 min

Slot size: 60 min

Slot size: 55 min

Slot size: 45 min


Slot size: 50 min

Fig. 7 Pareto frontier for patient waiting time and machine idle time

Second-stage decision variables BEk;d;s ; EEk;d;s ≥ 0 ∀s∈S; d∈D; k∈K ð60Þ


mj, k, d, s: 1 if the exam of emergency patient k∈K is
Constraints (51), which replace the idle time definition
performed after the non-emergency patient in slot
constraints in Model 1 (Constraints (8)) and in Model 2
j ∈ {1, …, J}, but before the next (if any) non-
(Constraints (39)), ensure that the machine idle time between
emergency patient on day d∈D in scenario s∈S, 0 other-
two consecutive non-emergency patient exams excludes the
wise. m0, k, d, s equals 1 if the exam of emergency patient
procedure duration of emergency patients. Constraints (52)
k∈K is performed before the first non-emergency patient,
make sure that the non-emergency patient exam does not start
0 otherwise.
before the end time of the emergency patient exam performed
BEk, d, s: Exam start time of emergency patient k∈K on
before it. Constraints (53)–(54) define the binary variable mj, k,
day d∈D in scenario s∈S
d, s to be 1 if the exam for emergency patient k∈K is performed
EEk, d, s: Exam end time of emergency patient k∈K on
after non-emergency patient in slot j∈ J and before the non-
day d∈D in scenario s∈S
emergency patient (if any) in slot j + 1, 0 otherwise. In partic-
ular, Constraints (53) ensure that every emergency patient
Second-Stage Constraints:
undergoes exactly one exam. Constraints (54) ensure that mj,
 
IDs ≥∑d∈D; j∈ J B j;d;s −E j−1;d;s −∑k∈K m j−1;k;d;s *ProcEk;d;s ∀s∈S k, d, s equals 1 when the emergency patient arrival time is
between the actual start times of two consecutive non-
ð51Þ
  emergency exams. To be more specific, when Bj, d, s − ETk,
B j;d;s ≥EEk;d;s −M * 1−m j−1;k;d;s ∀s∈S; d∈D; j∈ J; k∈K ð52Þ d, s > 0, which means the emergency patient k arrives before
the exam start time of non-emergency patient in slot j, the left-
∑ j∈f0;…; J g m j;k;d;s ¼ 1∀s∈S; d∈D; k∈K ð53Þ
hand side of Constraints (54) will be positive. It will enforce
j−1 j−1
B j;d;s −ET k;d;s ≤M * ∑ m j0 ;k;d;s ∀s∈S; d∈D; j∈ J; k∈K ð54Þ ∑ m j0 ;k;d;s to be 1 which guarantees that the exam for emer-
0 0
j ¼0 j ¼0
  gency patient k is performed before non-emergency patient in
BEk;d;s ≥ E j;d;s −M * 1−m j;k;d;s ∀s∈S; d∈D; j∈f0; …; J g; k∈K
slot j. Constraints (53)–(54) combined with the objective func-
ð55Þ tion of the model further ensure that mj − 1, k, d, s = 1 for the
BEk;d;s ≥ ET k;d;s þ T prep ∀s∈S; d∈D; k∈K ð56Þ smallest j value such that Bj, d, s − ETk, d, s can be positive.
When the actual exam start time can be earlier than the emer-
BEk;d;s ≥ EEk−1;d;s ∀s∈S; d∈D; k∈Knf1g ð57Þ
gency patient arrival time, the objective function, which min-
EEk;d;s ¼ BE k;d;s þ ProcEk;d;s ∀s∈S; d∈D; k∈K ð58Þ imizes the non-emergency patient waiting time, machine idle
m j;k;d;s ∈f0; 1g ∀s∈S; d∈D; j∈f0; …; J g; k∈K ð59Þ time and the number of inpatient cancellations, also prevents
the situation where the non-emergency patient’s exam start
Stochastic programming for outpatient scheduling with flexible inpatient exam accommodation 479

Fig. 8 Average number of


emergency patient arrivals for
each hour across the day

time is postponed waiting for an emergency patient. By adding these constraints to Model 1 and Model 2 in the
Therefore, Constraints (53)–(54) guarantee that the emergen- Sect. 5, we are able to optimize the slot size and IPB place-
cy patient exam is performed immediately after the current ment considering the impact of emergency patient arrivals.
exam. In our case study, most of the emergency patients are
Constraints (55)–(58) define the exam start time and end assigned to have their exams performed on MR3 due to its
time for emergency patients. In particular, Constraints (55) larger room size and higher image quality. Therefore, we ap-
ensure that the exam start time is after the exam end time of ply the extended models to MR3 machine. The arrival times
the previous non-emergency patient. Constraints (56) make and procedure durations of the emergency patients are gener-
sure that the patient gets prepared before the exam starts. ated using the arrival time distribution and procedure duration
Constraints (57) guarantee that the start time of an emergency distribution extracted from the real-world data.
patient is not before the end time of the exam of the previous Figure 8 demonstrates the emergency patient arrival pattern
emergency patient. Constraints (58) define the exam end time across the day. The majority of emergency patients comes in
to be the sum of the exam start time and the procedure dura- the afternoon, especially after 4pm. In order to generate the
tion of an emergency patient. Constraints (59) ensure that mj, k, emergency patient arrival times for the optimization model,
d, s variables are binary. Constraints (60) are the non- we first generate the numbers of emergency patients arriving
negativity constraints. at each hour of the day using Poisson distribution. Then, the
To tackle the variability in emergency patient volumes exact arrival time in that hour is randomly generated using
across different scenarios, we set K to be the largest number Uniform distribution.
of emergency patients across all scenarios and all days of the The results for the extended versions of both optimization
week. For the scenarios where the number of emergency pa- models, Model 1 and Model 2, are presented in Table 14. We
tients is less than K, we assign a large positive value (but found that the solutions for both models are very similar com-
smaller than M) to the arrival times of all remaining pared to the original solutions presented in Tables 7 and 10 in
(imaginary) patients so that these imaginary emergency pa- Sect. 6. The only differences occur in Model 2 solutions where
tients will have no impact on the operations of non- the slot size changes from 45 to 50 min and IPB placement
emergency patients. changes slightly from 4, 6, 8, 11, 13, 16 to 4, 6, 8, 11, 13, 15.
Under the same timetable, the waiting time is usually 29%
higher while the idle time is 25% lower when explicitly

Table 14 Results for the current timetable, model 1, and model 2, with and without accounting for emergency patient arrivals for MR3 with same
schedule across the week

Approach Timetable Slot size IPB Waiting time Idle time Total cost

With emergency patients Current timetable 60 8 9 14 15 16 17 31 199 6244


Model 1 timetable 50 8 9 14 15 16 17 41 100 5691
Model 2 timetable 50 4 6 8 11 13 16 33 116 5163
Without emergency patients Current timetable 60 8 9 14 15 16 17 24 243 6235
Model 1 timetable 50 8 9 14 15 16 17 33 127 5240
Model 2 timetable 45 4 6 8 11 13 15 30 97 4582
480 Sun Y. et al.

accounting for emergency patients compared to the original sequencing rule in terms of total cost and average patient
results. Even though the waiting times and idle times deviate waiting times as well.
from the original results, the minor changes in optimal sched- Third, we found that even though the emergency patients
ules themselves show the robustness of the original results to do exert a disruptive impact on the normal routine of a radi-
the impacts of different ways of modeling the emergency pa- ology department, they had little impact on the schedule opti-
tient arrivals. mization model’s solution. The results showed that under the
same timetable, both waiting time and machine idle time de-
viate more than 25% due to the disruptions caused by the
10 Conclusion emergency patients. However, the scheduling strategies them-
selves changed little when explicitly accounting for the emer-
This paper addresses the multi-class patient appointment gency patient visits. It shows the robustness of the proposed
scheduling problem where the exams of one class of patients solutions and methods, especially since the emergency pa-
are more likely to get cancelled/rescheduled than another. It tients constitute a relatively small fraction of the total number
provides useful tools and several insights into multi-class pa- of performed exams.
tient scheduling and contributes to the healthcare scheduling There are also some important limitations of the optimiza-
literature by effectively addressing, for the first time, a com- tion analysis in this paper, though many of these are partly
monly used inpatient accommodation strategy at mid-sized overcome via the simulation analysis. In particular, the opti-
hospitals. mization model only solves a relaxed version of the actual
First, stochastic programming models are formulated for problem by simplifying patient activities, patient movements
patient scheduling under flexible inpatient exam accommoda- from one room to another, the interactions among medical
tion. Inpatient exam accommodation and cancellation are staff, and the use of hospital facilities. It simplifies the coor-
common among mid-sized hospitals where inpatient and out- dination among different machines and technologists. Patients
patient exams are scheduled in the same department. Multi- of different emergency levels are also not taken into account
class patient scheduling problems are not well investigated explicitly. Future research studies may be able to expand on
using stochastic programming in the previous literature. In this our research by addressing some of these limitations by more
paper, we provided optimization models to incorporate flexi- sophisticated stochastic programming models, robust optimi-
ble inpatient accommodations. We also extended the model to zation models, or simulation-based optimization methods.
explicitly account for the emergency patients. The simulation
results show that, by optimizing slot sizes, we are able to
reduce the total cost per week by around 11.6%. If optimizing
slot size and IPB placement simultaneously, we can further
References
reduce the total cost per week by an additional 12.6%. The 1. Ahmadi-Javid A, Jalali Z, Klassen KJ (2017) Outpatient appoint-
MR modality manager in our case study decided to change the ment systems in healthcare: a review of optimization studies. Eur J
slot size from 45 to 60 min for MR4 in practice, as recom- Oper Res 258(1):3–34. https://doi.org/10.1016/j.ejor.2016.06.064
mended by us based on some of our results in Table 8. 2. Begen MA, Queyranne M (2011) Appointment scheduling with
Depending on the outcome of this initial change, additional discrete random durations. Math Oper Res 36(2):240–257. https://
doi.org/10.1287/moor.1110.0489
changes recommended based on the research presented in this 3. Begen MA, Levi R, Queyranne M (2012) Technical note – a
paper are likely to be implemented in near future. Multi- sampling-based approach to appointment scheduling. Operations
objective methods have also been deployed to provide a Research 60(3):675–681 Retrieved from JSTOR
Pareto frontier of patient waiting time and machine idle time, 4. Berg B, Denton B, Erdogan S, Rohleder T, Huschka T (2014)
Optimal booking and scheduling in outpatient procedure centers.
enabling the methods to be generalized to other medical cen-
Retrieved from https://www.sciencedirect.com/science/article/pii/
ters where these tradeoff priorities may be somewhat different. S0305054814000987. Accessed 29 Oct 2020.
Second, ALTER variant sequencing rule was found to pro- 5. Bhattacharjee P, Ray PK (2016) Simulation modelling and analysis
vide the best performance when the optimization tools are not of appointment system performance for multiple classes of patients
available. Due to the lack of optimization resources, many in a hospital: a case study. Operations Research for Health Care 8:
71–84. https://doi.org/10.1016/j.orhc.2015.07.005
hospitals deploy commonly used sequencing rules like
6. Burnham KP, Anderson DR (2002) Model selection and
IPBEG, OPBEG, and ALTER for patient scheduling. When multimodel inference: a practical information-theoretic approach,
considering the inpatient accommodation, solutions from op- 2nd edn. Springer-Verlag, New York
timization methods were found to employ similar IPB place- 7. Cayirli T, Veral E, Rosen H (2008) Assessment of patient classifi-
ment as an ALTER variant sequencing rule, which evenly cation in appointment system design. Prod Oper Manag 17(3):338–
353. https://doi.org/10.3401/poms.1080.0031
distributes the IPBs across the day. Moreover, the perfor- 8. Deb K, Pratap A, Agarwal S, Meyarivan T (2002) A fast and elitist
mances of IPBEG, OPBEG, and the ALTER variant were multiobjective genetic algorithm: NSGA-II. IEEE Trans Evol
evaluated supporting the superiority of ALTER variant Comput 6(2):182–197
Stochastic programming for outpatient scheduling with flexible inpatient exam accommodation 481

9. Denton B, Gupta D (2003) A sequential bounding approach for approach. Prod Oper Manag 18(4):447–458. https://doi.org/10.
optimal appointment scheduling. IIE Trans 35(11):1003–1016. 1111/j.1937-5956.2009.01021.x
https://doi.org/10.1080/07408170304395 23. Klassen KJ, Yoogalingam R (2014) Strategies for appointment pol-
10. Epic (n.d.). https://www.epic.com/ icy design with patient unpunctuality. Decis Sci 45:881–911.
11. Forest, W (2018) MRI scan volume drops in 2017, but new pur- https://doi.org/10.1111/deci.12091
chases planned. https://www.auntminnie.com/index.aspx?sec= 24. Klassen KJ, Yoogalingam R (2019) Appointment scheduling in
ser&sub=def&pag=dis&ItemID=119720 multi-stage outpatient clinics. Health Care Manag Sci 22:229–
12. Fu MC (2002) Feature article: optimization for simulation: theory 244. https://doi.org/10.1007/s10729-018-9434-x
vs. practice. INFORMS J Comput 14(3):192–215. https://doi.org/ 25. Lal TM, Roh T and Huschka T (2015) Simulation based optimiza-
10.1287/ijoc.14.3.192.113 tion: applications in healthcare. 2015 winter simulation conference
13. Ge D, Wan G, Wang Z, Zhang J (2013) A note on appointment (WSC), pp. 1261–1271
scheduling with piecewise linear cost functions. Math Oper Res 26. Mancilla C, Storer R (2012) A sample average approximation ap-
39(4):1244–1251. https://doi.org/10.1287/moor.2013.0631 proach to stochastic appointment sequencing and scheduling. IIE
14. GLPK version 4.65. (2018). Retrieved from https://www.gnu.org/ Trans 44(8):655–670. https://doi.org/10.1080/0740817X.2011.
software/glpk/ 635174
15. Ho C-J, Lau H-S (1992) Minimizing total cost in scheduling out- 27. Mercer A (1960) A queueing problem in which the arrival times of
patient appointments. Manag Sci 38(12):1750–1764. https://doi. the customers are scheduled. J R Stat Soc Series B (Methodol)
org/10.1287/mnsc.38.12.1750 22(1):108–113 Retrieved from JSTOR
16. Ho C-J, Lau H-S (1999) Evaluating the impact of operating condi- 28. Michael M, Schaffer SD, Egan PL, Little BB, Pritchard PS (2013)
tions on the performance of appointment scheduling rules in service Improving wait times and patient satisfaction in primary care. J
systems. Eur J Oper Res 112(3):542–553. https://doi.org/10.1016/ Healthc Qual 35(2):50–60. https://doi.org/10.1111/jhq.12004
S0377-2217(97)00393-7 29. Nordgren WB (2003) Flexsim simulation environment, published
17. Jansson B (1966) Choosing a good appointment system – a study of in the proceedings of winter simulation conference. IEEE, Phoenix
queues of the type (D, M, 1). Oper Res 14:292–312. https://doi.org/ 30. Patrick J, Puterman ML (2007) Improving resource utilization for
10.1287/opre.14.2.292 diagnostic services through flexible inpatient scheduling: a method
18. Katre AN (2014) Assessment of the correlation between appoint- for improving resource utilization. J Oper Res Soc 58(2):235–245.
ment scheduling and patient satisfaction in a pediatric dental setup. https://doi.org/10.1057/palgrave.jors.2602242
Int J Dent 2014:1–7. https://doi.org/10.1155/2014/453237 31. Sabrai F, Daganzo CF (1989) Approximate expressions for queue-
19. Kim, S, Pasupathy, R, and Henderson, SG (2015) A guide to sam- ing systems with scheduled arrivals and established service order.
ple average approximation. In: Fu MC (ed) Handbook of simulation Transp Sci 23(3):159–165 Retrieved from JSTOR
optimization. https://doi.org/10.1007/978-1-4939-1384-8_8, (pp. 32. Sun, J, Lin, Q, Zhao, P, Zhang, Q, Xu, K, Chen, H, Hu, CJ, Stuntz,
207–243) M, Li, Hong, and Liu, Y (2017) Reducing waiting time and raising
20. Klassen KJ, Rohleder TR (1996) Scheduling outpatient appoint- outpatient satisfaction in a Chinese public tertiary general hospital-
ments in a dynamic environment. J Oper Manag 14(2):83–101. an interrupted time series study. BMC Publ Health 17. https://doi.
https://doi.org/10.1016/0272-6963(95)00044-5 org/10.1186/s12889-017-4667-z
21. Klassen KJ, Rohleder TR (2004) Outpatient appointment schedul- 33. Wang PP (1997) Optimally scheduling N customer arrival times for
ing with urgent clients in a dynamic, multi-period environment. Int a single-server system. Comput Oper Res 24(8):703–716. https://
J Serv Ind Manag 15(2):167–186. https://doi.org/10.1108/ doi.org/10.1016/S0305-0548(96)00093-7
09564230410532493
22. Klassen KJ, Yoogalingam R (2009) Improving performance in out- Publisher’s note Springer Nature remains neutral with regard to jurisdic-
patient appointment services with a simulation optimization tional claims in published maps and institutional affiliations.
Health Care Management Science is a copyright of Springer, 2021. All Rights Reserved.

You might also like