Design A Pipeline That Turns Record Dumps Into Treatment Chronologies
Last updated: November 29, 2026
Quick Overview
Design the backend system that ingests a personal injury case's medical record PDFs (often thousands of pages from many providers), runs OCR and extraction, and produces a cited, reviewable chronology of visits, diagnoses and charges within a turnaround SLA.
EvenUp
November 29, 20260
0
0 solved
Design the backend system that ingests a personal injury case's medical record PDFs (often thousands of pages from many providers), runs OCR and extraction, and produces a cited, reviewable chronology of visits, diagnoses and charges within a turnaround SLA.
This is the core data path behind EvenUp's demands and medical chronologies: files land from firms or case management integrations, and attorneys expect a reliable chronology quickly. The interviewer looks for an asynchronous, idempotent pipeline with page-level provenance, human review, and PHI controls.
What the Interviewer Expects
- Breaks the flow into upload, OCR, segmentation, extraction, assembly and review stages
- Uses durable queues and idempotent page-level work units
- Keeps page-level provenance so every fact cites its source
- Builds in a human review queue with confidence-based routing
- Covers PHI security and tenant isolation
- Sizes the workload and plans for bursty arrivals
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- A firm uploads an updated packet with 200 new pages: how do you avoid reprocessing everything?
- How do you prioritize a case whose mediation is tomorrow?
- How would you measure extraction quality in production?
- Where would you put the boundary between rules and models?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: accept PDFs and images per case, extract per-page text and layout, split packets into documents, extract visits (provider, date, diagnoses, procedures, charges), deduplicate across repeate...
High-Level Design
Upload service writes originals to encrypted object storage keyed by case_id/file_hash and records a manifest. A workflow orchestrator (Temporal or Step Functions style) fans out page jobs to an OCR...