An increasingly prominent area of prediction in recent years has been the modeling of wait times in hospitals. Having accurate wait time predictions has been shown to be psychologically beneficial to patients if they are publicly visible, making people more likely to wait for the care they need. In addition, hospital staffing costs upwards of 50% of overall hospital costs. Thus, there is always a financial balancing act for the hospital: overstaffing the hospital means losing money, whereas understaffing might prohibit meeting patient needs and lead to exorbitant wait times. Ideal staffing – optimal use of funds – is the constant goal.
Therefore, both from the perspective of patients and hospitals there is a general need to be able to predict wait times, whether for psychological benefits or schedule optimization needs. In this post, we will explore some of the main ways that officials predict hospital wait times and assess how successful they are at doing so.
Methods for Predicting Hospital Wait Time
Part of what makes hospital wait times difficult to predict is that they depend on so many different variables. For instance, consider that when there are more patients than hospital staff, there will naturally be higher wait times than when the opposite is true. Different times of day will exacerbate or ease this effect.
In addition, not all patients are treated equally by the hospital itself. For example, “high acuity” patients – those who arrive in an ambulance, gurney, or under the custody of law enforcement – are likely to be treated more quickly than “low acuity” patients who are able to walk in on their own accord. Taking all of these variables into account, consider how they vary by time and relate to one another in the San Mateo Medical Center Data from 2012-2013:
Given all these interacting factors, how do we go about predicting wait times, though? Researchers have pursued two main approaches to this question: time series analysis and simulation. For the remainder of this post, we’ll explore how these two different approaches have been used to predict hospital wait times.
Time Series Forecasting for Hospital Wait Time:
In many cases, simple rolling average models have been found to outperform other, more complicated methods of modeling in predicting wait times in terms of their R-squared score (all in the .40 range). As a the name suggests, Rolling Average models work by moving over set time windows (i.e. an hour, a minute, ten minutes, etc.) and averaging the set of values within each window to model a time series. One advantage of these approaches is that they are often highly accessible right out of the box.
Python’s Pandas package, for instance, provides a useful implementation such that you can input time series data and fit a rolling average model in a single line of code. For instance, consider a hospital’s hourly average time to treatment (in minutes) for the previous day:
import pandas as pd hourly_time_to_treatment = [80, 70, 75, 51, 43, 64, 80, 80, 90, 92, 100, 101, 90, 85, 79, 81, 85, 91, 87, 85, 89, 88, 85, 81] times = pd.date_range('2017-03-01', periods=24, freq='60min') hourly_wait_time_df = pd.DataFrame(hourly_time_to_treatment, index=times)
If we wanted to predict tomorrow’s time to treatment using a rolling averages method, we might take averages every 4 hours, to produce predictions, where predictions are in red:
rolling_avg = hourly_wait_time_df.rolling(window=4).mean() plt.plot(hourly_wait_time_df); plt.xlabel('Hour'); plt.ylabel('Average Time to Treatment') plt.plot(rolling_avg, color = ‘red’