The goal of this project is to automate and improve the process of predicting patient flow and staff scheduling in hospitals, which is currently highly variable and uncertain. We will achieve this by developing a patient census simulation that can be used to schedule nurses.
There is increasing pressure on hospitals to improve their resource management, including staff scheduling, and reduce budgetary waste. Predicting patient flow is vital for staff scheduling and is linked heavily to patient safety, satisfaction, and quality of care. If the floor is understaffed, nurses will be overwhelmed with a high patient census, leading to worse patient outcomes. If the floor is overstaffed, there will be budgetary waste with idle nurses, leading to higher healthcare costs for patients. Currently, clinicians determine staff schedules by manually predicting patient census every morning, which is inefficient and subjective. This process should be automated and improved in accuracy by using historical data.
Our goals for the project are as follows:
If our project is successful, we will be able to provide information for patient census trends and feedback for staff scheduling to a hospital unit. Ultimately, this will help improve staff scheduling to be more effective and to reduce budgetary cost.
All of the software will be written in Python. The data processing will be done using the pandas library in Python. The simulation will be created using SimPy, a discrete event simulation package in Python. We will keep track of software design and documentation using a shared Google Doc.
Data was primarily preprocessed depending on the season, day of the week, and time range that the patient movement is taking place. This temporal organization, which is used in simulating the patient census and throughout the project, was determined after consulting a nurse manager about the unit and examining trends evident in the data provided. A lookup table of historical distributions for each temporal parameter set was obtained. This included a census, length of stay, and patient entry rate information. The simulation that we created moves patients through the unit based on these historical distributions, outputting an hourly patient census.
Various plots were created to visualize the simulated census and provide an indication of the simulation’s performance:
On the left the simulated and historical mean census values over a two week period are shown; 25 simulation iterations were used. On the right the simulated mean for a one week period is shown; the historical mean and 95% confidence interval are plotted as well; 50 simulation iterations were used.
As seen in the figures above, both seasonal and hourly temporal trends seen in historical data are shown in the simulation results. Simulation mean census results that included 50 iterations or more fell within the 95% confidence interval of the corresponding historical mean. The largest discrepancy was seen in the first few days of the simulation. This can be attributed to difficulties accurately assigning lengths of stay to patients added to the simulation at the start time.
Zip file of project code: cisgroup12code.zip