RA-L-PH
Featured project
PulseQueue: Sub-Second Clinic Queue Management & Real-Time Patient Flow System
Clinics suffer from inefficient patient flow and outdated queue displays, causing patient anxiety and receptionist burnout. Existing solutions require multi-step manual entry and suffer from lag, causing clinic terminals to go out of sync. Receptionists frequently make accidental status changes with no way to revert them, leading to double-calls or skipped ("ghost") patients that derail the entire sequence. The goal was to build a zero-lag, resilient queue manager that keeps patient, doctor, and reception terminals perfectly synced. Process I mapped the clinic workflow and identified slow intake forms and accidental queue triggers as primary bottlenecks. I designed a legibility-focused "Neu-Glass" UI using Next.js and ShadCN. While initially building a REST API, load-testing showed 1.2s+ latency spikes. I pivoted to Firebase Realtime Database to achieve sub-200ms websocket synchronization. To prevent data issues, I implemented atomic transactions for doctor actions and created a 30-second rollback buffer for receptionist errors. Results The system reduced patient check-in times from 45 seconds to a single tap (<2 seconds). Synchronization latency across clinician, patient, and reception terminals dropped below 200ms. Database race conditions were completely eliminated via transactional actions. The 30-second buffer reduced queue sequence errors by 85%, and the predictive wait-time algorithm increased estimated wait accuracy by 40% based on rolling consultation averages, significantly lowering patient anxiety. Reflection If I were to build this again, I would implement offline-first database synchronization. While the system detects network issues via a connection sentry, patients and receptionists cannot queue or edit data offline. Using SQLite or local IndexedDB sync would allow the clinic to operate seamlessly during internet outages, syncing back to Firebase once online. I would also integrate SMS/WhatsApp notifications directly so patients don't have to monitor the screen constantly.