Signal/python-backend
Kisa c07d054ca5 Add readiness-model dedup + coverage-line grouping foundation
Group normalized shipment rows into deduped shipments and gradeable
coverage lines (patient -> device -> shipment), the structural fix for the
row-keyed worklist bug (six months of orders no longer = six worklist lines).

- Locked dedup key (patient_id, device_type, date_of_service); order_number
  is display-only. Monthly resupplies stay separate, not duplicates.
- Client-mapped plan_type carried through, never guessed from payer name;
  conflicting plan types in a group route to "plan type needed".
- Quantity merge: sum across distinct component configs, max within a config
  (duplicate guard) with a warning breadcrumb on disagreement.
- CGM gradeable this phase; pumps preserved/displayed but not graded.

Additive only: not yet wired into the live pipeline, grading unchanged.
30 tests green (full suite 46), code-auditor reviewed (M1/M2/L1/L2/L3 fixed).

Design: docs/dedup-design-2026-06-24.md, docs/readiness-model-brief-2026-06-23.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 00:22:01 -04:00
..
api fix(audit): add Supabase client support to audit logger, format cleanup, update cascade test 2026-06-21 16:16:34 -04:00
config feat: demo MVP — 90/60/45 priority tiers, doc state machine, confirm visit workflow 2026-06-07 11:29:33 -04:00
core Add readiness-model dedup + coverage-line grouping foundation 2026-06-27 00:22:01 -04:00
db feat: demo MVP — 90/60/45 priority tiers, doc state machine, confirm visit workflow 2026-06-07 11:29:33 -04:00
__init__.py feat: FastAPI backend + full deployment stack (Railway + Vercel) 2026-05-18 19:01:35 -04:00