feat(timeline): med-mal chronology view backed by event log (#3)
Phase 3 of the med-mal records platform. Surfaces the Phase 2
document_events log as a fast, citation-anchored chronology view -
satisfying the roadmap §Phase 3 verification gate of "+ Medical
Chronology on extracted doc loads in <2s, no LLM call."
Changes:
- New route /projects/[id]/timeline/[docId] rendering events as a
sortable table with row-click bbox sync against the embedded PDF
preview. Reads the existing GET /extraction/:documentId/events;
zero backend changes.
- Widen MedMalDocumentEvent type to expose provider, provider_role,
event_time, episode_of_care, key_date_role, event_date_text.
- + Medical Chronology on ProjectPage routes to Timeline when ≥1 PDF
is ready: single PDF goes straight, multiple opens a picker, zero
PDFs falls back to the existing tabular-create modal.
- docs/PLAN_med_mal_phase3_integration.md documents the row-cardinality
finding that ruled out the originally-planned Rail B (cells-from-event-log
for MAR / vitals / etc.) - every event-log-backed schema is per-encounter,
which doesn't fit the 1-row-per-doc tabular_cells model. Future MAR /
vitals / labs views are deferred to Phase 3.5 as their own Timeline-style
surfaces.
Verification: builds clean on backend + frontend; lint clean for new
file. Browser-clicked e2e is left to the user - the gate
("<2s, no LLM traffic") needs a running stack + an extracted doc to
exercise, neither of which the agent had access to during this PR. | Repository | rmerk/mike |
|---|---|
| Author | Ryan Choi <4576425+rmerk@users.noreply.github.com> |
| Authored | |
| Parents | 58f57660 |
| Stats | 4 files changed , +485 |
| Part of | Minnesota medical-malpractice records platform (5-phase build) |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-ddee1416.md
from inside the repo you want the change in.