A patient arrives at an emergency department on a busy evening. The waiting room is full, triage is moving, beds are tight, and several patients are waiting for lab or imaging results. By the time the patient is roomed and evaluated, the delay has already become the story.
The easy explanation is staffing. The department needed more people.
That may be true. It may also be incomplete. The same delay can come from a surge in arrivals, a sicker case mix, a lack of open beds, a diagnostic turnaround problem, or admitted patients boarding in the ED because inpatient capacity is constrained.
A delay is not always one problem. It is often the same visible symptom created by several bottlenecks at once.
Share: An emergency department delay is rarely one thing. Demand, acuity, staffing, beds, diagnostics, and boarding pressure can produce the same visible wait. #Causality #Healthcare #EmergencyMedicine
Synthetic teaching model
This article uses a synthetic teaching model. It is not clinical, operational, financial, legal, or policy advice. The sources below justify why some bottlenecks belong in the model. The probabilities are invented so we can show how the reasoning changes.
The Problem Is Not Always One Thing
Emergency departments absorb unscheduled demand. Patients arrive at all hours, with different levels of urgency, and the ED has to decide who can wait, who needs a bed now, and which workups need scarce people, rooms, labs, imaging, or specialty coordination.
That makes delay hard to explain from a single number. If the median wait rises on a Tuesday night, the cause might be more arrivals. It might be a higher-acuity mix. It might be slower diagnostics. It might be that admitted patients cannot leave the ED because inpatient beds are full.
The AHRQ PSNet discussion of ED timeliness describes the standard input-throughput-output way of thinking about crowding: demand entering the ED, care processes inside the ED, and the ability to move patients out of the ED when treatment or admission decisions are made [1]. A systematic review by Morley and colleagues similarly emphasizes that crowding has many causes and consequences, depending on where the patient journey is constrained [2].
That is the motivation for a model. Not because a small model can run a hospital, but because it can force us to say which bottleneck we are talking about.
Why The Obvious Explanation Can Mislead
Suppose a delayed shift had high patient volume and low effective staffing. Conditioning on those facts can answer one question:
Given what we saw, how likely was a delay?
It does not automatically answer a different question:
If staffing had been set to adequate, how much delay risk would have changed?
The distinction matters because low effective staffing may itself travel with other pressure. A shift can look understaffed because arrivals were high, because boarding tied up rooms, or because the acuity mix required more work per patient. Treating the observed association as the whole answer can overstate or understate what a staffing action would do.
That is why the example below uses a Bayesian belief network (BBN). A BBN lets us draw the bottlenecks as nodes, assign simple states, and ask how the target probability changes as evidence or interventions change.
The Question For This Example
The target is deliberately simple:
What is the probability that a synthetic ED patient-flow episode produces a delay over 60 minutes?
The model is small enough to inspect. It has seven variables:
PatientVolume: normal or highTriageAcuityMix: routine or highBoardingPressure: normal or highStaffingLevel: adequate or lowBedAvailability: open or tightDiagnosticBacklog: normal or backloggedDelayOver60: no or yes
The synthetic probabilities are not estimated from hospital data. They are toy values chosen to demonstrate how evidence and interventions differ.
A Small Model Of The Situation
Here is the companion graph. It says that arrivals, acuity, boarding pressure, effective staffing, bed availability, and diagnostic backlog can all feed the delay outcome.

The graph is source-informed, but not source-estimated. Published ED-flow research supports the idea that crowding can involve input, throughput, and output constraints [1, 2]. AHRQ’s Effective Health Care Program nomination on ED crowding highlights boarding, hospital overflow, delays, errors, patient harms, and length-of-stay concerns [3]. Laboratory turnaround time has been associated with ED length of stay in a retrospective cohort study [4]. A BMC Health Services Research study on radiology transportation time shows how imaging processes can also become part of ED flow [5].
Those sources justify the presence of broad bottleneck categories. They do not justify the exact conditional probability table values in this toy model.
What the sources support
The sources support broad ED-flow mechanisms: input pressure, throughput constraints, output constraints, diagnostic turnaround, and boarding. They do not estimate this article’s node states, thresholds, or conditional probability values.
What Is Sourced And What Is Synthetic
PatientVolume-> delay pressure- More arrivals can create input pressure. The structure is backed by ED crowding and input-throughput-output literature [1, 2]. The normal/high cutoff and all probabilities are synthetic.
BoardingPressure->BedAvailabilityandDelayOver60- Output constraints can keep admitted patients in the ED and reduce usable capacity. The structure is backed by AHRQ and crowding literature [1, 2, 3]. The state definitions and effect size are synthetic.
DiagnosticBacklog->DelayOver60- Diagnostic turnaround can affect ED length of stay. The structure is backed by laboratory and radiology turnaround studies [4, 5]. The backlog cutoff and CPT values are synthetic.
StaffingLevel->DiagnosticBacklogandDelayOver60- Effective staffing changes operating capacity. This is a plausible teaching assumption consistent with throughput framing. The exact staffing states, thresholds, and probabilities are synthetic.
TriageAcuityMix->DiagnosticBacklogandDelayOver60- Higher acuity can require more resources and time. This is source-informed by triage and resource-need framing [1]. The state cutoffs and all CPT values are synthetic.
The public claim is modest: the structure is partly grounded in published ED flow research. The probabilities are synthetic so we can demonstrate how the model updates under evidence and interventions.
The Query The Graph Cannot Show By Itself
The shared graph is the best way to inspect the structure. It shows that PatientVolume, BoardingPressure, and StaffingLevel all sit upstream of DelayOver60. The visual model can show posterior changes when evidence is entered.
The action question needs a code-backed query because we want to distinguish observing low staffing from setting staffing differently. Using the Darkstar Python SDK, the same model can answer both questions: what changes after we observe a busy, low-staffing shift, and what changes if we set staffing to adequate in that same high-volume context. After loading the model JSON, the query shape looks like this:
import json
from darkstar import DiscreteModel
TARGET = "DelayOver60"
def probability_after_observing(model, evidence):
query = {"nodes": [TARGET], "evidence": evidence}
result = json.loads(model.pquery(json.dumps(query)))
return result[TARGET]["yes"]
def probability_after_setting(model, setting, evidence):
changed_model = model.intervene(json.dumps(setting))
return probability_after_observing(changed_model, evidence)
with DiscreteModel(model_json) as model:
observed = probability_after_observing(
model,
{"PatientVolume": "high", "StaffingLevel": "low"},
)
staffed = probability_after_setting(
model,
{"StaffingLevel": "adequate"},
{"PatientVolume": "high"},
)
The first query asks what we learn after observing a busy, low-staffing shift. The second keeps the high-volume context but sets effective staffing to adequate. The article source includes a standalone script that computes the same synthetic numbers from the BBN specification for the chart below.
Baseline delay risk: 29.4%
Observed high volume + low staffing: 55.2%
High volume with staffing set adequate: 33.8%
The SDK-shaped distinction is the point: observing a stressed shift and setting one condition differently are not the same operation.
What We Learn By Observing The Situation
In the synthetic model, the baseline probability of a delay over 60 minutes is about 29 percent. After observing PatientVolume=high and StaffingLevel=low, the probability rises to about 55 percent.
That is an associational query. It says:
Given these observed facts, the model assigns higher delay risk.
It does not say:
Staffing alone caused the delay.
The observed facts are entangled. High volume also affects bed tightness and diagnostic backlog. Boarding pressure affects usable capacity. Low effective staffing is part of the story, but it is not the whole graph.

What Changes If We Set One Condition Differently
Now ask the intervention question:
In this model, if the shift is high-volume but effective staffing is set to adequate, what happens to the delay probability?
The toy model moves from roughly 53 percent under low staffing in the high-volume context to roughly 34 percent with staffing set to adequate. That is a large change in this synthetic example, but it is not a staffing policy estimate for a real hospital.
The useful lesson is structural. If you only look at a delayed, busy, low-staffing shift, you may collapse several bottlenecks into one explanation. The model forces the article to ask which condition is being observed and which condition is being changed.
What This Example Cannot Prove
This BBN cannot prove that a specific patient would have been seen within 60 minutes if staffing had been adequate. A true patient-level counterfactual would need stronger assumptions, more variables, and data that are not present here.
The example also does not say which operational fix is best. Staffing, triage flow, bed management, lab turnaround, imaging workflow, and boarding reduction are different levers. A real ED improvement project would need local data, clinical review, operational constraints, equity checks, and safety review.
The model is still useful as a teaching object because it separates three questions:
- association: what do we learn after observing a high-pressure shift?
- intervention: what changes when one condition is set differently?
- limitation: what would require stronger assumptions or real data?
Try The Model
Open the companion Darkstar model: Emergency Delay Teaching BBN
Try this in the shared model
Change PatientVolume to high, then add StaffingLevel=low, and compare the posterior probability of DelayOver60=yes. Then use the code-backed intervention example to compare that observation with setting staffing to adequate in the same high-volume context.
This is a synthetic teaching example, not operational or clinical advice.
Download The Model And Code
Download the teaching package: ED delay teaching package ZIP
The package includes the synthetic model JSON, the reader-facing Python query script, tests, and selected figure assets. It does not include chart-generation code, the Darkstar Python SDK package, SDK binaries, native runtime files, licenses, API tokens, signed URLs, private data, or operational hospital data.
Sources
- Some Patients Can’t Wait: Improving Timeliness of Emergency Department Care, AHRQ PSNet, accessed May 19, 2026.
- Emergency department crowding: A systematic review of causes, consequences and solutions, Morley et al., PLOS ONE, 2018, accessed May 19, 2026.
- Emergency Department Crowding, AHRQ Effective Health Care Program, content reviewed June 2023, accessed May 19, 2026.
- Shorter laboratory turnaround time is associated with shorter emergency department length of stay, Vrijsen et al., BMC Emergency Medicine, 2022, accessed May 19, 2026.
- Improving Emergency Department radiology transportation time: a successful implementation of lean methodology, Hitti et al., BMC Health Services Research, 2017, accessed May 19, 2026.


Leave a Reply