Full-stack · RAG
Chronological Medical Summary Generator
Type a case ID and get a dated, row-per-encounter clinical timeline extracted from scanned medical records — exportable as a branded PDF or Word document.
- End-to-end RAG → timeline
- User-defined columns
- Branded PDF / DOCX
Built at CloudLex
// problem
The problem
Reviewers spent hours reading dozens of medical PDFs per case to hand-build a chronology — slow, inconsistent column conventions between reviewers, and easy to miss legally-important negative findings.
// approach
What I built
- Pulls a case’s records from Azure AI Search, groups and orders them, and has GPT-4o extract a strict JSON array of dated clinical encounters.
- Reviewers can define their own columns in plain English; each becomes a structured-output schema field, turning the UI into a programmable extraction contract.
- One click exports a branded, page-fitted PDF or DOCX for client delivery.
// architecture
How it fits together
// decisions
Key technical decisions
Schema-as-prompt
User-defined columns compile into a LangChain structured-output schema at request time, so non-engineers can steer extraction without touching code.
Ground the source reference server-side
The source-document reference on every row is set from real metadata, not the model’s output — eliminating a whole class of hallucinated citations.
Document-at-a-time map, then reduce
Each document is summarized independently and the rows merged, keeping every model call well within context limits.
// outcomes
Outcomes
- Collapses hours of manual chronology into a single run
- Preserves negative / normal findings that matter legally
- Produces client-ready branded exports without a rebuild
Proprietary — source not public.
Want to talk through any of this?
jntkhandebharad@gmail.com