In use, running on-premise
MedScribe AI
Turns a doctor's voice dictation into a structured clinical record, with an AI safety review of every prescription.
One 30-second dictation fills all 7 fields of the patient record.
Code in a private repository. Walkthrough available on request.
- Where
- IMC Hospital, through Contech International
- My role
- AI and backend engineer
- When
- 2026
- Stack
- Python
- FastAPI
- PyTorch (CUDA)
- Google MedASR
- MedGemma 27B
- RapidFuzz
- Flutter app
- Laravel EMR
The problem
An outpatient doctor in Pakistan can see 60 or more patients a day and writes every prescription by hand. Each record then has to reach the hospital's EMR with the exact medicine and test items that the pharmacy and lab work from.
MedScribe lets the doctor tap record in the hospital's Flutter app, speak the case, and get back a structured record to review and approve.
How it works
7 steps, from input to result. They light up as you scroll.
Doctor dictates
The doctor records the case in the hospital's Flutter app, usually in about 30 seconds.
Speech becomes text
Google MedASR, a speech model trained on medical vocabulary, transcribes the audio on the hospital's GPU.
Drugs and tests are matched
A rules and RapidFuzz matching engine resolves every medicine and test to the hospital's own catalogue of 12,640 medicines and 1,694 lab tests, down to the item ID the pharmacy dispenses against.
The record is structured
The dictation is split into 7 EMR fields: vitals, history, allergies, examination, diagnosis, prescription and lab orders.
AI safety review
MedGemma 27B checks each prescription for dosing errors, drug interactions and contraindications.
Output is validated in code
Every model output is checked against a schema before it can reach the EMR.
Doctor approves
The parsed record appears in the app. The doctor reviews it, edits if needed, and approves it into the Laravel EMR.
What I built
- Designed and built the FastAPI backend that connects the Flutter app, the speech and language models, and the hospital's Laravel EMR.
- Built the matching engine that maps dictated drug and test names to exact catalogue items.
- Prototyped the models on rented Vast.ai GPUs, then moved production inference onto the hospital's own GPU server.
- Kept the doctor in control: the AI suggests the record and the doctor approves it.
Results
- A structured record comes back in about 2 seconds, and the AI safety review in under 5 seconds.
- Every drug and test is resolved to a real catalogue item, so the pharmacy and lab receive exact orders.
- Runs fully on-premise, so patient data stays inside the hospital network.