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.
emergency department visits in the U.S. in 2022. 43.5 million of them were injury-related.
of those visits had the patient seen in fewer than 15 minutes. The rest waited longer.
median time a patient who is sent home spends in a North Carolina emergency department. The national median is 162 min.
Sources
| Number | What it measures | Source |
|---|---|---|
| 155.4 million | U.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 million | Injury-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 min | North 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 min | United 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.
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.
| Setting | ER | Urgent care | Ortho | Kids' |
|---|
4Wait ranges simulated wait range
Simulated wait by arrival time
- Median run
- Middle half of runs (25th to 75th percentile)
- 10th to 90th percentile
Show the numbers
| Arrive at | 10th | 25th | Median | 75th | 90th |
|---|
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
- Average ER wait (non-emergency patients)
- Average wait, the clinics' other patients
- Middle 80% of 50 simulated Saturdays
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
| Low | Medium | High | ||||
|---|---|---|---|---|---|---|
| ER | Triage | ER | Triage | ER | Triage | |
6The herding test simulated network
Where the 300 were sent, medium capacity
- Triage: one person at a time, lines updated after every pick
- Naive: same ranking, but it only ever sees the noon lines
Show the numbers
| Place | Triage: sent | longest wait | Naive: sent | longest 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.
| Low | Medium | High | ||||
|---|---|---|---|---|---|---|
| Triage | Naive | Triage | Naive | Triage | Naive | |
7Safety validation
| # | Description | Checklist answers | Expected | Actual | Result |
|---|
"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.