‹ work
Medical AI safety · 2026
Unmed — Medical AI Scribe Safety
Safety-critical feature work on a Dutch medical AI scribe that turns a consult recording into a structured clinical note. My work makes the AI's output trustworthy: every medication is verified, every note field shows its confidence, and nothing reaches the record silently wrong.
snapshot
- type
- Medical AI safety
- period
- 2026
- source
- Private client project · Unmed
- build
- Solo feature work · in production, verified by senior developers · TDD + adversarial audits
problem
A scribe that extracts facts from a spoken consult can be confidently wrong, and a silent error in a clinical note is dangerous. The output had to be verifiable: no silently accepted medication mistakes, no over-confident note fields, and no silent corruption of the record.
outcomes
In production: a misheard but real medication is always surfaced for review instead of silently accepted
Clinical note fields expose status and confidence, so uncertain lines stand out instead of reading as fact
Debugged a corrupted-recording failure down to the byte level (two overlapping recorders inserting a chunk before the WebM header) and fixed it with a re-entrancy guard
what i built
Deterministic medication terminology validation: every spoken drug name is matched to a validated coding, not a raw LLM guess
Medication review with click-to-fix: every drug term gets a colour-coded status (including exact matches previously accepted silently) and is one-click correctable, with a training-consent step defaulting to off
Fact-grounded WSOEP note fields: status and confidence are derived purely from the extracted facts, values are nulled when the facts don't support them, and human review is forced on non-present facts
Note edits reject blank input and insert the chosen name literally instead of via a regex, preventing silent corruption of the record
Teams remote-consult recording: tab and screen audio is mixed with the doctor's microphone via the Web Audio API into the existing transcription pipeline, feature-flagged and cross-platform
Verified with TDD (pytest and Vitest) plus adversarial multi-agent code audits that found and fixed real bugs, including stream leaks and 7 medication-review edge cases
tech stack
FastAPIPythonSQLAlchemyAlembicPostgreSQLAzure OpenAIAzure SpeechReact 19TypeScriptWeb Audio APIVitestDocker
Case study
This project is documented here as a case study; the source is not published as a public repository.