🔬 Hospital Outbreak Epidemic Curve Analysis Simulator
This simulation aids in understanding the dynamics of hospital outbreaks by analyzing epidemic curves and identifying key factors that contribute to their spread.
Plotting the Epidemic Curve — Turning a Case List into a Timeline
The epidemic curve (epi curve) is a histogram of case counts by date (or time) of symptom onset, and it is the single most important graphic in an outbreak investigation. Before any laboratory result confirms a pathogen, the shape of the epi curve already tells investigators what kind of outbreak they are facing, roughly when exposure occurred, and whether the outbreak is still unfolding.
- Line list: Core inputs (case ID, onset date/time, ward, exposure history)
- 1 unit: Typical bin width (≈ 1/4 of the incubation period)
- Onset date: X-axis (not report date or diagnosis date)
- Case count: Y-axis (stacked bars, one per case)
Building the line list before the curve
Every epi curve starts with a line list — a case-by-case spreadsheet capturing, at minimum: unique case ID, date and (when available) time of symptom onset, ward/unit location, demographic details, and relevant exposures (meals eaten, procedures performed, staff contact, roommate assignments).
Hospital outbreak investigators build the line list from multiple sources simultaneously: infection control surveillance flags, laboratory reporting of positive cultures, nursing incident reports, and active case-finding (reviewing charts of patients with compatible symptoms who were not yet flagged). Missing or inconsistent onset dates are the single biggest threat to curve accuracy — a case dated by "report date" instead of "onset date" can distort the whole shape.
Choosing the right bin width
The x-axis bin width should be roughly one-quarter of the pathogen's incubation period. Too wide a bin (e.g., weekly bins for a norovirus outbreak with a 24–48 hour incubation) smears a sharp point-source peak into an uninformative blur. Too narrow a bin (e.g., hourly bins over a month) creates a noisy, sparse curve where the underlying pattern is hard to see.
When the pathogen is not yet known, investigators often start with daily bins — the most common default — and re-bin after an agent is identified or suspected, refining the resolution to match its known incubation period.
Common construction pitfalls
Right-censoring: the most recent days on the curve are always undercounted, because cases with recent onset have not yet presented, been tested, or been reported. A curve that appears to be "declining" in the final 1–2 bins may simply be incomplete — not actually falling.
Reporting lag: hospital cases are often plotted by the date a positive culture resulted rather than true symptom onset, shifting the whole curve to the right and stretching its apparent duration.
Mixing exposure cohorts: combining cases from two genuinely separate exposure events (e.g., two different contaminated batches) into a single curve can create a false "double peak" that looks propagated but is actually two independent point-source events.
A properly constructed epi curve, updated daily as new cases are added, is often the fastest way to detect that an outbreak is accelerating, plateauing, or over — well before formal statistical analysis is complete.
Curve Shape Interpretation — Reading Transmission Mode from Geometry
Three classic epi curve archetypes correspond to three fundamentally different transmission mechanisms. Recognizing which archetype a real curve resembles — even roughly — immediately narrows the list of plausible hypotheses and points investigators toward the right kind of source investigation.
- 1 sharp peak: Point-source signature (range ≈ 1 incubation period)
- Plateau: Continuous-source signature (irregular, sustained elevated level)
- Successive waves: Propagated signature (spaced ≈ 1 incubation period apart)
- Norovirus ward: Classic hospital example (propagated, multi-wave pattern)
Point-source outbreaks — one exposure, one peak
A point-source outbreak occurs when a group of people is exposed to the same source over a brief, common period — a single contaminated meal, a single batch of compounded medication, a single contaminated procedure tray. Nearly all cases cluster within one incubation period of each other, producing a sharp, roughly log-normal-shaped rise and fall.
Hospital examples: a contaminated batch of parenteral nutrition causing a cluster of bloodstream infections within a day or two; a single mishandled surgical instrument tray causing a tight cluster of surgical site infections among patients operated on that day.
Continuous common-source outbreaks — an exposure that persists
When the source of exposure remains active over an extended period — a contaminated water system, a persistently colonized piece of reusable equipment, a chronically contaminated ice machine or sink drain — new cases accrue steadily for as long as the source is active. The curve rises, then plateaus at an elevated level (often with day-to-day noise), and only falls once the source is identified and removed.
The plateau is typically less sharply peaked than a point-source curve and can persist for weeks if unrecognized, because each day brings fresh exposures rather than a single cohort working through one shared incubation period.
Propagated outbreaks — the pathogen spreads itself
In a propagated (person-to-person) outbreak, the first cases expose secondary cases, who expose tertiary cases, and so on. Because each generation of transmission takes roughly one incubation period, the curve shows successive waves, each occurring about one incubation period after the last — a signature that antibiotics-resistant organism outbreaks, norovirus ward outbreaks, and respiratory virus outbreaks in hospitals frequently display.
Successive waves tend to grow, then shrink, as the pool of susceptible patients/staff is depleted or as isolation precautions interrupt transmission chains — producing a classic multi-peaked, decaying-amplitude curve.
Real outbreaks are rarely textbook-pure. A propagated outbreak can be seeded by a point-source event; a continuous source can trigger secondary person-to-person spread once patient density and poor hand hygiene amplify transmission. The curve shape is a strong clue, not a diagnosis.
Incubation Period Back-Calculation — Estimating the Exposure Window
Once a pathogen is suspected — from clinical presentation, a rapid test, or culture — its known incubation period distribution can be used to work backward from the epi curve's timing to estimate when exposure most likely occurred. This is often the step that narrows a source investigation from "sometime in the last month" to a specific shift, meal, or procedure day.
- 12–48 h: Norovirus incubation (median ≈ 1.5 days)
- 6–72 h: Salmonella incubation (median ≈ 1–2 days)
- 2–10 days: Legionella incubation (median ≈ 5–6 days)
- 7–21 days: Measles incubation (median ≈ 10–12 days)
The back-calculation logic
The simplest back-calculation subtracts the pathogen's median incubation period from the epi curve's peak (or from the date of the first case, for a tight point-source cluster) to estimate the most probable exposure date:
estimated exposure date ≈ peak onset date − median incubation period
For a wider estimate of the plausible exposure window, investigators subtract the minimum reported incubation period from the earliest case and the maximum reported incubation period from the latest case in the presumed cohort — bracketing the full range of dates during which exposure could plausibly have occurred.
Incubation periods are skewed distributions, not fixed numbers
Incubation periods are almost always right-skewed — commonly modeled as log-normal or gamma distributions — meaning a small number of cases will have unusually long incubation periods relative to the median. Back-calculation that relies only on the mean or median can therefore underestimate how far back the true exposure window extends.
More rigorous back-calculation deconvolves the entire epi curve against the full incubation period distribution (not just its median) to reconstruct an estimated exposure-time curve — effectively "un-smearing" the observed onset curve by the incubation period distribution to recover the underlying exposure curve.
Using the estimated window to focus the investigation
Once a plausible exposure window is bracketed — say, a 48-hour period four to six days before the curve's peak for a suspected Legionella exposure — investigators can cross-reference hospital records for that specific window: which water systems were serviced, which units had aerosol-generating procedures, which staff worked those shifts, which patients shared a room or equipment.
This dramatically narrows environmental sampling and interview efforts compared with reviewing weeks of records with no defined window, and it is often the pivotal step that converts a diffuse "when did this start" question into an answerable one.
In many real hospital Legionella outbreaks, back-calculating the exposure window from the epi curve peak directed environmental sampling teams to the specific water outlets and dates that ultimately yielded the matching environmental isolate — closing the investigation loop.
Ongoing Transmission Assessment — Is the Outbreak Under Control?
An epi curve is not a static, one-time analysis — it is a living tool that must be updated daily throughout an active outbreak. Comparing the observed trajectory of new cases against the trajectory expected for the suspected pattern tells investigators, in near real time, whether control measures are working or whether transmission is continuing unchecked.
- 2× max incubation: "Outbreak over" rule of thumb (with zero new cases)
- Rt: Effective reproduction number (>1 = still propagating, <1 = declining)
- Daily: Monitoring cadence (during an active hospital outbreak)
- Last 1–2 bins: Right-censoring caution (always undercounted, re-check daily)
Reading the trajectory against the expected shape
For each suspected pattern, there is an expected trajectory: a point-source curve should fall off within roughly one to two incubation periods after its peak; a continuous-source curve should plateau and only fall after the source is removed; a propagated curve should show successive, typically shrinking, waves as susceptible individuals are depleted or precautions take hold.
When the observed curve deviates from the expected shape — for example, new cases continuing to accrue well past the point a point-source outbreak should have resolved — that deviation itself is a signal: either the original hypothesis was wrong, a new exposure has occurred, or secondary person-to-person transmission has been seeded from the original point-source cases.
Declaring an outbreak resolved
Field epidemiology commonly uses a practical rule of thumb: an outbreak can be considered over when no new cases have occurred for a period equal to twice the pathogen's maximum incubation period, counted from the onset date of the last confirmed case. This buffer accounts for the natural variability in incubation periods and for reporting lag.
Declaring resolution too early — before this window has elapsed — risks missing a genuine continuation of transmission that simply has not yet presented; declaring it too conservatively delays the stand-down of costly control measures like enhanced isolation, cohorting, and restricted admissions.
Using Rt as a real-time propagation signal
For propagated outbreaks, tracking the effective reproduction number (Rt) — the average number of secondary cases generated by each case at a given point in time — provides a more quantitative read on whether transmission is still active. Rt is estimated from the ratio of new cases in one generation interval to new cases in the prior generation interval.
Rt persistently above 1 means each generation is producing more cases than the last — the outbreak is still propagating and control measures are not yet sufficient. Rt below 1 means each generation is producing fewer cases — transmission is being brought under control, even if new cases are still occurring.
Because the most recent days on any epi curve are right-censored (cases have not yet all presented or been reported), a curve that looks like it is "declining" in the last one to two bins should always be re-checked a few days later before concluding the outbreak is truly resolving.
Curve-Informed Control Strategy — Matching the Intervention to the Pattern
The epi curve's shape does more than describe an outbreak retrospectively — it actively directs which control strategy is likely to work. Point-source and propagated outbreaks require nearly opposite interventions, and applying the wrong one wastes time and resources while transmission continues.
- Find & eliminate: Point-source strategy (the single common exposure)
- Find & remediate: Continuous-source strategy (the persistent source, then monitor decay)
- Isolate & trace: Propagated strategy (break person-to-person chains)
- Hand hygiene: Universal measure (reduces risk across all three patterns)
Point-source pattern → find and eliminate the single exposure
When the curve shows one sharp peak, the control priority is environmental and epidemiological investigation aimed at identifying the single common exposure — a contaminated product lot, a single procedure, a single meal service. Once identified, the intervention is typically immediate and definitive: withdraw the product, quarantine the equipment, retrain the involved staff, or close the implicated service line.
Because the exposure was time-limited, no new cases are expected once the source is removed and the last exposed cohort has passed through the incubation period — the curve should fall to zero on a predictable schedule, and continued cases beyond that schedule suggest either an ongoing source or secondary transmission.
Continuous common-source pattern → find and remediate persistent contamination
A sustained plateau calls for environmental sampling focused on persistent reservoirs: water systems, drains, ice machines, reusable equipment reprocessing, or a chronically colonized healthcare worker. Because the source remains active, case accrual will continue indefinitely until it is found and eliminated — making rapid, systematic environmental investigation the priority over broad ward-wide precautions.
Once the source is remediated, the curve should show a clear inflection and decline within roughly one incubation period, providing a natural, curve-based confirmation that the correct source was found.
Propagated pattern → isolate cases and break transmission chains
Successive waves point away from a single fixable source and toward ongoing person-to-person spread. The priority shifts to interrupting transmission directly: contact/droplet/airborne isolation precautions as appropriate for the suspected organism, cohorting affected patients, restricting ward admissions and transfers, enhanced environmental cleaning, staff cohorting, and active surveillance/testing of contacts to catch secondary cases early.
Unlike the point-source and continuous-source strategies, there is rarely a single object or location to remove — success is measured by watching subsequent waves shrink in amplitude and eventually disappear as the transmission chain is broken generation by generation.
Because real outbreaks can start as one pattern and evolve into another — a point-source cluster that seeds secondary person-to-person spread on a crowded ward — control strategy should be revisited continuously against the updated epi curve, not decided once and left unchanged.
This simulation aids in understanding the dynamics of hospital outbreaks by analyzing epidemic curves and identifying key factors that contribute to their spread.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install