Inspiration

A friend of one of our teammates was in a medical emergency late at night. She reached out for help, but the response process was chaotic: the same situation had to be explained multiple times across different people. Every handoff cost time. That story made something clear to us: in urgent situations, the biggest failure is often not effort, it is workflow friction.

Hospitals and clinics deal with this every day:

  • overloaded front desks,
  • missed inbound calls,
  • repetitive intake questions,
  • delayed escalation of urgent cases,
  • and fragmented handoffs between staff.

We built WonkaCare to reduce that friction. Our goal is not to replace nurses or make diagnoses.
Our goal is to help hospitals and clinics answer more calls, capture intake faster, and surface urgent cases sooner so human staff can make decisions with better context.

What it does

WonkaCare is an AI-powered voice agent for hospitals that aligns with all HIPAA requirements. It answers every patient call, conducts real-time medical triage, and routes emergencies to a nurse's phone in seconds - no hold, no voicemail. Non-urgent calls get a full AI-generated summary with the symptoms, and risk flags delivered to a triage operator's dashboard without a human ever picking up. Doctors get a dedicated dashboard with the patient's full context - call transcript, AI triage summary, medical history, medications, test results - ready before they walk into the room. Every call also feeds structured data (symptoms, zip codes, timestamps) into an epidemiological analytics engine that detects outbreak patterns, geographic hotspots, and symptom velocity spikes. A single heart attack is a medical event. Fourteen in one zip code is a public health emergency - and WonkaCare catches it in hours, not weeks.

How we built it

Stack: Next.js 16, React 19, TypeScript, Tailwind CSS 4, Recharts, Neon DB. Voice pipeline: Patient calls come through Vapi, which streams live events via webhook to our backend. The webhook processes transcript segments, status updates, and conversation syncs into a LiveCallStore - an EventEmitter-based in-memory singleton managing all active call state. AI triage: Transcripts are debounced (3s after last update) and sent to Google Gemini 2.0 Flash with a medical triage prompt. Gemini returns structured JSON: patient info, symptoms, risk flags, triage level (HIGH/MED/LOW), summary, and recommendation. Real-time streaming: The dashboard receives updates via SSE. A custom useLiveCalls() hook consumes the stream so operators see transcripts, AI summaries, and triage decisions live. Epidemiological analytics: Symptom clustering detects outbreak patterns and surfaces them as geographic hotspots, symptom velocity charts, and threat-level alerts.

Challenges we ran into

Call state management. Vapi sends events out of order - fragments, full syncs, abrupt endings. We built a reconciliation layer with debounced AI summarization to keep state consistent without hammering the Gemini API. Fulfilling the HIPAA requirements. Phone numbers are masked, raw audio never persists on our servers, and the in-memory store doesn't write PHI to disk. We designed around production HIPAA constraints (E2E encryption, BAAs, audit logging) from day one. Demo storyline. Four major surfaces needed to tell one coherent story. We followed a single patient from call to triage to hospital to aftercare, which let us showcase every feature naturally.

Accomplishments that we're proud of

Emergency calls get forwarded to a real nurse's phone in under 30 seconds - fully automated, no human dispatcher needed. The AI triage engine extracts structured medical data from natural conversation in real time, not after the call ends. The epidemiological analytics layer is something no other voice AI product offers - we're turning phone calls into public health surveillance. The entire system works end-to-end live: call in, get triaged, see the dashboard update, see the doctor dashboard populate.

What we learned

Real-time systems are unforgiving, race conditions between webhook events, SSE streams, and Gemini API calls forced us to think carefully about debouncing, state reconciliation, and concurrency. Medical AI requires extreme precision in prompt engineering. A vague triage level can mean the difference between sending someone home and sending an ambulance. Building for healthcare means thinking about compliance from the architecture level, not bolting it on after.

What's next for WonkaCare

Scaling to low-resource regions: where there's one doctor per ten thousand people, WonkaCare becomes the triage system they never had. Multilingual support: critical for developing countries where patients don't speak the dominant language. EHR integration: connect to Epic so the doctor dashboard pulls real patient records, not just call data. County health department alerts: automatically notify public health officials when outbreak thresholds are crossed. Scaling to low-resource regions: where there's one doctor per ten thousand people, WonkaCare becomes the triage system they never had.

Built With

+ 1 more
Share this project:

Updates