Smart Queue Health — Offline-First Hospital OPD Queue System
Live digital queue replacing paper tokens — instant sync, real wait prediction, works offline for govt hospitals
Paper→Digital
Token system replaced
<5 sec
Patient added in
100% offline
Works without internet
Overview
76% of India's 1.5 million clinics still run on paper token slips and shouting. Patients wait 2-3 hours with zero visibility into when they'll be called. Doctors have no dashboard. Receptionists manage everything from memory. Government hospitals in hilly and remote regions face this worse - they also have unreliable internet, making most cloud-only solutions useless. I built Smart Queue Health to solve both problems at once: replace paper tokens with a live digital queue that works even with zero connectivity. Process I identified two users — receptionist needs speed, patient needs visibility. I built on SQLite first since govt hospitals in hilly regions can't rely on internet. MySQL syncs every 30 seconds when online, retrying automatically after outages. For live sync, I used Socket.IO instead of polling — clicking "Call Next" instantly updates every connected screen, no refresh needed. For wait time, I rejected hardcoded estimates. I log real service time between call and serve, then average the last 50 records per priority — predictions improve as the system is used. I also handled concurrency early: if two receptionists click "Call Next" simultaneously, SQLite's serialized writes ensure only one patient is called, while the next request automatically picks up the following person. Results Built a fully working two-screen system: a receptionist dashboard that adds patients in under 5 seconds, and a patient display that updates live the instant a token is called. Wait time predictions are computed from real consultation data, not guesses. The system runs entirely offline on SQLite, with optional MySQL sync for hospitals with internet access. Also integrated optional RFID hardware so patients can register by tapping a card, with zero typing needed. Reflection Given more time, I would add SMS notifications so patients are alerted when they're 2-3 tokens away, instead of needing to watch the display screen continuously. I'd also build a doctor-facing dashboard to track per-counter performance, and integrate FHIR so patient records auto-populate during RFID registration instead of manual entry.