Signal/python-backend/core
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
..
__init__.py feat: FastAPI backend + full deployment stack (Railway + Vercel) 2026-05-18 19:01:35 -04:00
audit_logger.py fix(audit): add Supabase client support to audit logger, format cleanup, update cascade test 2026-06-21 16:16:34 -04:00
coverage_calculator.py Add readiness-model dedup + coverage-line grouping foundation 2026-06-27 00:22:01 -04:00
dedup.py Add readiness-model dedup + coverage-line grouping foundation 2026-06-27 00:22:01 -04:00
doc_state_machine.py add pitch assets, fix UI and backend bugs, add test utilities 2026-06-19 12:52:29 -04:00
persistence.py feat: doc status persistence, empty state, status legend, and Clear to Ship guard 2026-06-14 05:09:06 -04:00
supabase_client.py add phase 2 supabase persistence layer 2026-05-29 06:50:34 -04:00