There are a few things in this world that are instant. When you place a phone call or go to a website, you generally connect instantly (assuming you are on a landline or hardwire, your cell carrier or Wi-Fi may vary). There are other things in this world for which you need to stand in line and/or wait, such as retail check-out or getting prescriptions filled at the drug store. What’s the difference? Well, phones and webservers are generally able to provide instant service due to the telecommunications industry embracing a field of mathematics known as Queueing Theory. Queuing Theory is the science of standing in lines, explaining how quickly units move through a system and how many resources are needed to keep the line from getting infinitely longer. This is crucial in the telecommunications industry, because people expect to be able to place a call or pull up a website without having to wait in line to do so. Lots of variables impact how lines work, but the basic goal of the system is to balance the amount of resources needed with the amount of resources provided.
If you work in Hospital Support Services, that last sentence probably sounds pretty familiar. However, a surprising number of hospitals and health systems do not employ Queuing Theory when developing staffing models in any department, least of all Environmental Services and Patient Transport. I frequently hear things like “healthcare isn’t like manufacturing; you can’t apply the same models,” or “we’re dealing with human lives, not widgets.” Both of those statements contain truth, but isn’t having an ED bed available when someone gets into a car accident even more important than making sure LinkedIn comes up on my iPhone when I meet someone at a business party? Queuing Theory is extremely good at matching resource availability to demand and companies that use it drastically reduce wait times for their customers.
Using the tools presented in this article, you will be able to determine how many staff you need at any given time to meet demand, the throughput of your system, how efficiently your resources are being utilized, what the likelihood is that any given number of staff will be working at any given time, and other parameters that are useful to determine effective staffing.
So how does Queuing Theory work and how can EVS & PT departments put it to use for patient throughput? Well before we get into specifics, let’s take a moment to define some terms we will be dealing with and some general assumptions. There are many different models that can be used to determine wait times and they are based on how lines are formed, how they are served, what priority is placed on customers, and arrival and service patterns. Let’s address these general parameters first. Note: Queuing Theory usually refers to “customers” as the units waiting in line; though for the purposes of this document, “customers” may mean actual patients needing to be moved for PT, or it may refer to rooms needing to be turned over for EVS.
Line-formation: Some lines will grow infinitely, while some will only grow to a certain point and others may not grow at all. For example, when you try to pull up a website it either does or does not appear; you cannot wait in line to have that website come up (this is called rejection). When you go to the drug store, the line may be so long you decide to go to another store (this is called balking). At a grocery store, you may jump back and forth between lines depending on how fast each moves (this is called jockeying). For most of our examples, we’ll assume the line will build infinitely. While a sufficiently high number of dirty beds or waiting patients may clog-up a hospital’s systems and start slowing things down, in general there is no “cap” on how many beds might become dirty or how many patients might need to be moved. We will also review a scenario where there is a cap.
Queuing Discipline: This refers to how customers (or beds) are treated after they line up. The most common method is First-in, First-out (FIFO), meaning the customer who has been waiting the longest gets served first. However, there are other models such as Last-in, First-out (LIFO), shortest job first, all-at-once, and priority preference. This is perhaps the trickiest one, as it is largely hospital-dependent and it may change as staffing models improve. In my experience working with Support Services departments and patient flow data, room and transport priorities such as “next” or “stat” are primarily useful when staffing is not built to meet demand and long lines of rooms or patients form. A well-managed FIFO system where jobs are consistently done in an agreed-upon time frame usually has very little use for priority levels.
Arrival Distribution: This is based on how customers come into the system. For doctor’s offices, most of the arrivals will be deterministic since they are scheduled by appointment time, with some mild variation as patients walk-in without an appointment or arrive late. For Emergency Departments, the arrivals will be more-or-less random; the arrival of one patient does not affect the arrival of another. Other systems will have a completely arbitrary arrival distribution. For random arrivals with naturally-occurring variation, we can use what is referred to as a Poisson distribution, depicted below. A Poisson distribution simply means that the mean and the variance are distributed equally. Arrival distributions that follow a Poisson curve are called “Markovian,” after Russian mathematician Andrey Markov. Arbitrary arrival distributions are referred to as simply “General.” Therefore, arrival distributions will be called (M)arkovian, (D)eterminitic, or (G)eneral.
Figure 1: The Poisson Distribution
It is worth noting that patients should move through a health system in a Poisson distribution because one patient’s clinical condition should not materially impact another’s, nor should one patient’s discharge time impact another’s. In practice though, “batching” of requests often occur due to nurses attempting to impact the arrival distribution of patients to their units. However, even batching is often predictable and will follow a Poisson distribution if you break down the time periods and look at them individually. We’ll discuss which distribution to use and how to decide when we start tackling the math in our examples.
Service Time Distribution: Similar to arrival distribution, this is a measure of how long it takes to perform a service and the variation around it. In a factory, this is deterministic, meaning it takes the exact same amount of time to perform each task because they all have to be timed to make an assembly line work. For Support Service departments, this should follow an Exponential distribution, meaning there will be some anticipated and predictable variation in cleaning times. Rooms can be cleaned in an average of say, 30-35 minutes, though some may take longer due to isolation status or size and some may be shorter. It is the same for Patient Transport, the average trip may take 20 minutes, but there is wide variation in that figure as some jobs are far and some jobs are close. Again, there is a model for an entirely arbitrary service time, but that is unlikely to apply to this scenario. Service time distributions will also be classified as M, D, or G.
Figure 2: The Exponential Distribution
Number of Servers: This is fairly straightforward, but there is a trick to it. Models are usually referred to by what is called Kendall’s notation, which shows the arrival distribution, then the service time distribution, followed by the number of servers, such as M/M/1 for a system where both arrival and service are Markovian and there is only one server. If you have more than one server, it depends on how your line forms. If there is one line and several servers just take the next person, such as a butcher shop, then it would be an M/M/s system where s=the number of servers. However, if there are numerous individual lines, such as a grocery store, you have an s*M/M/1 system. For most Support Services departments, you would have an M/M/s system since housekeepers or transporters are usually servicing one list of throughput tasks that need to be completed.
With the above understood, we can now calculate some variables we will need to perform our models.
Average Arrival Rate or ƛ (lambda): This is the number of requests received for service in a given unit of time. It’s the reciprocal of the average inter-arrival time, or the amount of time between arrivals. For example, if the average amount of time in between patients being discharged is 1.5 hours and we want the arrival rate in hours, then it would be 1/1.5 or 0.67. Your ƛ would be 0.67 arrivals per hour.
Average Service Rate or µ (mu): This is the amount of service that can be provided in a given period of time. It’s based on the average service time and is simply the reciprocal. For example, if a room can be cleaned in 30 minutes and you want to determine the service rate per hour, it would be 60/30, or 2. Your µ is 2 beds per hour.
ρ (rho): This is the last bit of Greek you need to learn for this article and it’s simply the ratio of arrival rate to service rate, or ƛ/µ. For our examples above, that would be 0.67/2 or 0.33. Your ρ is 0.33. Notice there are no units, this is because it is simply a ratio between two other rates.
Queuing Models for Lock-in EVS Throughput (Unlimited Queue)
It is common in many facilities for there to be “lock-in” staff that is dedicated to serving one area. In Transport, there are commonly dedicated individuals for Radiology, the Emergency Department (ED), and the Operating Rooms (OR). In EVS, there are commonly lock-ins for Labor & Delivery (L&D), ED, and OR as well. The nice thing about single departments such as ED, L&D, and Radiology is that their distributions tend to have natural variability and thus we don’t need to figure out if they follow a Poisson distribution. ED and L&D visits are, by their very nature, subject to natural variation since deliveries and emergencies are seldom pre-scheduled (scheduled C-sections are another story), so we can use a Markovian model for our arrival distribution. Service times for lock-ins should follow an Exponential distribution very tightly, since the tasks will all be of a similar type and they will be done by a consistent individual, so again we can use a Markovian model. Finally, since we are dealing with a lock-in we know that there is only one server, so we will use the simplest queuing model of M/M/1.
As an example, consider an Emergency Department with a single EVS lock-in. We’re going to say this model has an unlimited queue because there is nothing stopping more dirty rooms from needing to be cleaned. This is a little different from the model you would use for Nurse staffing, because there actually is a limit to how many patients could be waiting to be seen. The hospital will go on diversion and/or patients will leave without being treated if the wait is too long, so the same equations would not apply. For this example, let’s say each room takes an average of 15 minutes to clean and rooms become dirty at a rate of 1 room every 30 minutes.
We can determine the following metrics from a system of this type.
Let’s calculate each. First, we need to know our ƛ, µ, ρ. Recall that ƛ is the reciprocal of our inter-arrival time and since 1 room becomes dirty every 30 minutes, we know that ƛ = 2 rooms/hr. Since µ is the reciprocal of our average service time, then in hours it would be 60/15 or µ = 4 rooms/hr. Finally, since ρ is just ƛ/µ, we know that it is 2/4 so ρ =.5.
There is a 50% chance the housekeeper is not currently needed to clean a dirty room.
There is a 25% chance that there is a single dirty room needing to be cleaned.
There is a 12.5% chance that there are 2 dirty rooms needing to be cleaned.
There is a 0.4% chance that there are 3 dirty rooms to be cleaned. Since there is no limit to the queue, these probabilities get smaller and go on for infinity, but cumulatively there is an 87.5% probability there will never be more than 2 rooms needing to be cleaned at one time.
The Relative Throughput (q) for a system with an unlimited queue will always be equal to 1. The Absolute Throughput for such a system will always equal ƛ, which in this case is 2 rooms/hour.
The average number of rooms needing to be cleaned at any given time is 0.5.
The average number of rooms waiting to be cleaned and/or being cleaned at any given time is 1.
The average time a room sits needing to be cleaned is 0.17 hours or 10 minutes.
The average length of time a room spends waiting and being cleaned together is 0.42 hours or roughly 25 minutes.
As you can see from the calculations, 50% of the housekeeper’s time will be dedicated to routine cleaning of the ED and 50% of the time will be dedicated to room turnover. Such a department would not have trouble with throughput and, depending on its size and complexity, one housekeeper may be sufficient to keep the department clean and patients flowing. A simple rule of thumb here is that if ƛ > µ, then the line will always build infinitely and 1 housekeeper will never be able to keep up.
Queuing Models for Lock-in Patient Transport Throughput (Limited Queue with Rejection)
For the purposes of this exercise, we’ll look at whether or not a single lock-in is sufficient for providing timely transport to a busy Radiology department. This is a little different from the above model, because patients will not wait forever for transport. Let’s assume for this exercise that the maximum line length will be 3 patients (m = 3). This means that if the line is more than 3 patients long, the test will need to be delayed or canceled. For this example, let’s say each trip takes an average of 25 minutes and patients request service at a rate of 1 patient every 20 minutes. This is considered a model “with rejection,” so we can derive the same metrics as the above model, but also the probability of rejection. The main difference here is that, without downtime tasks, the transporter will be idle when there are no patients to move.
Let’s calculate each. First, we need to know our ƛ, µ, ρ. Recall that ƛ is the reciprocal of our inter-arrival time and since 1 patient comes every 20 minutes, we know that ƛ = 3 patients/hr. Since µ is the reciprocal of our average service time, then in hours it would be 60/25 or µ = 2.4 patients/hr. Finally, since ρ is just ƛ/µ, we know that it is 3/2.4 so ρ = 1.25.
There is a 12.2% chance the transporter is idle (not serving a patient).
There is a 15.3% chance the transporter is transporting 1 patient and no other patients are waiting.
There is a 19.1% chance the transporter is transporting 1 patient and another is waiting.
There is a 23.8% chance the transporter is transporting 1 patient and 2 are waiting.
There is a 29.8% chance the transporter is transporting 1 patient and 3 are waiting.
There is a 29.8% chance the system is at maximum capacity and additional requests for transport will be rejected.
Note that all of those probabilities added together equal 100%. This brings up another important point, while roughly 12% of the time the transport is idle, roughly 30% of the time the system is at maximum capacity and cannot accept additional requests. This illustrates a cardinal rule of throughput – as throughput increases, individual productivity MUST decrease. This flies in the face of most staffing models which seek to maximize worker productivity, but makes perfect sense. The busier workers are, the less capacity they have to deal with fluctuations in demand.
Now, let’s calculate the rest.
The system’s Relative Throughput is 0.702.
The system’s Absolute Throughput is 2.106 patients per hour. Often I hear people say, “If the average trip is 25 minutes, that means we would expect roughly 2.4 trips per hour.” That would hold true only in a world where there were no variability in service or arrival times.
The average length of the line is 1.56 patients.
The average number of requests in the system at any given time is 2.44 patients, which includes those waiting and those in process.
The average wait time for a patient is 0.52 hours or roughly 31 minutes.
To calculate Ťs, the total average transport time (waiting + being served), we need to determine another variable called ŤΩ, which is just q/µ.
The total average transport time is 0.81 hours or roughly 48 minutes.
For many transport departments, a 30% chance of rejection and an average wait time of 31 minutes are unacceptable. You would then need to look at what the hospital expects and how many resources your budget allows to determine how you could improve services. Ideally, you would add more transporters, but your boss might say “every time I walk by the transporter, he’s not doing anything.” That may be true, each time he walks by there is a 12.2% chance the transporter is idle. Now, you can explain with mathematics why that is the case and why you would still need more transporters.
Queuing Models for Facility-wide EVS and Patient Transport Throughput
Let’s tackle how you would determine staffing for an EVS department at a hospital to ensure the best possible patient throughput. The same model works for Patient Transport and the same math applies, but since we used Transport as an example in the last section, we’ll use EVS for this one. The first thing we need to do is determine what kind of arrival distribution we’re dealing with. Remember, if the arrivals follow the Poisson distribution, we can use a Markovian, or M, model. If they do not, we need to follow the general distribution, or G, model. The G model has a lot more unpredictability and thus requires a lot more staff to meet service expectations.
We’ll use a real-world example for this. I worked at a 200-bed hospital in Southern California. Beds were clearly being batched and we would have considerable spikes in demand that seemed unpredictable and would back up the department for the whole evening, leading to “stat” calls and other disruptions. The following is a graph of the discharge patterns of all the Thursdays in a particular month. I routinely mapped the variability in demand to show the impact it had on the EVS department. As you can see, there is a tendency toward batching beds right after nursing changes over their shift.
Figure 3: Variability in Demand
However, looking at an entire year’s worth of data and breaking it out into four-hour blocks, you can see that the variability does actually fit fairly well into a Poisson distribution for the evenings. I made a histogram of all the times beds came out during each shift and graphed them against their expected Poisson distribution. The creation of a histogram and other tests of distribution are a little outside the scope of this article, but there are numerous resources online that can help you sort the data in this way if you want to test it for your facility.
Figure 4: Distribution pattern of beds over a year
As you can see, the fit is not perfect, but it is quite close for the 3:00-7:00pm time period and good enough to make some predictions for the 7:00-11:00pm time period. The observed values are too far right of the expected distribution to use the model for the 11:00am-3:00pm time period, but most EVS departments have daily area cleaners during that time who can pick up the slack. It is during the evenings that most departments employ a “discharge team,” and that is precisely where models like this come into play because they can tell you how many members you need on your team.
Since the distributions are more-or-less Poisson for the evenings, this means we can use a Markovian model, which simplifies the math and allows us to save on staffing. We already know that our bed cleaning follows an Exponential distribution, so we’ll use the Markovian model for our service time as well. Finally, since there is a team of discharge personnel, we know we have multiple servers. This means we will use the M/M/s model with an unlimited queue.
We’ll just examine the 3:00-7:00pm timeframe for this exercise, since that’s usually when the demand is highest and the only ones cleaning beds are the discharge team. The average number of rooms coming into the system per hour, or our ƛ, is 6.5 rooms/hour. The average service time to turn over a room at this particular facility, including transit time for a housekeeper to get to the room, is 37 minutes[i], so our µ = 1.62 rooms/hour. That means our would be 6.5/1.62 or roughly 4 rooms/hr. A common service threshold is that a bed should not wait more than 15 minutes until a housekeeper is dispatched to clean it. This is usually fast enough to avoid priority calls like STAT cleans, and since priority levels change the model, let’s keep that as our target. How many housekeepers would we need on our discharge team between 3:00-7:00pm? Let’s try 5 housekeepers and see how we do.
In this model, we can determine a number of metrics. Here is a list of the ones you can calculate:
The math is a little tricky here, but luckily there are online calculators and Excel spreadsheets you can use for this sort of thing. For 5 housekeepers, it would be 0.013, or a 1.3% chance that no rooms need to be cleaned and the housekeeper is idle or performing downtime tasks.
There is a 55.4% probability that all housekeepers are cleaning a room at any given time.
There are, on average, 2.2 beds waiting to be cleaned at any given time.
This one is an easy formula! There are 4 beds on average being cleaned at any time.
There are, on average, 6.2 beds being processed or waiting at any given time.
The average dirty room will wait 0.34 hours, or roughly 20 minutes, before a housekeeper is dispatched. Recall that our goal with this model was to see if we could keep the wait time for a housekeeper to be dispatched at 15 minutes, so this would not meet our goal!
The average time a room spends waiting for a housekeeper and being cleaned, sometimes referred to as the dirty-to-clean time, is 0.95 hours, or 57 minutes.
I will save you a revisit through all the math - if you raise the number of housekeepers to 6, the wait time for beds actually drops to just over 5 minutes and the dirty-to-clean time drops to 42 minutes. That would be considered a great program at most hospitals. You now know how to calculate the difference that one additional housekeeper makes, or sometimes even more useful, you can now calculate the exact service impact of cutting your discharge staff.
I hope you have found this article useful. Be aware that there are dozens of different models and variables for analyzing systems and things like priority levels, different distributions, and whether or not your system has rejection change things quite a bit, so be careful about applying the limited examples presented here to your operation unless they match up precisely. If math isn’t your strongest suit, you can use online calculators like the one found here to speed things up.