Deployed at IMC Hospital
Lab Report Extraction
Turns unstructured PDF lab reports into structured clinical summaries that reach the doctor before a telemedicine consultation.
Every lab report reaches the doctor as a structured, verified summary before the call.
- Where
- IMC Hospital telemedicine, through Contech International
- My role
- Sole architect and developer
- When
- 2026
- Stack
- Python
- FastAPI
- n8n
- Docling OCR
- MedGemma-4B
- Supabase
- Docker
- Vast.ai
The problem
In telemedicine, doctors were spending consultation minutes reading messy PDF lab reports instead of talking to the patient.
The goal was to have a clear, structured summary in the doctor's inbox before the call starts.
How it works
6 steps, from input to result. They light up as you scroll.
File is dropped in
A medical assistant uploads the patient's lab report PDF before the consultation.
Workflow takes over
An n8n workflow receives the file and sends it to the extraction service as a base64-encoded JSON payload.
OCR reads the report
Docling OCR parses the unstructured PDF, including tables.
Values are extracted
MedGemma-4B pulls out the results and maps markers such as liver function, lipid profile and special chemistry to their reference ranges.
Doctor verifies
Every extracted result requires doctor verification, as a patient-safety control.
Summary is delivered
A structured, colour-coded summary is emailed to the doctor and stored in Supabase.
What I built
- Built the end-to-end pipeline as isolated FastAPI services, with n8n as the orchestrator.
- Fixed failing multipart uploads in n8n by redesigning file transfer as base64-encoded JSON.
- Engineered the MedGemma-4B prompts for structured clinical output.
Results
- Results and their reference ranges are pulled out of unstructured PDFs, tables included, into a structured summary.
- Doctors receive the summary before the consultation instead of reading raw PDFs during it.
- Deployed and in use at IMC Hospital.