Emergency? Call 911
Demo network: simulated facilities and wait times.
Triage

On a simulated busy Saturday at medium urgent-care capacity, people routed by Triage reached treatment sooner.

300 simulated people with minor injuries, noon to 4 PM, played twice with the same people and the same other arrivals: once with everyone at their nearest ER, once routed by Triage one person at a time. simulated network

Triage is a working prototype, shown on hypothetical cases in a simulated Triangle network. It tells you where a non-emergency injury can be treated and how long the simulated wait is, and it sends you to the ER or 911 at the first warning sign.

1The problem

Emergency rooms are where most people take an injury, and a visit takes hours.

155.4 million

emergency department visits in the U.S. in 2022. 43.5 million of them were injury-related.

40.6%

of those visits had the patient seen in fewer than 15 minutes. The rest waited longer.

187 min

median time a patient who is sent home spends in a North Carolina emergency department. The national median is 162 min.

Sources

NumberWhat it measuresSource
155.4 millionU.S. emergency department visits, 2022 CDC National Center for Health Statistics, FastStats: Emergency Department Visits (National Hospital Ambulatory Medical Care Survey, 2022 National Summary Tables)
43.5 millionInjury-related visits among them (includes poisoning and adverse effects), 2022 CDC National Center for Health Statistics, FastStats: Emergency Department Visits (same survey)
40.6%Visits with the patient seen in fewer than 15 minutes, 2022 CDC National Center for Health Statistics, FastStats: Emergency Department Visits (same survey)
187 minNorth Carolina: median time in the emergency department before leaving, excluding transfers and psychiatric patients (measure OP-18b), Oct 2024 to Sep 2025 CMS Provider Data Catalog, Timely and Effective Care - State
162 minUnited States: the same measure and period CMS Provider Data Catalog, Timely and Effective Care - National

Checked on 11 Oct 2026. These are the only real-world numbers on this page. Every other number is from the simulated network and says so.

2How Triage decides

Three separate jobs. Gemini only fills in a form. A fixed checklist catches emergencies. The router ranks places only after that.

You describe itTalk or type for 30 seconds.
Gemini pre-fillsOnly what you said. Anything else stays blank. It decides nothing.
You answer every itemYes, no or not sure, for each warning sign.
Fixed checklist decidesPlain code in router.js matching a pre-set list based on ACEP warning signs.
Any yes or not sure
Go to the nearest ER now, or Call 911The screen names the item that triggered it. Always the nearest ER, never ranked by wait.
Outside the four injury types
ER or your doctor's nurse lineNever a guess.
Every item no
Rank placesOpen, treats this injury, serves this age. Total = approx. drive + median simulated wait.
You pick oneTop three, with wait ranges and reasons.
You join that lineAt your arrival time. The next person's ranking sees it.

The results screen always says: "These places can treat this type of injury. A clear checklist doesn't rule out a serious injury, so if anything gets worse or seems wrong, go to the ER or call 911."

3The queue model

  • Arrivals. People walk in at random (Poisson), at a rate that depends on the kind of place and the hour: quiet overnight, busiest in the evening.
  • Treatment slots. Each place has a fixed number of rooms with staff. A free slot takes the next person in line. Treatment times are random around an average.
  • Lines. People in treatment are tracked apart from people waiting.
  • Emergencies first. ERs also get emergencies. They go to the front of the line but never interrupt someone already being treated.
  • Your wait starts when you arrive, after the drive, not when you press the button.

The method is real; the numbers are not. They were written down once in sim.js with the reason beside each. The two ER arrival rates were lowered once from the first plan, because the first values gave ERs about three times more work than they could do. They were re-set against the CMS figure in section 1 before any Triage comparison was run, and never tuned afterwards.

Invented for the demo. Read live from sim.js and the facility list.
SettingERUrgent careOrthoKids'

4Wait ranges simulated wait range

Simulated wait by arrival time

Show the numbers
Arrive at10th25thMedian75th90th

The app never shows one number. From the lines as they are now, it plays the next three hours 200 times with different random arrivals and treatment times, and shows the middle half of the results, rounded to 5 minutes.

The range describes uncertainty inside the model. It is not a prediction for any real hospital.

5The adoption curve simulated network

Average wait, by the share of the 300 who use Triage

Show the numbers

People who don't use Triage go to their nearest ER. Someone who uses it at 10% still uses it at 25%, so each step only adds users.

The cost is real. Every person routed to a clinic makes that clinic's line longer for the people who were already going there. The orange line is their wait.

The demo Saturday (seed 17), all three capacities

LowMediumHigh
ERTriageERTriageERTriage
"ER" = everyone goes to the nearest ER. Same numbers as the Busy Saturday page.

6The herding test simulated network

Where the 300 were sent, medium capacity

Show the numbers
PlaceTriage: sentlongest waitNaive: sentlongest wait

"Won't everyone flood the quiet clinic?" The naive router is the same ranking code with the feedback switched off: it never sees a line change and never counts the people it has already sent.

Triage adds each person who picks a place to that line at their arrival time, so the next person's ranking already includes them.

LowMediumHigh
TriageNaiveTriageNaiveTriageNaive
Demo Saturday (seed 17), all three capacities, whatever they show.

7Safety validation

#DescriptionChecklist answersExpectedActualResult

"Actual" is worked out in this browser, now, by the same router.js the app uses, from the checklist answers the person in each case would give (every other item answered no). Whether Gemini pre-fills only what each description says is a separate test against the live model (tests/run-safety.js); a wrong pre-fill fails the case there. These test prototype guardrails. They are not clinical validation.

8Limitations and next steps

  • The hospital feed is simulated. The 12 facilities, their lines and every wait are invented. With real feeds the same code would run on real lines.
  • The parameters are invented. Arrival rates, treatment times and slots are plausible guesses. Real data would replace every one of them, and could change the results on this page.
  • Drive times are approximate. Straight-line distance × 1.3 at 40 km/h. No roads, no traffic, no transit.
  • The simulated Saturday is harsh on ERs. Nobody gives up and leaves a line, and all 300 extra people arrive in four hours. That is why the nearest-ER waits run to many hours.
  • The checklist is a prototype guardrail. It is based on published ACEP warning signs and has not been reviewed by a clinician. It needs clinical validation before real patients rely on it. A clear checklist doesn't rule out a serious injury.
  • Routing moves the wait, it doesn't remove it. Clinics' other patients wait longer, and some people are treated after closing time. Section 5 shows both.
  • Picks stay on this laptop. A pick changes only the simulation in this browser. A real network would keep the shared lines on a server.
  • Next: one real wait-time feed beside the simulated ones, real drive times, transit and rideshare, cost and insurance.