Commit graph

4 commits

Author SHA1 Message Date
Kisa
b4f5707937 fix: engine-dropped rows surface in the skipped list (failed-data honesty)
Kisa ruling 2026-07-07: failed CSV info must be visible and Signal never acts
on rows whose required information was not provided. Rows that survive
normalization but die in the scoring engine (no coverage rule for the
component) previously vanished from the response; they now append to
skipped_reasons before persistence so the stored count matches what the
supplier saw. Auditor SHIP; its MEDIUM (persist-order) fixed in-commit.
Known bound (auditor LOW, tracked): a dropped component inside an otherwise
scored same-DOS group is covered by the scored line and not separately
reported. 169 tests green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 06:15:27 -04:00
Kisa
f28b5bf39e feat: plan-type enforcement in the live path (plan 02, P5)
Full client-mapped plan_type pipeline: complete header alias set (bare
'plan'/'plan_name' stay payer aliases), value canonicalization map (Medicare
Part B / FFS / MA / Part C / private / employer etc), unrecognized values
grade Plan Type Needed with a hashed once-per-value warning. Once-per-batch
deprecation fence when records lack plan_type (timing guesses from payer,
legacy; readiness never does). CSVImport mapping review gains Plan Type.
All 66 demo/drift fixture CSVs authored with plan_type columns (variant
headers + variant values on the drift corpus); corpus sweep: 66/66 map, 100%
typed. Echo paths canonicalize through the same value map (audit Low fixed).
_normalize_payer and the default config entry remain untouched (Phase 2c,
Kisa-gated). Independent audit: SHIP. 169 tests green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 05:46:03 -04:00
Kisa
d24340c47a feat: citation rule IDs on every documentation requirement (plan 02, P2)
core/rules.py format-tolerant readers + stable registry (R001-R004 plan-scoped,
R100-R102 universal per LCD L33822). payer_rules.json wrapped in the same
commit as both engine readers (coupling hazard closed). Every DocItem now
cites the rule that decided it; NOT_EVALUATED cites nothing. Independent
audit: SHIP (registry-drift test added per its L2 finding). 138 tests green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 05:10:52 -04:00
Kisa
a3af499c93 feat: wire readiness model into live pipeline (build plan 01, Phase 2a)
Readiness verdicts now ride additively on /api/upload and /api/confirm-visit:
- core/worklist_readiness.py: ReadinessIndex — row-to-line membership resolved
  through the dedup group key (patient_id, device_type, DOS), never re-derived
  from a row's own plan_type (kills a reviewer-reproduced false green)
- RecordOut gains plan_type / readiness_status / readiness_items (additive,
  default None); UploadResponse gains readiness_stats (reconciles with rows)
- Minimal plan_type CSV mapping (client-supplied, lowercased+trimmed, never
  guessed) per the umbrella reactivation plan; full enforcement lands in P5
- Fixes pre-existing record_lookup miss for order-numbered CSVs; fallback
  fields now come from the dedup MergedShipment (latest-non-null, collected
  order numbers) so doc_state and the verdict grade from the same values
- confirm-visit normalizes plan_type identically to the CSV path

Verification: 132 tests green (108 baseline + 24 wiring/regression);
adversarial 3-lens review + refutation pass (7 findings confirmed, all fixed,
regression-locked); independent code-auditor verdict SHIP; Pi E2E 33/33.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 04:52:32 -04:00