Inspiration

In Lagos, ambulances and families rush to the nearest hospital without knowing whether it has a free bed, an open operating theatre, or the right specialist on duty. Full or unequipped hospitals turn patients away, and every wasted minute in transit can cost a life. We call this "blind patient routing", and we built ER-Sync to end it.

What it does

ER-Sync is a hospital emergency management and dispatch network. It connects responders, command centers, and regional hospitals in one live, synchronized grid.

  1. Instant incident intake: a responder types or dictates a messy emergency description.
  2. Clinical AI triage: the system classifies severity (ESI grade), extracts the specialists needed (e.g. Neurosurgery, Orthopaedics), and maps the equipment required (CT scanner, blood bank).
  3. Optimal hospital matching: in under a second, it scans live bed counts, on-duty doctors, and Lagos traffic ETAs.
  4. Guaranteed reservation: it alerts the destination hospital and reserves a trauma bed before the patient leaves.

Auto-failover: if the first hospital rejects a referral because of a sudden surge, ER-Sync reroutes the patient to the next best candidate in under 500 ms, with no human dispatch delay.

Modules include:

  • Command Center: the central operational view.
  • Emergency Intake: submit and triage incidents.
  • Geospatial Grid: a live map of hospitals and capacity.
  • Analytics & KPIs: referral acceptance, dispatch latency, network capacity, safety enforcement.
  • Hospital Dashboard: per-facility status, beds, specialists, and theatres/ICU/CT.
  • 1-Click Failover: a simulation of surge rerouting.

How we built it

ER-Sync uses a hybrid AI architecture with two layers:

  • Generative AI layer: an LLM (GPT-4o-mini, with an offline clinical fallback) turns unstructured emergency text into a structured clinical blueprint: severity, required specialists, resources, and a written rationale.
  • Deterministic safety layer: a mathematical matching engine picks the hospital using live telemetry (free beds, staff on duty, traffic ETA).

The LLM never chooses the hospital. An LLM must not hallucinate beds or put lives at risk, so it only produces the requirements. A deterministic engine makes the dispatch decision.

On top sits the AI Governor, which summarizes incidents, beds, specialists, and KPIs, explains bottlenecks, and drafts operational briefings. Human staff always review its recommendations before acting.

Stack: React 19 + TypeScript + Vite 6 + Tailwind CSS v4 on the frontend, with Leaflet and OpenStreetMap for the Lagos geospatial grid. The backend is FastAPI (Python) on Uvicorn, with SQLite and SQLAlchemy (seeded with 10 Lagos hospitals) and JWT auth.

Challenges we ran into

  • Keeping AI useful without making it dangerous. We solved it by strictly separating clinical understanding (AI) from dispatch (deterministic).
  • Making the system work when the LLM is unavailable, using an offline clinical fallback.
  • Keeping matching and failover fast enough (sub-second matching, sub-500 ms rerouting) for emergencies.
  • Modelling real-world constraints such as specialist availability and facility capability, not just bed counts.

Accomplishments that we're proud of

  • A full end-to-end flow: intake, triage, matching, reservation, and automatic failover.
  • A safety-first design where AI never decides which hospital a patient goes to.
  • A live geospatial grid and hospital dashboards that give commanders one view of the whole network.

What we learned

In safety-critical systems, AI works best as an interpreter and advisor while deterministic logic makes the final call. We also learned how much emergency outcomes depend on live, shared data between responders and hospitals.

What's next for ER-Sync

  • Integrating real hospital bed and staff telemetry feeds.
  • Live ambulance GPS tracking and voice-based incident intake.
  • Expanding beyond Lagos to other Nigerian states.
  • Deeper AI Governor insights for command centers.

Built With

Share this project:

Updates