01 / 05
The challenge
A group of independent clinics wanted to stop paying six-figure annual licences to a legacy EHR vendor whose product had visibly stopped evolving. They needed a modern patient-facing portal — appointment booking, telemedicine, prescriptions, records, payments — that could serve every clinic under a single technical footprint but keep patient data cleanly separated per tenant. And it had to be reviewable against HIPAA.
Every prior attempt to build this had died at the tenancy question. Single-DB with row-level filtering felt too risky for medical data. Full multi-DB felt operationally overwhelming for a team that didn't want to hire a full-time DBA. Everyone had opinions; nobody had shipped.
02 / 05
Our approach
We chose a hybrid: shared platform database (auth, billing, orchestration) plus a dedicated tenant database per clinic (patient records, appointments, notes). Tenancy for Laravel handled the routing; every request resolved a tenant early in the middleware chain and swapped the DB connection before any query touched patient data. Backups, key rotation and audit logs run per tenant.
For telemedicine we integrated Twilio Video. For prescriptions, we used Stripe Identity to validate the prescribing clinician on onboarding, and stored signed prescription documents in an encrypted S3 bucket keyed per tenant with per-object KMS envelopes.
03 / 05
Key decisions
Every write went through an event bus. Not because we're architecturally clever — because HIPAA audit trails demand it. Every patient record change, every prescription issued, every appointment created, every login attempt: written to an immutable audit log with a signed hash chain. Reviewable by the compliance officer without any engineer involvement.
We ran the entire stack behind a single Cloudflare zone with WAF rules calibrated to healthcare traffic patterns. No infrastructure lives outside the customer's region. All data is at rest under AES-256 with keys managed in KMS with strict rotation.
We refused to build our own video. Twilio Video is expensive per minute, but it is reviewable, monitored, and supported. Our job was patient outcomes, not becoming a video-infrastructure company.
04 / 05
What changed
24 clinics onboarded within 6 months of launch. Uptime is 99.98% (as of the most recent quarter). The compliance office signed off on HIPAA readiness after a third-party review with zero blocking findings. Patient no-show rate dropped from 18% to 9% because appointment reminders and one-tap reschedule now work.
05 / 05
Where we're headed
We're piloting an AI-assisted clinical note draft that pre-fills a SOAP note from a video-consultation transcript. The clinician always signs the final version — the model just saves them 4–6 minutes per patient. Early clinics are seeing 40+ minutes of reclaimed clinician time per day.