A data-driven simulation of UCSD Health's three-hospital network — built to give hospital operations teams a safe way to test smarter patient transfer policies before changing anything in the real world.
The Problem
Imagine you've just been admitted to the hospital, but there are no inpatient beds available yet. Instead of moving to the right unit to start your care, you wait — in the emergency department — sometimes for many hours. This is called ED boarding, and it's a widespread problem in American hospitals. It leads to longer wait times for everyone in the ER, lower quality of care for admitted patients, and enormous stress on frontline staff.
UCSD Health operates three hospital campuses — La Jolla, Hillcrest, and East Campus — that collectively see hundreds of patients every day. In theory, a patient who can't get a bed at one campus could be transferred to another with available capacity. In practice, health systems have no safe way to experiment: you can't reroute hundreds of real patients just to see if a policy might work better.
This tool is designed for hospital operations leaders and health system planners at UCSD Health — people responsible for capacity management, patient throughput, and inter-campus coordination. Rather than relying on gut instinct or historical averages, they can use this simulation to pressure-test transfer policies in a risk-free virtual environment before committing to any real change in operations.
We built a discrete event simulation (DES) — a computer model that recreates patient flow across all three UCSD Health campuses simultaneously. Think of it as a flight simulator for hospital operations: instead of risking real patients, administrators can test different transfer policies in the model, see what happens, and make smarter decisions before ever changing anything in the real world.
What makes our simulation unusual is that instead of inventing fictional patient paths, each virtual patient follows an actual historical journey drawn from a library of 150,337 real UCSD Health encounters — making it as faithful a replica of the real system as the data allows.
The Data
Our simulation is built on Admit-Discharge-Transfer (ADT) event data from UC San Diego Health — a de-identified record of every time a patient was admitted, moved between units, or discharged during a one-year observation period. Each event is timestamped and linked to a specific patient encounter, department, care tier, and campus.
The raw dataset contains 2.1 million events across 985,000 patient encounters. After filtering to patients who physically occupied hospital beds, we retained 150,337 complete patient trajectories suitable for simulation. For the length-of-stay prediction model, we held out 20% of encounters as a test set, with the remaining 80% used for training — ensuring the predictor was never evaluated on data it had seen before.
Jacobs Medical Center & Sulpizio Cardiovascular Center · 418 posted beds · Highest patient volume
Hillcrest Medical Center · 381 posted beds · Most available slack capacity
East Campus Medical Center · 302 posted beds · Smallest campus, critically constrained ICU
Patient arrivals vary meaningfully between weekdays and weekends — La Jolla averages 198 arrivals per weekday but only 149 per weekend day, a ~25% drop driven by fewer elective admissions. Our simulation models these patterns separately to reproduce the real rhythms of the health system.
The raw ADT data required a four-step cleaning pipeline before it was simulation-ready:
Step 1 — Filter to bed-occupying patients. We identified 11 patient classes that physically occupy beds and removed 22 outpatient classes, reducing the dataset from 2.19M to 1.15M rows.
Step 2 — Drop single-event encounters. 1,720 encounters (1.1%) had only one event and were dropped.
Step 3 — Tier mapping. Raw department labels were collapsed into four care tiers: ED, Floor, ICU, and Boarding. ED events required special handling because the department group field was never populated for emergency departments in the source data.
Step 4 — Timestamp-based ordering. We reordered all events by timestamp to handle sequence numbering inconsistencies in the source data.
Methods
The simulation models each patient as a sequence of states — ED → Floor → ICU → Discharge — across any of the three campuses. We added a fourth care state, Boarding, to explicitly model patients who have been admitted as inpatients but are physically stuck in the ED waiting for a bed upstairs. This gives us 12 active states in total (4 tiers × 3 campuses), plus discharge.
Rather than assigning patients synthetic paths, each arriving patient is assigned an actual historical trajectory randomly sampled from the 150,337-encounter library. Bed capacity for each of the 12 states was calibrated from the data itself by observing steady-state occupancy in an unconstrained simulation run.
To enable smarter transfer decisions, we trained a length-of-stay (LOS) predictor using quantile regression. At the moment a patient is admitted from the ED, the model predicts whether their stay is likely to be long — using three features available at that moment: how long they've already been in the ED, how many times they've been admitted in the past 90 days, and which campus they're at.
We predict the 75th percentile of expected LOS rather than the average, because hospital LOS distributions are heavily skewed by a small number of very long stays. Patients whose predicted LOS exceeds a threshold are flagged for possible transfer to a less congested campus before they occupy a scarce inpatient bed.
Several design decisions changed significantly after we saw early results:
Three quantile regression models were trained (q = 0.25, 0.50, 0.75) with log-transformed LOS as the response variable. Features: time in ED before admission, number of prior admissions in 90 days, and admitting campus (one-hot encoded). An 80/20 train/test split was used; residuals were evaluated on held-out data only.
When a transfer is triggered, the patient's remaining historical trajectory is discarded and a new path is constructed by iteratively sampling the next state from an empirical transition probability matrix, with durations drawn from fitted per-state LOS distributions (lognormal for floor/ICU, exponential for boarding).
Each source campus was tested independently at three thresholds: 3, 8, and 12 hours, over a 4,328-hour (~6 month) simulation window with a fixed random seed of 42.
Results & Impact
After a 25–30 day warm-up period, bed utilization stabilizes into realistic steady-state patterns. The results are striking: two of the three campuses are chronically operating near or above capacity, with serious consequences for patient wait times.
The animation below shows a 30-second snippet of the simulation running the recommended transfer policy — routing long-stay patients out of La Jolla at a 12-hour LOS threshold. Each figure represents a patient moving through the system in real time across all three campuses.
How to explore the full interactive animation:
30-second preview · La Jolla 12-hour transfer policy
Explore the Full Interactive Animation →
La Jolla — average daily bed utilization over the 6-month baseline simulation.

East Campus — average daily bed utilization over the 6-month baseline simulation.

Proportion of simulation time each resource spent above 80% utilization. La Jolla and East Campus are the most chronically constrained. ED resources across all campuses are near zero — the bottleneck is inpatient capacity, not the ED itself.

Average wait time per resource (hours) among all queue events in the baseline simulation. East Campus ICU stands out dramatically — patients waiting for one of only 8 beds face severe delays once that resource fills.
We tested whether routing long-stay patients away from their admitting campus at the moment of ED admission could reduce these bottlenecks. The answer depends critically on which campus the transfers originate from.

La Jolla boarding unit and ICU utilization under three LOS-based transfer thresholds vs. baseline. All three thresholds eliminate boarding congestion and meaningfully reduce ICU pressure.

Sensitivity of mean wait time to LOS transfer threshold, by source campus. Transferring from La Jolla reliably reduces system-wide congestion. Transferring from Hillcrest can overwhelm East Campus ICU under aggressive thresholds — a non-obvious load-shifting effect that shows why transfer policy design requires system-wide thinking.
The utilization percentages and wait times here are simulation outputs, not live measurements from UCSD Health operations. The most meaningful signal is comparative: how does a transfer policy perform relative to the no-transfer baseline, and does that pattern hold across multiple threshold conditions? Consistent patterns across thresholds are more robust findings than any single number.
Three directions stand out for future work: enriching the LOS predictor with clinical features available at admission; modeling simultaneous multi-campus transfer logic to capture system-wide interaction effects; and incorporating real-time capacity checks into the transfer trigger so that transfers are only authorized when the receiving campus has available beds.
The Team
This project was conducted through the Joan & Irwin Jacobs Center for Health Innovation at UC San Diego as part of the DSC 180B Capstone sequence. Data was provided by UC San Diego Health. Simulation was implemented in Python using SimPy and vidigi.
B.S. Data Science · UC San Diego, 2026
B.S. Data Science · UC San Diego, 2026
Chief Health AI Officer · UC San Diego Health
Assistant Adjunct Professor, Medicine · UC San Diego
This project builds on a body of prior DES research in hospital operations. Key works that informed our design and methodology: