feat(extraction): Phase 2 med-mal extraction pipeline (#2)

↗ view on GitHub · Ryan Choi · 2026-05-11 · 58f57660

Postgres (`0002`-`0005`), `patch_document_extraction_run` with GRANTs, per-page Claude JSON extraction, raster + vision for empty text layers, §145.64 vision-page peer-review prescan (compliance gate), optional queue mode (`EXTRACTION_ASYNC_MODE=queue`), REST + UI + chat tools, Vitest and Supertest coverage (403/404/409), backend CI workflow.

Closes the §145.64 compliance gap: scanned pages with peer-review marker phrases visible only in the raster are now detected and halt the run before any event-extraction call.

Follow-up: apply `0005_extraction_async_jobs_document_index.sql` on each Supabase environment and verify advisor `unindexed_foreign_keys` clears.
Repository rmerk/mike
Author Ryan Choi <4576425+rmerk@users.noreply.github.com>
Authored
Parents 3d89162e
Stats 44 files changed , +6900 , -21
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-58f57660.md from inside the repo you want the change in.

⬇ Download capture-commit-58f57660.md