06 / 06Concept

Five layouts in. One table out.

Five labs, five different layouts, one schema that has to survive all of them. Same problem as invoices, purchase orders or shipping documents.

  • 5 sample reports · View source to inspect
  • Fictional patient data
  • 100% client-side · no API calls
Step 1

Pick a sample report

01-oral-pathology-biopsy.pdf
24 KB

Westside Oral Pathology

Histopathology — oral biopsy · Houston, TX

LayoutPatient line is a one-liner with age as “47Y”. Diagnosis is buried at the bottom in a red box. Date written as “02-Apr-2026”.

02-panoramic-radiology.pdf
22 KB

Pacific Dental Imaging

Panoramic dental X-ray · San Diego, CA

LayoutTwo-column patient block. Findings as bullet list, impression below. Date written long-form (“February 11, 2026”).

03-cbc-hematology.pdf
19 KB

Riverside Clinical Lab

CBC + iron panel · San Diego, CA

LayoutFixed-width Courier table, no special markup — flags as “*L” / “*H” trailing each row. Patient labeled “PT:”, age as “44 yo”.

04-surgical-margins.pdf
21 KB

Northwest Surgical Pathology, P.C.

Surgical pathology — margins & nodes · Seattle, WA

LayoutThree specimens (A/B/C). Margin status, lymphovascular invasion and pTNM scattered across paragraphs. Date as “06-Mar-2026”.

05-emergency-stat-panel.pdf
25 KB

St. Mary's Medical Center — Emergency Lab

ED STAT panel (cardiac) · ED, in-house

LayoutRed STAT banner, mixed-alignment table. Flags as “CRITICAL UP / HIGH / LOW” and a separate critical-value notification footer. Date with time “18-May-2026 04:17”.

Step 2

Normalized table

No reports ingested yet. Pick a sample above and click Ingest to watch the parser run and a normalized row land here.

Operator's manual
Each report carries an operator's note — the routing rule that decides whether the parse actually moves the case forward. Ingest a sample and the note for that case appears here.
How it works

The workflow, and how much of it is built here.

Solid steps run in this sandbox. Dashed steps are what a real implementation adds. Select any step to read what it does.

  • Built in this demo
  • Needed in a real implementation
  • A person decides
  1. 01Ingest
  2. 02Extract
  3. 03Normalize
  4. 04Route
Step 1 of 9

Five lab reports

Built in this demo

Reports from five labs, each with its own layout, field names and date format. View the source of any of them before ingesting.

In detail

What it does
  • →Ingests messy lab-report PDFs from 5 different labs — each with its own layout, field naming and date format.
  • →Normalizes every report into a single operator-ready row: patient, age/sex, date, lab, study type, finding, ICD-10, flag.
  • →Expands each row to show raw-extracted text side-by-side with the clean JSON record — so the parse is auditable, not a black box.
  • →Surfaces an operator's note per case — what the lab parses is only useful if the routing rule around it gets actioned.
How it does it
  • →Each of the 5 reports keeps the layout quirks of the lab that issued it — a different patient line, a different date format, the diagnosis in a different place. Click View source to inspect the messy source.
  • →Each sample ships with both the raw extracted blob and the normalized record — pre-mapped by claude-sonnet-4-5 and shipped as static JSON. No API at runtime.
  • →The parsing console is a sequenced state machine that mirrors a real OCR → extract → normalize → flag pipeline; transitions are pure local state.
  • →Fully client-side. No backend, no keys, no network calls — safe to ship as a static portfolio page.
What a real impl would need
  • →Real OCR on scanned PDFs (Textract, GCV, or Tesseract) before Claude — most lab reports in the wild are flat raster scans, not text-embedded PDFs.
  • →Per-lab extraction templates + a fallback Claude pass with structured-output schema, plus a confidence score per field for the human-review queue.
  • →ICD-10 / SNOMED dictionary lookup with a curator step — the model proposes a code, a human accepts or overrides, and the pair becomes training data.
  • →Critical-value routing — pager/Slack/SMS for flag = critical, with acknowledgement tracking and an SLA timer per case.
  • →PHI handling: at-rest encryption, per-record audit log, retention policy, and a HIPAA/LFPDPPP review of the prompt + storage path.
  • →Eval set per lab template — when a new layout drifts, the regex / prompt regression shows up before patients do.

The pattern transfers to any document-heavy operator workflow — invoices, lab reports, intake forms, contracts. The value is in the routing rules around the parse, not the parse alone.