1. University of Melbourne
Bringing Quality to the Healthcare Delivery
Process
by
Ashwani Kumar
Under the supervision of
Prof. Peter Taylor and Dr. Mark Fackrell
A thesis submitted in partial fulfillment for the
degree of Master of Science
in the
Graduate School of Science
School of Mathematics and Statistics
October 2015
2.
3. Declaration of Authorship
I, Ashwani Kumar, declare that this thesis titled, ‘Bringing Quality to the Healthcare Delivery
Process’ and the work presented in it are my own. I confirm that:
This work was done wholly or mainly while in candidature for Master of Science degree at
this University.
Where any part of this thesis has previously been submitted for a degree or any other quali-
fication at this University or any other institution, this has been clearly stated.
Where I have consulted the published work of others, this is always clearly attributed.
Where I have quoted from the work of others, the source is always given. With the exception
of such quotations, this thesis is entirely my own work.
I have acknowledged all main sources of help.
Where the thesis is based on work done by myself jointly with others, I have made clear
exactly what was done by others and what I have contributed myself.
Signed:
Date:
iii
4. Abstract
Demand for healthcare services is growing rapidly in Australia, and rising healthcare expenditure
is increasing pressure on sustainability of the government funded healthcare system. To keep up
with the rising demand, we need to bring efficiency into our healthcare system. To make the system
more efficient, we need to be innovative. There are a number of scientific tools which could be used
in the healthcare industry to improve its efficiency. In this thesis we address the problem of how
to apply operations research tools to make the healthcare delivery process more efficient. First,
we will develop some strategies to understand healthcare data, and fit distributions to healthcare
data. Understanding the healthcare data is important in order to characterise the load each patient
brings to the system. Next, we develop a simulation model to analyse the patient flow process in a
surgical suite of a major metropolitan hospital. Using the simulation model we will analyse patient
flow in the surgical suite, and find out causes of sub-optimal patient flow. Next, we develop a
heuristic based elective surgery scheduling scheme to improve the efficiency of the surgical suite.
We will test our scheduling scheme by using the simulation model, and will analyse patient flow after
implementing the new scheduling scheme. Finally, we will demonstrate the usefulness of operations
research tools in improving the efficiency of the surgical suite.
5. Acknowledgements
I would like to extend my sincere gratitude to my both supervisors Prof Peter Taylor and Dr Mark
Fackrell for their tireless support over the past one and half years. I am extremely thankful to both
of them for not only supervising me but also helping me a lot in improving my language skills.
Thanks also go to the hospital staff who helped me in understanding the healthcare delivery pro-
cess thoroughly. I am also grateful to them for providing data, and answering all the queries about
the patient flow process. Such a deep understanding of the process was impossible without their
extended support.
I would also thank all the other academic staff in the mathematics department who taught me
knowledge and imparted me skills to carry out the rigorous mathematical analysis of such a com-
plex physical process.
Lastly, I would like to thank all my family members, friends, and the University of Melbourne staff
members to let me have the chance to dwell into a life where I can exercise my true potential.
v
8. Contents viii
2.10 Holm’s Correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3 Fitting Distributions to the Length of Stay Data 21
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2 Data Cleaning and Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.3 Fitting Probability Distributions to the LoS Data . . . . . . . . . . . . . . . . . . . . 27
3.3.1 Parameter estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.3.2 The best fitting model for the LoS data . . . . . . . . . . . . . . . . . . . . . 28
3.3.2.1 The best fit model for the LoS in the ICU . . . . . . . . . . . . . . . 28
3.3.2.2 The best fit model for the LoS in the ward . . . . . . . . . . . . . . 31
3.3.3 Model validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.4 Final Model for the LoS Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.4.1 Final model for the LoS in the ICU . . . . . . . . . . . . . . . . . . . . . . . 34
3.4.2 Final model for the LoS data in the ward . . . . . . . . . . . . . . . . . . . . 36
3.5 Classification of Patients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.6 Conclusion and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4 A Simulation Model to Assess Patient Flow 45
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.2 Issues in Accomplishing Patient Flow Assessments . . . . . . . . . . . . . . . . . . . 46
4.2.1 Stochastic nature of the healthcare delivery process . . . . . . . . . . . . . . 46
4.2.2 Reduced functionality during non-working hours . . . . . . . . . . . . . . . . 48
4.3 Scope of Appraisal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.4 A Simulation Model to Assess Patient Flow . . . . . . . . . . . . . . . . . . . . . . . 49
4.4.1 Description of the simulation model . . . . . . . . . . . . . . . . . . . . . . . 50
4.4.2 Assumptions of the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.5 Computing the Optimal Capacity of the Surgical Suite by Using Simulation Model . 52
4.6 Analysing the Surgical Suite by Using the Simulation Model . . . . . . . . . . . . . . 58
4.6.1 Analysing the interaction between the ICU and the ward . . . . . . . . . . . 58
4.6.2 Analysing the role of the stochastic LoS . . . . . . . . . . . . . . . . . . . . . 59
4.6.3 Analysing the role of the reduced functionality . . . . . . . . . . . . . . . . . 59
4.7 Conclusion and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5 Smoothing Patient Flow in the ICU 67
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.2 Treating all the Patients in the ICU from Various Surgical Categories as One Cate-
gory Patients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5.3 Computing the Required ICU Capacity Before Smoothing . . . . . . . . . . . . . . . 69
5.4 Analysing the Patient Flow in the Surgical Suite . . . . . . . . . . . . . . . . . . . . 72
5.4.1 Analysing the role of the reduced functionality . . . . . . . . . . . . . . . . . 72
5.5 Smoothing Patient Flow in the Surgical Suite by Using Better Scheduling Scheme . . 78
5.6 Analysing the Patient Flow After Smoothing . . . . . . . . . . . . . . . . . . . . . . 81
5.7 Conclusion and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
6 Conclusion and Discussion 89
6.1 Results and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
6.2 Recommendations for the Hospital Staff . . . . . . . . . . . . . . . . . . . . . . . . . 90
9. Contents ix
6.3 Scope of Further Research . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
A Sample Code for Simulation of Patient Flow Process in a Surgical Suite 93
Bibliography 95
10.
11. List of Figures
2.1 Phase structure of a Coxian distribution . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1 Variation in the patients’ LoS with respect to the surgery type they underwent . . . 23
3.2 The Q-Q plot to check the normality assumption of the residuals from ANOVA test 24
3.3 Variation in the patients’ LoS with respect to their source of admission . . . . . . . . 25
3.4 Variation in the patients’ LoS with respect to the surgery type they underwent . . . 26
3.5 Histogram of the LoS in the ICU data along with PDF of the fitted model . . . . . 30
3.6 Q-Q plot of the LoS in the ICU and the simulated data from fitted distribution . . . 30
3.7 Histogram of the LoS in the ward data along with PDF of the 9-phase Coxian
distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.8 Q-Q plot of the simulated data from the fitted model and the ward LoS data . . . . 32
3.9 Histogram of the LoS in the ward data with 6 hour bin size . . . . . . . . . . . . . . 33
3.10 Q-Q plot of the approximated sample data and simulated data from the fitted model 35
3.11 Histogram of the approximated clinically required LoS in the ICU data along with
PDF of the fitted model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.12 Histogram of the approximated clinically required LoS in the ward data along with
PDF of the fitted model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.13 Q-Q plot of the approximated clinically required sample data and the data simulated
from the fitted Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.1 Patient flow chart in a surgical suite . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.2 The histogram of the patients’ waiting time data for an ICU bed obtained from the
simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.3 The histogram of the patients’ waiting time data for a ward bed obtained from the
simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.4 Histograms of number of occupants in the ward data obtained from simulation . . . 63
4.5 Histograms of the number of occupants in the ICU data obtained from simulation . 65
5.1 The waiting time distribution of the patients for an ICU bed . . . . . . . . . . . . . 71
5.2 The waiting time distribution of the patients for a ward bed . . . . . . . . . . . . . . 71
5.3 Histograms of the number of occupants in the ward at 4:00 am on each day of the
week . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5.4 Histograms of the number of occupants in the ICU at 4:00 am on each day of the week 77
5.5 Waiting time distribution of the patients for an ICU bed . . . . . . . . . . . . . . . . 80
5.6 Waiting time distribution of the patients for a Ward bed . . . . . . . . . . . . . . . . 80
5.7 Histograms of the number of occupants in the ward at 4:00 am on each day of the
week . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.8 Histograms of the number of occupants in the ICU at 4:00 am on each day of the week 85
xi
12.
13. List of Tables
3.1 ANOVA test results for the LoS in different surgical ward’s data . . . . . . . . . . . 23
3.2 Pairwise comparison of various LoS data groups using t-test for independent samples 25
3.3 Variation in descriptive statistics of patients’ LoS with respect to their source of
admission into the hospital . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.4 The computed parameters of various distributions fitted and p-vale of the KS test . 27
3.5 ANOVA test results for the LoS in the ICU data . . . . . . . . . . . . . . . . . . . . 29
3.6 Log-likelihood values of various Coxian distributions fitted to the ICU data . . . . . 29
3.7 Log-likelihood values of various Coxian distributions fitted to the ward data . . . . . 31
3.8 Log-likelihood values of fitted Coxian distributions to the approximated clinically
required LoS in the ICU data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.9 Log-likelihood values of fitted Coxian distributions to the approximated clinically
required LoS in the ward data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.10 Absorption probability table for the LoS data . . . . . . . . . . . . . . . . . . . . . . 41
4.1 Values of various efficiency and timeliness measures with respect to varying capacity
of the ICU and the ward. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.2 Values of various service standard and efficiency measures with respect to varying
capacity of the ICU and the ward. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.3 Descriptive statistics of the number of occupants in the ward at 4:00 am on each day
of the week . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.4 Descriptive statistics of the number of occupants in the ICU at 4:00 am on each day
of the week . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.1 Values of various service standards and functional efficiency measures with respect
to varying capacity of the ICU and ward. . . . . . . . . . . . . . . . . . . . . . . . . 70
5.2 Descriptive statistics of the number of occupants in the ward data on each day of
the week . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.3 Descriptive statistics of the number of occupants in the ICU data on each day of the
week . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
5.4 Values of various service standards and functional efficiency measures with respect
to varying capacity of the ICU and ward. . . . . . . . . . . . . . . . . . . . . . . . . 79
5.5 Descriptive statistics of the number of occupants in the ward data on each day of
the week after smooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.6 Descriptive statistics of the number of occupants in the ICU data on each day of the
week. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
xiii
14.
15. Chapter 1
Introduction
1.1 The Healthcare System in Australia
The healthcare system in Australia is a complex mix of providers which include private and public
health-care service providers. Service providers include clinics, private medical practitioners, private
and public hospitals, other healthcare professionals such as physiotherapists, traditional doctors,
and other healthcare facilities such as aged care. The consumers of the Australian healthcare system
include a diverse range of people such as Australian residents, oversee visitors, and asylum seekers.
The primary goal of the healthcare system in Australia is to deliver excellent healthcare services
to all Australians regardless of their paying capacity. The healthcare system in Australia could be
further divided into two major parts.
The primary healthcare system mainly includes general practitioners and clinics, and is defined
as a simple system. Typically the primary healthcare system is the patient’s first point of contact,
and it is a gateway to the secondary healthcare system. Individuals through assessment and referrals
are directed from the primary care services to the secondary care services and other healthcare
services.
The secondary healthcare system mainly includes the services provided by hospitals and spe-
cialist medical practices. Hospitals are an integrated system of many complex systems. Each
department in a hospital is a complex system. For example, a surgical suite in a hospital consists
of many interdependent facilities such as surgery rooms, the ICU, wards, and is the most complex
system.
The healthcare system is funded by many agencies such as the Federal Government, state govern-
ments, and individuals through private insurance and their own contributions. Funding for services
is obtained by multiple revenue sources such as the Medicare Levy, income tax, and insurance.
1
16. Chapter 1. Introduction 2
Almost 70% of the total health expenditure in Australia is funded by government, with the Federal
Government contributing two thirds and state, territory and local governments contributing one
third, see [18].
1.2 Demography of Australia
The Australian population is growing quickly due to natural increase (there are more births than
deaths) and migration, see [18]. During recent decades the population growth has been stronger
among older age groups than younger age groups. According to the Australian Institute of Health
and Welfare, between 1973 and 2013, the number of people aged 65 and over increased threefold
from 1.1 million to 3.3 million, and the number of people aged 85 and over increased sixfold from
73,100 to 439,600 [18]. However, over the same period, the number of children and the young people
aged below 25 increased by just 22%, that is, from 6.1 million to 7.5 million, see [18].
From the above data it is clear that the demography of Australia is changing and the Australian
older population is growing much faster than the younger population. The healthcare expenditure
in Australia is growing even faster than population growth. In 2011-12, healthcare spending in
Australia had been estimated to be AUD 140.2 billion, approximately 9.5% of GDP, see [18].
There are many factors which are driving healthcare costs upward in Australia including an ageing
population and other societal changes. It is a fact that technology is improving life expectancy,
however, the cost of the marginal life expectancy is very high. According to Berhanu and Warner,
an individual usually spends half of their life-time expenditure on healthcare during the senior
years, and for survivors to age 85, more than one-third of their lifetime expenditures will accrue in
their remaining years [1].
1.3 Need for Improvement
According to the discussion in Section 1.2, we know that demand for healthcare services is growing
rapidly. However, based on the current funding scenario, it is difficult to expand the capacity of
the healthcare industry in Australia. The question arises of how to keep up with demand. The
only possible solution is innovation. We have to be innovative and we need to bring quality to the
healthcare delivery process. This means we should deliver high quality services at low cost. We
should use the best available techniques for needy patients, however, we should neither under-use
nor over-use the technology. In the next section, we will discuss in detail that how to improve the
healthcare industry.
17. Chapter 1. Introduction 3
1.4 Bringing Quality to the Healthcare Delivery
Quality is desirable in any industry, and the healthcare industry is not an exception. In the service
industry quality is mainly perceived by customer satisfaction, however, in healthcare industry
quality has a much wider definition. To achieve the goal of quality in the healthcare delivery
process managers need to improve on each dimension of the quality.
An Ideal Healthcare System
As we know that the healthcare system is a complex system, and many studies have been conducted
to understand this system. Different scholars and researchers give different recommendations to
make it perfect. According to the Institute for Healthcare Improvement (IHI), we need to improve
on these six dimensions to make our healthcare system an ideal healthcare system [19].
• Safety: We should make our healthcare system as safe as possible. In the context of the
healthcare industry, being safe means not harming people without care.
• Timeliness: Timeliness means that the needy patients can access the required services with-
out delay. Timeliness in delivering services is extremely desirable and important. We are all
aware of long waiting times required to access desired healthcare services. In an ideal health-
care system the waiting time should be as short as possible without compromising patient
care.
• Effectiveness: In the healthcare industry being effective means that we neither under-use
nor overuse the technology. It also means that we use the best available technology for the
needy patients. For example, by overusing we mean that we should not use too much medicine
for children which actually weakens their immune system, and by underusing we mean that
needy patients should not be deprived of the best available technology.
• Efficiency: Being efficient in delivering healthcare services means avoiding wastage of any
resources. Wastage can occur in many forms. For example, if a healthcare facility rarely
reaches capacity then maintaining that capacity causes wastage. Moreover, overusing the
available resources is another form of wastage.
• Equitable: By being equitable means that all needy people have equal access to the health-
care services irrespective of their age, colour, race, gender, or paying capacity.
• Patient centred: Patients participate actively in making decisions on their own care and
their individual needs are being respected.
18. Chapter 1. Introduction 4
The broad aim of our research study is to help with the effort to turn the Australian healthcare
system into an ideal healthcare system. However, the scope of our research is limited to working
on mainly two dimensions of an ideal healthcare system which are efficiency and timeliness. In the
rest of this thesis we will work on understanding the complex healthcare system, and improving its
efficiency and timeliness.
1.5 How to make a system timely
A system is called stochastic if there is randomness in the process carried out by the system. For
example, in the case of the healthcare industry the arrival process and the service time for most
of the services offered is random which makes the healthcare system stochastic. In the case of
stochastic systems poor understanding of the system makes it difficult to operate it optimally,
and long delays in acquiring required services are the result of sub-optimal management. There is
always a trade-off between efficiency and timeliness of the system. One can be improved on at the
expense of the other. However, application of management science is helpful in improving both.
For a simple deterministic system it is possible to achieve 100% server utilisation. However, in
the case of a stochastic system, it is impossible to achieve 100% server utilisation while keeping
the waiting times within limits. As it is expensive to operate an extremely inefficient system, we
need to compromise with timeliness. From this fact we understand that the stochasticity makes
the system less timely. The higher the stochasticity in the system, the less timely it will be. So to
improve the timeliness of the system we need to decrease the stochasticity of the process. In other
words, we need to make the process more deterministic or predictable.
For reducing the randomness of a process, we need to analyse and understand the characteristics
of the randomness. For example, in the case of healthcare services, we need to analyse the charac-
teristics of the stochastic length of stay and the stochastic arrival process. There is a distribution
associated with every random variable. If we know the distribution of a random variable, we can
understand all of its characteristics. Although patient’s length of stay in the healthcare facilities
is random, some of the variation in the length of stay is predictable, see Litvak [12]. In Chapter
3, first, we will eliminate the predictable variability from the length of stay. Next, we will develop
some techniques to fit distributions to healthcare length of stay data. Using these fitted distribu-
tions we will understand the characteristics of the stochasticity in the system, and we will introduce
some techniques to classify the random service time data into lower variability groups.
19. Chapter 1. Introduction 5
1.6 What Makes a System Inefficient
In general wastage makes a system inefficient, and wastage at any stage in any form should be
eliminated to bring efficiency in a system. As discussed in Section 1.4, sub-optimal uses of any
resource or service cause wastage. For example, employing more staff than required causes wastage.
However, in order to find out the root cause of wastage, we need to analyse the system thoroughly.
Wastage could occur due to many reasons. For example, in the case of interdependent facilities
limited capacity at one facility may be a reason for wastage at other facilities. In a properly designed
system sub-optimal management of the system may be the cause of wastage. The key point is that
the wastage of any resources in any form makes a system inefficient, and should be eliminated.
Usually when a system faces capacity shortage, managers tend to increase the capacity which results
in increased wastage. For example, when patients face long delays in accessing the required services,
management tends to increase the workforce. However, increasing workforce beyond a certain limit
reduces productivity. In economics the phenomenon is defined as a principle of diminishing marginal
productivity. According to this principle the workforce should be maintained at a level at which
they are the most productive. Increasing workforce beyond that level results in reduced output per
capita due to an increase in wastage [20]. However, improving the productivity of the workforce
through new technology, knowledge and skills is helpful.
In a complex system eliminating wastage is not an easy task. We should identify all the forms of
wastage of each system’s resources, and we need to have a deep understanding of the system to
do so. In order to develop a sound evidence-based solution to a complex problem, mathematical
modelling is necessary, see [11]. However, analysing a complex system analytically could be very
difficult or even intractable without making simplifying assumptions. A surgical suite of a hospital
has many interdependent components, and it is an integrated system of many complex systems.
To accomplish a patient’s surgical treatment successfully, many micro systems work together. For
example, consider a patient who needs to be transferred to the ICU after finishing surgery. To
accomplish this task at least three teams have to work in collaboration that is, the ICU management
team, the operation theatre team and the surgery scheduling team. We need some powerful tools
to study such complicated systems, and application of operations research (OR) tools could be
promising.
OR tools are widely used in the manufacturing industry for managing it efficiently. However, in the
case of the healthcare industry, application of OR tools is less common. One reason is the sensitive
nature of the services. However, the major reason is limited research and development in this area.
In this research project we will apply OR tools for bringing efficiency to the healthcare industry. In
Chapter 4 we will develop a simulation model for analysing a surgical suite, and identifying wastage
20. Chapter 1. Introduction 6
of services in it. Subsequently, in Chapter 5 we will demonstrate the application of the simulation
model in improving efficiency by decreasing an identified wastage.
1.7 Chapter Outline
In this research project we are improving patient flow in the surgical suite of a major metropolitan
hospital. First, we will analyse patient flow in the surgical suite with the help of a simulation model,
and we will determine the possible causes of inefficiency and untimeliness in the system. Next we
will develop some heuristics to smooth the patient flow. Finally, we will implement the developed
heuristics, and compare the performance of the surgical suite before and after smoothing.
In Chapter 2 we will briefly review some mathematical preliminaries that will be required through-
out the thesis. We will discuss all the mathematical results, algorithms, and theorems used in our
research work. This will help non-mathematical background readers to understand the rest of the
work thoroughly.
In Chapter 3 we will fit Coxian distributions to the healthcare length of stay data. As we mentioned
earlier, the first step to improve timeliness is to understand the stochasticity of the system. We will
analyse the arrival process and the care delivery process of all the stages in the surgical suite. Since
the length of stay at each care delivery step of the surgical suite is random, we need to understand
the characteristics of the randomness in the length of stay. So we will fit distributions to the length
of stay data at each care step of the surgical suite. After fitting distributions next we need to
work on reducing randomness. So we will also develop some techniques to distribute service time
data into lower variability groups. By using this technique we will classify the patients into lower
variability length of stay groups.
The major reason for understanding the characteristics of the randomness is to develop an ability
to generate similar data, and use the generated data for further experimentation. The ability to
generate a data set with the same randomness enable us to use digital prototypes of the real life
process for analysing complex systems. In Chapter 4, we will use the fitted distributions to simulate
the desired numbers of the length of stay data in each facility such as operating rooms, the ICU
and the ward. We will also develop a simulation model, a digital prototype of the surgical suite, to
mimic the patient flow process in a surgical suite.
By using the simulation model we will collect various data such as the patients’ wait time, the
number of occupants in each facility, the number of patients waiting for an ICU or a ward bed,
and the length of stay of each patient in the ICU and the ward. Next, we will use these data to
compute some important efficiency and timeliness measures at each care step. We will also analyse
21. Chapter 1. Introduction 7
how the quality measures vary with varying capacity of each care step. After all these analyses we
will compute the optimal capacity of each care step in the surgical suite for a given demand.
In Chapter 5, we will analyse the patient flow in the ICU of the surgical suite by using the simulation
model developed in Chapter 4. We will compute the optimal capacity of the ICU based on a given
demand, and figure out possible wastage. Next, we will develop the heuristic based scheduling
method to eliminate wastage. We will also use the patients’ classification developed in Chapter 3
to improve the timeliness of the system. Next, we will compare the performance of the surgical
suite before and after applying the heuristic solutions. We will also demonstrate the usefulness of
the patient classification technique in improving the efficiency and timeliness of the system.
In Chapter 6, we will conclude the thesis. We will provide some recommendations to the hospital
for improving patient flow in the ICU and the cardiothoracic ward. We will also discuss the scope
of further research.
22.
23. Chapter 2
Mathematical Preliminaries
In this chapter we will discuss some mathematical preliminaries that will be required throughout
the thesis. We will discuss theorems, algorithms, and other results that were used in our project to
carry out analysis, and establish results.
2.1 Poisson Process
The Poisson process is a stochastic process widely used in probability theory. It is defined as a
process which counts the number of occurrences of an event in time or space. The Poisson process
is widely used in modelling random events such as the number of typographical errors in one page
of a book, arrival times of customers in a service centre, arrival times of patients to a hospital.
Let Nt be the number of times an event A occurs in a time interval [0, t] where t > 0. Then the
event A is a Poisson process with rate λ > 0, if the the following two conditions are satisfied, see
Borovkov [4].
1. For any t > 0, the stochastic variable Nt ∼ Poisson(λt).
2. Nt has independent increments. That is, for any 0 < t1 < t2 < t3 < t4, Nt2 − Nt1 and
Nt4 − Nt3 are independent.
An important property of the Poisson process is that the inter-arrival times between any two
consecutive occurrences of the event A are independent and identically distributed according to an
exponential distribution with mean 1
λ .
9
24. Chapter 2. Mathematical Preliminaries 10
2.2 Phase-type Distributions
Phase-type (PH) distributions, introduced in 1975 by Neuts [15], are defined as the distribution of
the absorption time of a homogeneous finite-state continuous-time Markov chain. PH distributions
are a versatile class of distributions which are defined on the non-negative real numbers. They are
dense in the class of all distributions defined on the non-negative real numbers and are widely used
in modelling data from a broad range of applications in diverse areas such as survival analysis,
queuing theory, reliability analysis, insurance risk, telecommunications, and healthcare utilisation.
PH distributions are well suited when dealing with non-negative real valued data, and when we
wish to carry out analysis on the original data without truncating or transforming it. According
to Fackrell [9], PH distributions have become popular for a number of reasons. First, they can ap-
proximate any non-negative distribution arbitrarily closely, although the number of phases required
may be large. Second, because of the underlying probabilistic interpretation as a continuous-time
Markov chain, modelling using PH distributions makes the model more intuitive than models using
general distributions. Lastly, the use of PH distributions in stochastic models facilitates the algo-
rithmic tractability of techniques used to estimate the model parameters. Quantities of interest,
such as the moments, and the distribution and density functions, can be given simply in terms of
the initial phase distribution α, and the infinitesimal generator Q of the underlying Markov chain.
2.2.1 Continuous Phase-type Distributions
Consider a continuous-time Markov chain (CTMC) {Xt}t≥0 defined on a finite set of transient
states S = {1, 2, . . . , n} and an absorbing state A = {n + 1}. Let the CTMC have an initial phase
probability distribution (α, αn+1) = (α1, . . . , αn, αn+1) and the infinitesimal generator Q. Then a
phase-type distribution is defined as the distribution of the lifetime of X.
The infinitesimal generator Q, expressed in partitioned-matrix form, is
Q =
T t
0 0
, (2.1)
see Fackrell [9]. Here, 0 is a 1 × n vector of zeros, t = (t1, t2, . . . , tn) , and T is an n × n transition
rate matrix where for i, j = 1, 2, . . . , n with i = j, Tij ≥ 0 gives the the rate of transition from state
i to state j. For i = 1, ..., n, Tii < 0, and −Tii gives the parameter of the exponential holding time
in state i. Moreover, for i = 1, ..., n, j∈S Tij ≤ Tii, where S = {1, ..., n}{i}, and strict inequality
holds for at least one i. The transition probability Pij from state i to state j for i, j = 1, 2, . . . , n
with i = j, is given by
Pij = −
Tij
Tii
.
25. Chapter 2. Mathematical Preliminaries 11
Furthermore, for i = 1, ..., n, ti gives the transition rate from state i to the absorbing state n + 1.
The vector t can be calculated easily from T as t = −Te where e is n × 1 vector of ones.
Thus, a PH distribution can be represented by (α, T), and the representation is said to have order
n. The component αn+1 = 1 − n
i=1 αi, and is not required to be provided explicitly.
For s ≥ 0, the probability distribution function of a PH distribution with representation (α, T) is
given by
F(s) = 1 − αexp(Ts)e. (2.2)
The corresponding probability density function which is defined for s > 0 is given by
f(s) = −α exp (Ts)Te. (2.3)
The exponential distribution is the simplest example of PH distribution with α = (1) and T = (−λ),
see Fackrell [9]. Other examples are hyperexponential distributions, Earlang distributions, and
Coxian distributions. Next, we will discuss Coxian distributions, a special class of PH distributions.
2.2.2 Coxian Distributions
A Coxian distribution is a special type of PH distribution where the transient states are ordered
according to their rates and transitions are forward flowing with absorption possible from any of
the states. Coxian distributions normally have considerably fewer parameters than general PH
distributions of the same order. The number of parameters in a general PH distribution of order n
is n2 + n − 1. However, in the case of an n-phase Coxian distribution, the number of parameters is
2n−1. So the computational time required to fit an n-phase Coxian distribution is appreciably less
than the time to fit an n-phase general PH distribution. Using Coxian distributions circumvents the
difficulty of estimating too many parameters, and they are also dense in the class of all distributions
defined on the non-negative real numbers. In fact, any PH distribution with an acyclic infinitesimal
generator Q can be represented as a Coxian distribution of the same order.
The phase structure of an n-phase Coxian distribution is illustrated in Figure 2.1. Here µ1, µ2, µ3, . . . , µn
represent the rates of transition of the Markov chain from states {1, 2, 3, . . . , n} to the absorption
state n + 1, and λ1, λ2, . . . , λn−1 are the transition rates of the Markov chain from state 1 to 2,
state 2 to 3, and so on.
The parameters of an n-phase Coxian distribution represented as (α, T) are
α = (1, 0, 0, . . . , 0),
26. Chapter 2. Mathematical Preliminaries 12
Phase1 Phase2 Phase3 Phasen
Phasen+1
- - - - -
@
@@R
@
@@R
@
@@R
@
@@R
λ3λ1 λ2 λn−1
· · · · · ·
µ1 µ2 µ3 µn
Figure 2.1: Phase structure of a Coxian distribution
and
T =
−(λ1 + µ1) λ1 0 · · · 0 0
0 −(λ2 + µ2) λ2 · · · 0 0
...
...
...
...
...
...
0 0 0 · · · −(λn−2 + µn−2) λn−1
0 0 0 · · · 0 −µn
.
2.3 Maximum Likelihood Estimator
Let x be a sample point consisting of n independent and identically distributed (iid) observations
from a population with pdf f(·|θ) where θ = (θ1, θ2, ..., θm) is the parameter of interest. The
likelihood function is given by
L(θ|x) = f(x|θ) =
n
i=1
f(xi|θ). (2.4)
A maximum likelihood estimator (MLE) of a parameter θ for a given sample point x is the value
ˆθ(x) for which the likelihood function attains its maximum as a function of θ, see Cassella and
Berger [5]. That is
ˆθ = argmax
θ
L(θ|x). (2.5)
Since the logarithmic function is monotonic, both the likelihood function and the log-likelihood
function attain their maximum at the same point. Usually, it is easier to compute the point where
the log-likelihood function attains its maximum. Hence, the ˆθ is generally computed from the
log-likelihood function given by
ˆθ = argmax
θ
log L(θ|x). (2.6)
The MLE method is the most commonly used technique for deriving estimators. Although the
method is analytically demanding, it is widely used because of its intuitiveness. The MLE is
27. Chapter 2. Mathematical Preliminaries 13
the parameter point for which the probability of obtaining the observed sample is maximised. It
has some optimality properties which makes it an even better estimator. One such property is
consistency. Consistency means the estimator converges to the actual value of the parameter as
the sample size increases. Under some regularity conditions MLEs are asymptotically consistent.
Another such property is efficiency. An estimator is said to be efficient if it has the minimum
variance among all estimators of the same class. Under some stronger regularity conditions, MLEs
are asymptotically efficient estimators. As the sample size increases the variance of the MLEs
decreases.
The MLE technique has two major limitations. The first limitation is that we need to find the
global maximum of the log likelihood function to obtain the MLE. In many cases finding a global
maximum reduces to a simple calculus exercise, but sometimes the function is complicated, see
Cassella and Berger [5]. The second limitation is the sensitivity of the calculated parameter to
changes in sample data, see Cassella and Berger [5]. Sometimes a slightly different sample may
result in a vastly different MLE particularly when the sample size is small. For such cases the
usage of the MLE is questionable. The first problem could be handled more efficiently by using the
expectation maximisation (EM) algorithm which we will discuss in the next section. However, the
second limitation is unavoidable.
2.4 Expectation Maximisation Algorithm
The EM algorithm is a computational technique to compute MLEs, and it is used when it is
difficult to maximise the likelihood function directly. In this method we augment the observed data
with some latent data and call it the complete data. Augmentation is done in such a way so that
maximising the complete data log-likelihood function is easier than the observed data log-likelihood
function. In the first step we calculate the conditional expectation of the complete data log-
likelihood function conditioned on the observed data. In the second step we maximise the resultant
conditional expectation. The two step procedure is repeated until the parameter estimate converges.
The main idea of the EM algorithm is to replace the original likelihood maximisation with a sequence
of easier likelihood maximisations whose limit is the solution to the original likelihood maximisation,
see Cassella and Berger [5]. The detailed two step procedure is as follows.
• Let Y be the observed data and let g(·|θ) be the pdf of Y for which we want to estimate θ.
• Let Z be the latent data, and X = (Y , Z) be the complete data. Then the complete data
log-likelihood is given by
log f(X|θ) = log g(Y |θ) + log k(Z|Y , θ), (2.7)
28. Chapter 2. Mathematical Preliminaries 14
where
k(Z|Y , θ) =
f(X|θ)
g(Y |θ)
.
• Taking the expectation of both sides of Equation (2.7) with respect to the pdf k(Z|Y =
y, θ = θ ) we get
Q(θ, θ ) = log g(Y |θ) + H(θ, θ ). (2.8)
Here,
Q(θ, θ ) = log f(x|θ)k(z|y, θ )dz, (2.9)
and
H(θ, θ ) = log k(z|y, θ)k(z|y, θ )dz. (2.10)
Here g(Y |θ) is a function of θ, and is independent of z. So when we take expectation of
log g(Y |θ) with respect to k(Z|Y = y, θ = θ ), we will get log g(Y |θ).
EM algorithm:
• Step 1. Start with an appropriate value of θ = θ(0)
.
• Step 2. For the current θ(r)
iterate for r = 1, 2, ...,
– E Step: Compute Q(θ, θ(r)
).
– M Step: Maximise Q(θ, θ(r)
) as a function of θ to obtain θ(r+1)
).
θ(r+1)
= arg max
θ
Q(θ, θ(r)
).
– The iterations continue until |Q(θ(r+1)
, θ(r)
) − Q(θ(r)
, θ(r)
)| ≤ 1 or |θ(r+1)
− θ(r)
| ≤ 2,
where 1, 2 > 0, are prescribed values.
2.5 Metropolis Hastings Algorithm
The Metropolis Hastings algorithm is a Markov chain Monte Carlo (MCMC) method for simulating
a random sample from a given probability distribution. We use this method for simulating a random
sample when the target density f(·) can be evaluated but not easily sampled, see Givens and Hoeting
[10].
29. Chapter 2. Mathematical Preliminaries 15
In this method we start with an initial sample point x(0) selected arbitrarily from the domain of
target density f(·), and we select a proposal distribution g(·|x).
• Start from an initial sample point x(0).
• Repeat for j = 0, 1, 2, 3, ..., N.
• Generate a candidate value x∗ from the proposal distribution g(·|x(j)) and u from Uniform(0, 1).
• If u ≤ α(x∗, x(j)) then set x(j+1) = x∗, else x(j+1) = x(j), where
α(x, x∗
) = min
f(x∗)g(x∗|x)
f(x)g(x|x∗)
, 1 .
• Return the vector X = {x(0), x(1), x(2), ...x(N)}.
Generally g(·|x) can be any probability density function as long as its x support covers that of
target probability distribution f(·). However, a carefully selected transition pdf g(·|x) can increase
the acceptance probability and hence accelerate the simulation. The Markov chain generated by
Metropolis Hastings algorithm needs some time to become stationary. This means a burn in period
is required for the Markov chain to be used as an approximate sample for the target distribution
f(·). So we generate a long sequence of random numbers {x(0), x(1), x(2), ...x(m),...x(m+n)
}, then
discard first m numbers from the sequence, and we use the last n numbers as approximate sample.
Here m and n are problem dependent and are chosen accordingly.
2.6 Statistical Tests for Model Selection
In statistics generally the greater the number of parameters fitted to a model the better the fit
is. However, increasing the number of parameters without limit causes over-fitting. Over-fitting
occurs when a model is excessively complex and it has too many parameters relative to the number
of observations. There are many criteria in statistics that are used to compare maximum likelihood
models. The two most widely used criteria are the Akaike information criterion (AIC) and the
Bayesian information criterion (BIC), see Weisberg [17].
2.6.1 Akaike information criterion
The AIC value of a model is a function of the likelihood value, L, and the number of fitted
parameters k. It is given by
AIC = 2k − 2 log L. (2.11)
30. Chapter 2. Mathematical Preliminaries 16
2.6.2 Bayesian information criterion
Similarly, the BIC value of a model is a function of the likelihood value, L, the number of observa-
tions, m, and the number of fitted parameters k. It is given by
BIC = k log m − 2 log L. (2.12)
So the AIC and BIC values decrease with increasing likelihood value and increase with increasing
number of fitted parameters. The optimal model as per each criterion is the one with the lowest
value.
2.7 Model Validation Tests
The selected model needs to be validated. We use goodness of fit tests to validate the selected
model. For performing a goodness of fit test, we examine the given sample in order to test the null
hypothesis that the sample comes from the model specified. The most widely used model validation
test are the Kolmogorov-Smirnov (KS) goodness of fit test and the Chi-square goodness of fit test.
2.7.1 KS test
KS test is a hypothesis test to assess the goodness of fit of the models to the sample data. In this
test we quantify the maximum distance between the empirical distribution of the sample and the
cumulative distribution function of the fitted model. Under the null hypothesis we assume that the
sample has been obtained from the same distribution and test the hypothesis, see Conover [7].
Suppose we have an iid sample X1, X2, ..., Xn with some unknown distribution F, and we want test
the hypothesis that F is equal to a particular distribution F0. The hypothesis test is given by
H0 : F = F0, H1 : F = F0.
We compute S the empirical distribution function of the iid sample X1, X2, ..., Xn, and the test
statistics T, the greatest vertical distance between the S and F0, that is
T = sup
x∈R
|F0(x) − S(x)|. (2.13)
If the null hypothesis is true then for a large enough n the test statistics T follows a KS distribution.
Otherwise we reject the null hypothesis.
31. Chapter 2. Mathematical Preliminaries 17
2.7.2 Chi square test
The Chi square test is also a hypothesis test to assess the goodness of fit of fitted distributions to
sample data. In this test we divide the data into k bins, and calculate the test statistics T which
is defined as
T =
k
i=1
(Oi − Ei)2
Ei
. (2.14)
Here Oi is the observed frequency for bin i, and Ei is the expected frequency for bin i. The
expected frequency is calculated from the fitted distribution. If the sample data comes from the
fitted distribution then the test statistic T follows a chi-square distribution with k − p degrees of
freedom, where k is number of non empty bins and p is the number of parameters estimated, see
Cassella and Berger [5].
There are some limitations of the chi-square test. First, the test is sensitive to the choice of bin
width, and there is no optimal bin width. Second, the test is not valid for small sample sizes.
Moreover, the expected frequency of each bin needs to be at least five. Since the KS test is more
suitable for our purpose, we will only use the KS test in our analysis.
2.8 Analysis of Variance
The analysis of variance (ANOVA) is the most widely used statistical technique for analysing the
variation in means. In ANOVA we calculate the averages of several populations, and populations
are assumed to be normally distributed. Let us say Yij is a random variable representing the
observation j from population i. Then we assume the mode
Yij = θi + ij, i = 1, ..., k, j = 1..., ni, (2.15)
where θi are the unknown parameters, and the ij are the error terms, see Cassella and Berger [5].
The ANOVA test is a hypothesis test. In the null hypothesis we assume that all the θi for i = 1, ..., k
are equal, and in the alternative hypothesis at least one θi is different from the others.
H0 : θ1 = θ2 = ... = θk = θ,
H1 : θi = θ, for at least one i ∈ 1...k.
ANOVA assumptions
• Error terms are independent, and are normally distributed.
32. Chapter 2. Mathematical Preliminaries 18
• Error terms have equal variance.
Generally, when the data deviates badly from ANOVA assumptions, we should consider applying
transformations to the data, see Cassella and Berger [5]. The normality assumption is important
to make meaningful inference about the equality of means.
2.9 Student’s t-Test
The t-test is a hypothesis test used to examine the statistical equality of two populations averages.
Under the null hypothesis we assume that two populations have equal means, and if the null
hypothesis is supported then the test statistic follows a t-distribution. The test statistic T is given
by
T =
¯X1 − ¯X2
S ¯X1− ¯X2
, (2.16)
where, ¯X1 and ¯X2 are the sample means of the two populations, and
S ¯X1− ¯X2
=
s2
1
n1
+
s2
2
n2
.
Here s1 and s2 are the sample variances, and n1 and n2 are the numbers of observations in sample
one and two respectively. The test statistics T given here is based on assumption that the two
populations has unequal variance.
2.10 Holm’s Correction
When we do multiple hypothesis testing, we need to adjust the p-values of the test results to control
the error rate. For example, let us say we want to perform m hypothesis teats, and we want to
control the type one error at level α where type one error rate is the probability of rejecting a true
null hypothesis. If we control the individual test’s type one error at level α then the overall type
one error rate is given by
P(type I error) = α, (2.17)
P(no type I error) = 1 − α, (2.18)
P(no type I error in m tests) = (1 − α)m
, (2.19)
P(type I error in m tests) = 1 − (1 − α)m
, (2.20)
(2.21)
33. Chapter 2. Mathematical Preliminaries 19
where tests are assumed to be independent. So if we perform ten hypothesis tests, and maintain a
5% significance level for each test then the overall significance level of the family of tests is 40.13%.
Holm’s correction is a step-down procedure to control the family wise error rate (FWER) at level
α. We control the FWER when we want to guard against any false positive, see Dudoit and Laan
[8].
Step-down Holm’s procedure
1. Sort the unadjusted p-values of each hypothesis test in non-decreasing order.
2. To control the FWER at level α, adjusted the sorted p-values such that
pj = min{(m − j + 1)pj, 1},
where m is total number of tests, and pj is the jth p-value after sorting.
3. As soon as we fail to reject a null hypothesis for the adjusted p-values, no further hypotheses
are tested, and we conclude that we fail to reject the rest of the null hypothesis.
34.
35. Chapter 3
Fitting Distributions to the Length of
Stay Data
After having surgery patients will either go to the ICU and then to a ward, or directly to a ward.
They stay in these facilities for a randomly distributed length of time which is called the length
of stay (LoS). The occupancy levels of the healthcare facilities and the patients’ waiting time to
access these facilities are very useful quantities in assessing the efficiency and service timeliness of
hospitals. Both of these quantities are strongly dependent on the LoS. In order to measure these
quantities, we need to understand the stochastic nature of the LoS.
In this chapter, we will fit probability distributions to the LoS data for the ICU and the cardiotho-
racic ward. The chapter is structured as follows. First, in Section 3.1, we will briefly discuss the
necessity of fitting distributions to the LoS data. In Section 3.2 we will discuss the data cleaning
and analysis. In Section 3.3 we will introduce the methodology used to estimate the parameters of
the fitted model, and assess its goodness of fit to the data. In Section 3.3 we will also discuss some
issues in fitting the model and propose a strategy to resolve them. Subsequently, in Section 3.4,
we will provide the parameters of the final model fitted to the data along with the statistics and
the plots showing the goodness of fit of the model. In Section 3.5 we will introduce a method of
classifying patients into different groups as per their LoS and will discuss the importance of doing
so in improving the efficiency of hospitals. Finally, in Section 3.6, we will discuss the results and
conclude the chapter.
3.1 Introduction
A lack of powerful methodologies to understand the characteristics of healthcare data has diminished
the credibility of healthcare cost-effectiveness studies. The efficiency of healthcare facilities is
21
36. Chapter 3. Fitting Distributions to the Length of Stay Data 22
assessed through their utilisation levels, and to measure that precisely we need to uncover the
hidden structure of the LoS data. Patients’ LoS is a critical performance measure as it characterises
the load on the system which subsequently determines the cost effectiveness of hospitals. Long
stay patients consume more resources than short stay patients, and a hospital with more long
stay patients is considered less cost effective. A well-managed hospital should keep the LoS of
its patients as short as possible without compromising patient outcomes. Although there are
limitations to using LoS as a proxy for cost, it is frequently used as it can be measured accurately.
In Australia, hospital expenditure accounts for approximately 40% of the national health spending,
which was estimated to be $140.2 billion in 2011-12, see [18]. To improve the cost effectiveness of
a hospital, first, we need to analyse the LoS structure as a proxy of the cost structure. There is
always a probability distribution associated with any stochastic variable. In order to understand
a stochastic variable completely, it is enough to know its probability distribution. Since we desire
to understand the stochastic variable LoS and subsequently the cost structure of the hospital, we
need to fit a distribution to the LoS data which is often positively skewed and heavy tailed.
One important service standard in the healthcare industry is the accessibility of required resources
and services in a timely manner. Patients waiting a long time to access the required services are
an indicator of poor service standards. To keep the waiting time within reasonable limits, we need
to assess the existing capacity of the facilities. To accomplish such an assessment, we need to know
the probability distribution of the LoS.
Various methods have been used to analyse the LoS data where the primary goal is to fit a proba-
bility distribution. We will use phase-type distributions to uncover the hidden structure of the LoS
data. In the next section, we will discuss data cleaning and analysis.
3.2 Data Cleaning and Analysis
In this section, we will discuss how we obtained the LoS data from the raw data. The raw data
received from the hospital consisted of of a lot of information such as patients’ URN number, age,
age group, surgery type, source of admission, type of surgery. The data set contained the release
time from the operating theatres and the discharge time from the hospital for all the patients who
were operated on and released from January-2012 until May-2014. The data could be classified
into different groups based on the patient’s age, surgical procedure (for example, cardiothoracic,
orthopaedic, mental health), or the source of admission (for example, elective or emergency). There
were a few repeated entries in the data set, and after getting confirmation from the hospital staff,
we deleted them. The additional columns of information in the data set (for example, age group,
ward, Day code) were discarded. The programming language R was used for all the data cleaning
tasks.
37. Chapter 3. Fitting Distributions to the Length of Stay Data 23
After removing all the repeated entries, we observed that the spread of the LoS data was extremely
large. For example, there were patients who stayed in the hospital for less than 24 hours, and some
other patients who stayed in the hospital for as long as 11,092 hours. To find out the sources of
variability, we analysed scatter plots of the LoS versus the source of admission, surgical procedure,
and age. The plot of the patients’ LoS with respect to the surgical procedure patients underwent
is given in Figure 3.1. From the plot we observed that the range of the LoS data was significantly
different for different surgery type. So we decided to perform statistical test to discover whether
the LoS data for various surgery types are statistically different or not.
The surgical procedure versus LoS plot
q
qq
q
qqqqqq
qqq
q
qqq
q
qq
qq
q
qqq
q
qqqq
qq
q
qqq
qqq
q
q
qq
q
qqqqqq
q
q
q
q
qqq
q
qqq
q
qqqqq
q
qqqq
q
q
q
qq
q
q
qqq
q
q
q
q
qq
q
q
qqqq
q
q
q
q
qq
q
qqqqq
q
qqqqqq
qq
q
qqqqqqqqqqqqqqqqqqqqqqqqqqqqq
q
q
qq
qqq
q
q
qqqq
q
qqqq
q
qq
q
qq
q
qqqqq
q
qqqqqq
q
qq
q
qqq
q
qq
qqq
q
q
qqqqqqq
q
q
q
q
q
qqqqq
q
qq
q
q
q
qq
q
qq
q
q
q
q
q
q
q
q
q
qqqq
q
qq
qqqqqqqq
q
qqq
qq
q
q
q
q
q
q
q
q
q q
q
qqq
qqqq
q
qq
q
qq
q
qqq
qq
qqq
q
q
qqq
q
qqqqqqqq
qq
qqq
q
q
qq
q
q
q
qq
q
q
q
qq
qqqq
q
q
qqq
q
qq
qq
q
q
q
qq
qq
qqqqqq
q
q
qqq
q
q
q
q
q
q
q
qq
qqq
qqqqqqqq
q
q
qqq
qq
qqqq
qqqqq
q
q
qq
qqqqqq
q
qqqq
q
q
q
q
q
qqq
q
q
qq
qqqq
qq
q
qq
q
q
qq
qq
qqqq
q
qqqqqqqqqq
qqqqqqqq
q
q
q
q
qqqqqqqq
q
q
q
q
q
qq
q
q
q
q
q
q
q
qq
q
q
q
qqqqqq
qq
qq
q
q
q
qq
q
qq
q
q
qq
qqq
q
qq
qqqq
qq
qqqq
q
qq
qqqqqqq
qq
q
qqqqqqq
qqqq
qq
q
q
q
q
q
q
q
qqqq
qqqqq
qqqqqqq
q
qqqqqqqq q
qq
q
q
q
q
qqq
q
q
qq
qq
qqq
qqq
q
qq
q
qq
q
q
q
q
q
q
q
qq
q
q
q
q
q
q
qq
q
q
q
qq
q
qq
qq
qq
q
qq
qqqqqqq
q
qqqqq
q
q
q
qqq
q
qq
q
qqqqq
qq
qqqqqq
q
q
q
q
qqq
q
q
q
qqq
q
q
q
q
q
q
q
qqqqq
qqqqqqqq
qqqq
qqq
q
q
qq
qq
q
q
q
q
q
q
q
qqqqq
qq
q
q
q
qqqq
qqqqqq
qqqqqqqqqqqqqqqqqqqqqqqqq
q
qq
qq
qqqq
qqqqqqqqqqqqqqqqqqqq
qqqqqqqqqqqqqqqqqqqqqqqqqqqq
q
qqqqqqqq
qqqqqqqqqqqqqq
qqqqqqqqqqqqqqqqqqqqqqqqqqqq
qq
q
qqqqqqqqqq
q
qqqqq
qqqqqqqqqqqqqqqqqqqqqq
qq
qqqq
q
qq
qqqqqqqqqqqqq
q
qqqqqqq
q
qqq qqqqqqqq
q
qqqqqqqqqq
q
qqq qqq
q
q
q
qqqqq
qq
q
q
q
qqq
q
q
q
q
q
q
qq
qq
q
q
q
q
q
q
q
q
qqqqq
q
qqq
q
qq
qqqqq
qqqqq
qq
q
q
q
q
q
q
q
qqqqqq
q
q
q
qqqqq
q
qqq
q
qq
qqq
q
q
q
qq
q
q
q
q
qq
q
qqqqqq
q
qq
q
q
qq
q
q
q
q
q
q
q
qqqq
q
q
q
q
qq
q
q
q
qq
q
q
q
q
qq
qq
q
qqqq
q
q
q
q
q
qq
q
q
qq
q
q
q
q
qq
q
qq
q
q
q
qqqqqqqqqq
qq
qq
q
q
q
qqq
q
q
q
q
qq
q
q
q
qqqq
q
q
q
q
q
q
q
q
q
q
qq
q
qqqqq
q
q
q
q
q
qq
q
q
qq
q
q
q
q
q
q
q
q
qqqqq
q
qq
qq
q
qq
q
q
q
q
qq
q
qq
q
q
q
qqq
q
qqqqq
qqqqq
q
q
q
q
q
qqq
q
q
qqq
q
qq
qqqq
q
q
q
qqqqqq
qqqqq
q
qqqq
qq
q
qqqqq
q
qqqqqq
q
q
q
q
q
qq
q
qq
q
qqqq
q
qq
q
qqq
qqqqqqq
q
qq
q
q
q
qq
qqqqqq
q
q
q
q
qqq
qqqqq
Cariod Dental ENT General Mental Neuro Obst Ortho Paed Vascular
02000600010000
Type of Surgery
LoSinHours
Figure 3.1: Variation in the patients’ LoS with respect to the surgery type they underwent
Analysis of variance (ANOVA) is the best statistical test to analyse whether two or more groups
of data are statistically different or not. However, for our LoS data, assumptions of the ANOVA
model were not satisfied. The residuals from the ANOVA model were not normally distributed.
The lognormal distribution is commonly used distribution for the healthcare LoS data, and it fits
majority of LoS data, see Marazzi et al. [13]. So we made an assumption that our LoS data
was distributed log-normally which means the log transformed data was distributed normally. We
applied the ANOVA test on log transformed data. The test results are given in Table 3.1. From
the p- value of the F-test we can claim that the LoSs in all the surgical wards was not the same
statistically.
ANOVA test results performed on log transformed post operative LoS data
Deg. of freedom Sum of square Mean square F-value p-value
Surgery type 9 8665.8 962.86 482.66 2E-16
Residuals 12943 25820.2 1.99
Table 3.1: ANOVA test results for the LoS in different surgical ward’s data
39. Chapter 3. Fitting Distributions to the Length of Stay Data 25
p- values of pairwise t-test with Holm’s p-value adjustment method.
Cardio Dental ENT General Mental Neuro Obstet Orthop Paedit.
Dental 2E-16 - - - - - - - -
ENT 2E-16 2E-16 - - - - - - -
General 2E-16 2E-16 2E-16 - - - - - -
Mental 0.919 2E-16 2E-16 2E-16 - - - - -
Neuro 2E-16 2E-16 2E-16 2E-16 1E-10 - - - -
Obstet 2E-16 2E-16 2E-16 2E-16 2E-16 2E-06 - - -
Orthop 2E-16 2E-16 2E-11 2E-16 2E-16 2E-16 2E-16 - -
Paedit. 2E-16 2E-16 7E-12 2E-16 2E-16 2E-16 2E-16 0.005 -
Vascul 2E-16 2E-16 2E-16 0.991 2E-16 1E-13 8E-08 2E-16 2E-16
Table 3.2: Pairwise comparison of various LoS data groups using t-test for independent samples
Furthermore, we observed that the variation in the emergency patients LoS is greater than the
variation in elective patients LoS. The plot of the source of admission versus LoS is given in Figure
3.3. Detailed descriptive statistics of elective and emergency patients’ LoSs are given in Table 3.3.
Descriptive statistics of patients’ LoS with respect to their source of admission
Min 1st Quantile Median Mean 3rd Quantile Max Std. dev
Elective 0 4 27 91.33 104 7176 231.25
Emergency 0 26 81 188.50 164 11090 462.60
Table 3.3: Variation in descriptive statistics of patients’ LoS with respect to their source of
admission into the hospital
The source of admission versus LoS plot
ED Elective Other Other Emerg. Ward
0200040006000800010000
Source of admission
LOSinHours
Figure 3.3: Variation in the patients’ LoS with respect to their source of admission
40. Chapter 3. Fitting Distributions to the Length of Stay Data 26
The hospital staff suggested that we conduct our analysis for the multi-day elective surgery patients
only. Here elective patient means a patient who was operated on under the elective category and
multi-day patient implies the patient has stayed in the hospital at least overnight after having
surgery. So as per the advice from the hospital staff, we kept the LoS data for all the multi-day
elective patients and removed the rest of the data.
As a next attempt to understand the remaining variability in the LoS data, we analysed the
relationship between the patient’s age and his or her LoS. A scatter plot of the LoS in the ICU and
the cardiothoracic ward with respect to the patients’ age is given in Figure 3.4. The solid line in
the plot is the fitted regression line which shows the trend in the LoS with increasing age of the
patient.
The surgical procedure versus patients age plot
20 30 40 50 60 70 80
0500100020003000
Age vs LoS
Patient’s Age
LoSinHours
LoS in the ICU
LoS in the Ward
Figure 3.4: Variation in the patients’ LoS with respect to the surgery type they underwent
From the trend line we can see that the slope of fitted regression lines is close to zero, and so age is
a poor factor in determining the patient’s LoS. We were interested in carrying out further analysis
to classify patients in lower variability LoS groups. However, due to lack of any further data on
patients’ details, we decided to treat the remaining variability as pure randomness. In the next
section, we will fit various probability distributions to the data. We will also see that the commonly
used probability distributions for non-negative data fail to fit the given LoS data.
41. Chapter 3. Fitting Distributions to the Length of Stay Data 27
3.3 Fitting Probability Distributions to the LoS Data
As discussed above, we decided to fit different probability distributions to the LoS data for each type
of surgical procedure. We tested the suitability of commonly used positively skewed probability
distributions (such as gamma, lognormal, Weibull, and PH distributions) defined on non-negative
real numbers. The values of the fitted distribution parameters and the p-value of the KS goodness
of fit test are given in Table 3.4. We computed the parameters of the fitted distributions using the
MLE method, and observed that these distributions failed the KS goodness of fit test. Next, we
fitted PH distributions to the LoS data.
Table 3.4: The computed parameters of various distributions fitted and p-vale of the KS test
LoS in the ICU data
Distribution Location parameter Scale parameter KS test p-value
Gamma 0.7034 63.8978 7.8E-04
Weibull 0.7879 38.9660 2.2E-16
Lognormal 2.9467 1.5959 2.2E-16
LoS in the Ward data
Distribution Location parameter Scale parameter KS test p-value
Gamma 2.6909 78.7402 1.8E-09
Weibull 1.3877 235.9100 1.3E-14
Lognormal 5.1611 0.5919 9.6E-05
We used a C program named EMPHT, developed by Asmussen, Nerman, and Olsson [2] to estimate
the parameters of the fitted Coxian distributions.
3.3.1 Parameter estimation
After deciding to fit PH distributions to the data the next step was to choose the class of PH
distribution. We chose to fit Coxian distributions as it is easy to fit Coxian distributions because
of the smaller number of parameters in comparison to general PH distributions of the same order.
Moreover, it is possible to physically interpret the phases in a Coxian distribution but the same is
not always possible for a general PH distribution. As stated in Subsection 2.2.2 of Chapter 2, we
only need to know the parameters α and T for knowing a Coxian distribution completely. So we
need to estimate α and T when fitting a Coxian distribution. The main aim of estimating these
parameters is to find a model which fits the data best in some sense and the MLE method finds a
model which makes the observed sample most likely.
42. Chapter 3. Fitting Distributions to the Length of Stay Data 28
While estimating the parameters of Coxian distributions using EMPHT, we needed to input the
order of the Coxian distribution we were interested in. Usually the higher the order of the Coxian
distribution, the better the fit will be. However, it is desirable to choose the lowest order distribution
which can satisfactorily fit the data. Choosing higher order models may cause over-fitting. Higher
order models are expensive when used in analysis and simulation, and estimating their parameters
also take more time. So an optimal choice of order n is the lowest order distribution which fits the
data appropriately. A trial and error method was used for finding the optimal order.
We started by fitting a 2-phase Coxian distribution, and step by step increased the number of
phases until we found a best fit distribution. One criterion to find a best fit model could be to
increase the number of phases until there is no significant improvement in the log-likelihood value.
However, the problem with this method is that the decision would be very subjective, and we may
over-fit. To avoid over-fitting, we selected the optimal model given by the AIC and BIC as a good
fit model. However, since these two criteria do not always give the same model as the optimal
model, in the case of conflicting results the one with the better KS test result was selected as the
best fit model to the data.
3.3.2 The best fitting model for the LoS data
As per the criteria discussed above, we selected the best fit models for the LoS in the ICU and the
ward data. The detailed description of the process and the resultant models are given here.
3.3.2.1 The best fit model for the LoS in the ICU
As we will discuss later in detail, for the facilities where the patients from various surgical specialities
share the same resources or facility, it is inappropriate to group patients based on the surgical
procedure they underwent. In the case of such facilities, it is better to group the patients as per
their LoS, and Coxian distributions could be used to do so. The ICU is the one such facility, so we
fitted the same Coxian distribution to the complete LoS data set irrespective of the surgery type.
In Section 3.5, we will use this distribution to classify patients into lower variance LoS groups.
We also performed the ANOVA test on log transformed LoS in the ICU data. Test results suggest
that the patients who underwent different surgery type had statistically different LoS in the ICU.
Table 3.5 shows the ANOVA test results for the LoS in the ICU data. However, the adjusted R2
value of the fitted model is 0.01825 which means that only 1.825% variation is explained by the
surgery type. Moreover, the assumption that the residuals should be distributed normally was
unsatisfied. So we decided to ignore the surgery type as a predictor of variability in the case of LoS
in the ICU.
43. Chapter 3. Fitting Distributions to the Length of Stay Data 29
ANOVA test results performed on log transformed LoS in the ICU data
Deg. of freedom Sum of square Mean square F-value p-value
Surgery type 10 89.8 8.9823 3.69699 6.6E-05
Residuals 1441 3501.2 2.4297
Table 3.5: ANOVA test results for the LoS in the ICU data
We fitted various Coxian distributions to the data as per the procedure described in Subsection
3.3.1. Table 3.6 shows the log-likelihood values, the number of parameters to be estimated, the
AIC and BIC values, and the p-values of the KS test corresponding to the number of phases fitted.
Log-likelihood vales of fitted Coxian distributions to the ICU LoS data
No. of Phases Log Likelihood No. of Parameters AIC value BIC value p-value
4 -4472.20 7 8958.40 9000.11 0.0000
5 -4469.54 9 8957.08 9010.71 0.0000
6 -4436.72 11 8895.44 8960.99 0.0017
7 -4436.37 13 8898.74 8976.21 0.0019
8 -4436.24 15 8902.48 8991.86 0.0021
Table 3.6: Log-likelihood values of various Coxian distributions fitted to the ICU data
From the table, it is clear that both the AIC and BIC suggest the 6-phase Coxian distribution
is optimal. Hence, we chose the 6-phase Coxian distribution. However, from the p-value of KS
goodness of fit test we conclude that none of the given models (good fit model as well as the
7-phase and 8-phase Coxian-distribution models) fits the data satisfactorily. Figures 3.5 and 3.6
show the histogram of the data along with the probability density function of the 6-phase Coxian
distribution, and the Q − Q-plot respectively.
44. Chapter 3. Fitting Distributions to the Length of Stay Data 30
Histogram of the LoS in the ICU data
LoS in days
Probabilitydensity
0 5 10 15 20 25 30 35
0.00.10.20.30.4
Figure 3.5: Histogram of the LoS in the ICU data along with PDF of the fitted model
0 5 10 15 20 25 30
0102030
Phase type Q−Q plot
Fitted Distribution
LoSData
Figure 3.6: Q-Q plot of the LoS in the ICU and the simulated data from fitted distribution