Inspiration
When a GP changes a care home resident's medicine, the news often travels by phone, email or letter, if someone picks up and writes it down. The home's copy of the prescription goes out of date silently, and nobody finds out until a wrong dose has been given. In a UK study of 256 care home residents, around 7 in 10 had at least one medication error, and the causes included poor teamwork between home, practice and pharmacy, inaccurate medicine records and reliance on verbal communication (CHUMS study, Barber et al., 2009).
What it does
The care home, GP practice and pharmacy each run their own copy of Synthrax. The copies sync whenever they can reach each other, with no central data server, and each site keeps working safely when cut off.
- It notices what it should have heard. Margaret's INR blood test was taken, no dosing instruction has arrived and the home can't reach the GP, so her warfarin is held at the 6pm round.
- Claude for words, rules for safety. Claude turns a carer's messy note into draft records and writes short summaries for the GP. Holds and warnings come from plain rules written with a pharmacist, and they work with the AI switched off.
- Humans decide. Only the GP changes a medicine. After a reconnect, anything that affected a dose while a site was offline appears as a conflict card for the GP to review.
- The pack carries the version. Every pharmacy label has a QR code with the prescription version, so an offline home can still tell a newer prescription exists.
How we built it
Everything is Python. Each site is one process: a FastAPI app with NiceGUI screens. Each site keeps an append-only SQLite event log and pulls missing events from the other sites every two seconds. Current state is derived from the log, and seven deterministic safety rules (R1 to R7) run on that state. QR labels are made with segno and read from photos with OpenCV. A shared demo clock lets us move through the story at 12:00, 14:00, 16:00 and 18:00 on cue.
The LLM is Claude (Claude Haiku), used for two language jobs only: turning a carer's messy note into draft records, and writing 3-line summaries for the GP. GP summaries contain no names, and nothing sent to Claude includes surnames, rooms or NHS numbers. Its output must be valid structured data, or the app falls back to manual entry and rule-based summaries. It never makes a safety decision, so every safety feature still works with it switched off. For the live demo we use cached responses, so it doesn't depend on venue wifi.
We used Claude as a coding assistant while building the project.
Challenges
- Sync with no central server. An append-only log means events are never edited or duplicated, but reconciling what happened while a site was offline took care. The answer was conflict cards that a human reviews, not silent merging.
- Keeping Claude out of the safety path. We had to make sure every safety feature still works when the AI is off, and that malformed AI output is rejected rather than trusted.
- Time. Rules like "INR taken over 24 hours ago" depend on the clock, so we built the core logic without a real clock and tested it against a controllable demo clock.
- Reading real photos. Photos of labels come with blur, glare, angles and several codes at once, so the scanner tries multiple detectors on cleaned-up versions of the image.
What we learned
- Safety logic should be readable and deterministic. A pharmacist can check a rule. Nobody can check a prompt.
- Testing against written clinical cases made the rules far more trustworthy: all 37 of the pharmacy lead's test cases must fire when they should and stay silent when they shouldn't.
- "Humans decide" is a design constraint, not a disclaimer. It shaped the whole product, from Claude drafting records to conflict cards.
What's next
A pilot with one care home, its GP and its pharmacy, along with NHS clinical safety sign-off (DCB0129/DCB0160) and data protection compliance.