Signal/tests
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 add Phase 1 security hardening, mapping confidence, audit logging, pilot docs 2026-05-29 05:41:25 -04:00
smoke_test.py add phase 2 supabase persistence layer 2026-05-29 06:50:34 -04:00
test_coverage_flags.py feat: demo MVP — 90/60/45 priority tiers, doc state machine, confirm visit workflow 2026-06-07 11:29:33 -04:00
test_dedup.py Add readiness-model dedup + coverage-line grouping foundation 2026-06-27 00:22:01 -04:00
test_doc_state_machine.py fix(audit): add Supabase client support to audit logger, format cleanup, update cascade test 2026-06-21 16:16:34 -04:00