28 / Healthcare
WhatsApp-Native Hospital Pharmacy
We moved prescriptions into WhatsApp with a strict safety machine behind them, so a doctor just sends a script, confirms what the AI read back, and the pharmacy fills it, with nothing to install.
- Client
- Meher Pharma (India) Limited
- Stack & approach
- HealthcareWhatsApp Cloud APIState MachineAI ParsingPostgreSQL RLS

The problem
The patient left with a paper slip and filled it anywhere, so nothing recorded how many in-house prescriptions were filled in-house. The pharmacy learned of a prescription only when paper reached the counter, and dosage was re-keyed off handwriting. A hospital cannot absorb a parsing error.
Solution & architecture
Capture inside WhatsApp, with a formal state machine behind it. The doctor sends a prescription as a form, voice note, photo or text: no install, no login. It is parsed, read back and confirmed by the doctor before recording. The lifecycle is 10 declared states accepting only valid transitions, so an invalid step is impossible to express. PostgreSQL row-level security isolates each hospital.
Why it is built this way
Safety by construction
Invalid transitions cannot be expressed
Confirmed before recorded
No parsing error reaches the record
Per-hospital isolation
Row-level security at the database


