Kauvery Multispeciality Clinic — Real-Time Queue Management System
Eliminated paper token chaos — live queue sync across receptionist & patient screens in under 50ms
<50ms
Live sync speed
100%
Real-time accuracy
6
Edge cases handled
Overview
76% of India's 1.5 million clinics still run on paper token slips. Patients wait 2-3 hours with zero visibility into when they'll be called. Receptionists manage everything from memory — no dashboard, no tracking, no way to communicate wait times. This causes patient frustration, missed tokens, and complete chaos when the doctor takes a break. The core problem: there is no real-time information bridge between the receptionist and the waiting patient. Process I started by mapping the two main users — receptionist and patient — and their pain points separately. The receptionist needs speed and mistake-proofing. The patient needs visibility. I chose Node.js with Socket.io because HTTP polling adds latency and server load — WebSockets give instant push updates under 50ms. I first built the server state and socket events, then built the receptionist UI, then the patient display. I initially tried localStorage for state but realised it breaks across devices — so moved everything to server-side single source of truth. I then added edge cases: empty queue guard, doctor break mode, no-show handling, concurrent call protection with a lock, and reconnection catch-up so late-joining screens get full state immediately. Results Both screens sync in under 50ms with zero page refresh using WebSocket broadcast. Wait time is dynamically computed as (position + 1) × avgConsultTime — never hardcoded. The receptionist screen handles 6 edge cases: empty queue, no-show, doctor break, input validation, concurrent call lock, and new-day reset. Voice announcement and ding sound play automatically on patient screen when token changes. The system is deployable on Railway with zero configuration. Reflection I would add a database layer (SQLite or Firebase) so queue state survives server restarts. I'd also add multi-doctor support with separate queues per consultation room, and SMS notifications via Twilio so patients can wait outside instead of in the clinic. Initially I considered using polling instead of WebSockets to keep it simpler, but I'm glad I chose Socket.io — the real-time experience is exactly what makes this solution genuinely useful in a real clinic.