feat: phase e - HIPAA healthcare documents, SNIP 3-5, PHI handling, canary tests #11

Merged
KofTwentyTwo merged 1 commits from feature/phase-e-healthcare into develop 2026-10-14 13:46:36 +00:00
KofTwentyTwo commented 2026-10-14 13:25:59 +00:00 (Migrated from github.com)

Summary

Phase (e) of docs/DESIGN.md.

  • Guides (in-house 005010 baselines, no TR3 text): 837P 005010X222A1, 837I 005010X223A2, 835 005010X221A1, 270/271 005010X279A1, 276/277 005010X212, 834 005010X220A1; 999 005010X231A1 for HIPAA documents with IK3/IK4/CTX/IK5/AK9.
  • SNIP: 1-2 as before; 3 exact-decimal balancing (837 CLM02 vs line charges; 835 BPR02 vs CLP04 less PLB; CAS adjustments); 4 situational rules per claim/loop occurrence; 5 format checks (ICD-10 shape, NPI check digit with the 80840 prefix, ZIP) plus the ExternalCodeSetProvider SPI, reflected in the home's System table. 6-7 through partner overrides.
  • PHI: classification via the RC.5 stand-in (phiBusinessKey, valueExcerpt, expectedResultJson, edi_inbox.fileName PHI; partner contacts PII); healthcare keys (CLM01, CLP01, member id, TRN02) go to phiBusinessKey; no element values in errors, events, exceptions, alerts, logs, Result lines or 999s for PHI documents (PhiLogScope guards logging); audited "Download Raw Document" (edi.raw.download).
  • Canary egress test (PhiCanaryTest): CANARY-PHI values in patient name, member id, claim number and diagnosis through receive, forced SNIP 2/3/4 errors, 999, map, apply, exception, reprocess, resend, every home and child-list widget serialized, exports of every edi_ table, alerts and captured logs.
  • Demo: Cedar Health Clearinghouse with synthetic 837P/837I, 999s, an 835 and a 270/271 pair, including a SNIP 3 and a SNIP 4 error.

Limits: 837 sample maps handle one claim per transaction; 271 validation does not correlate the prior 270; MASKED-user and Quick Search canary checks need qbit-secured-data and core masking (RC.6 bump next). Rebased on develop before phase c (#10); whichever merges second needs a small demo-test merge, which I'll do.

Test plan

  • ./mvnw verify: 174 tests, Checkstyle, JaCoCo (94.4% instructions, 98.5% classes)
  • Each SNIP 3/4 rule with a failing synthetic document; exact 999 output; canary test green
  • CircleCI test_only

🤖 Generated with Claude Code

## Summary Phase (e) of `docs/DESIGN.md`. - **Guides** (in-house 005010 baselines, no TR3 text): 837P `005010X222A1`, 837I `005010X223A2`, 835 `005010X221A1`, 270/271 `005010X279A1`, 276/277 `005010X212`, 834 `005010X220A1`; 999 `005010X231A1` for HIPAA documents with IK3/IK4/CTX/IK5/AK9. - **SNIP:** 1-2 as before; 3 exact-decimal balancing (837 CLM02 vs line charges; 835 BPR02 vs CLP04 less PLB; CAS adjustments); 4 situational rules per claim/loop occurrence; 5 format checks (ICD-10 shape, NPI check digit with the 80840 prefix, ZIP) plus the `ExternalCodeSetProvider` SPI, reflected in the home's System table. 6-7 through partner overrides. - **PHI:** classification via the RC.5 stand-in (`phiBusinessKey`, `valueExcerpt`, `expectedResultJson`, `edi_inbox.fileName` PHI; partner contacts PII); healthcare keys (CLM01, CLP01, member id, TRN02) go to `phiBusinessKey`; no element values in errors, events, exceptions, alerts, logs, Result lines or 999s for PHI documents (`PhiLogScope` guards logging); audited "Download Raw Document" (`edi.raw.download`). - **Canary egress test** (`PhiCanaryTest`): CANARY-PHI values in patient name, member id, claim number and diagnosis through receive, forced SNIP 2/3/4 errors, 999, map, apply, exception, reprocess, resend, every home and child-list widget serialized, exports of every `edi_` table, alerts and captured logs. - **Demo:** Cedar Health Clearinghouse with synthetic 837P/837I, 999s, an 835 and a 270/271 pair, including a SNIP 3 and a SNIP 4 error. Limits: 837 sample maps handle one claim per transaction; 271 validation does not correlate the prior 270; MASKED-user and Quick Search canary checks need qbit-secured-data and core masking (RC.6 bump next). Rebased on develop before phase c (#10); whichever merges second needs a small demo-test merge, which I'll do. ## Test plan - [x] `./mvnw verify`: 174 tests, Checkstyle, JaCoCo (94.4% instructions, 98.5% classes) - [x] Each SNIP 3/4 rule with a failing synthetic document; exact 999 output; canary test green - [ ] CircleCI `test_only` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
KofTwentyTwo commented 2026-10-14 13:38:32 +00:00 (Migrated from github.com)

Rebased on develop after #10 (AS2). Resolved the demo and docs conflicts, and removed two stray conflict-marker lines that the phase c merge left in CHANGELOG.md and DESIGN.md (restoring the phase c notes). 201 tests pass locally.

Rebased on develop after #10 (AS2). Resolved the demo and docs conflicts, and removed two stray conflict-marker lines that the phase c merge left in CHANGELOG.md and DESIGN.md (restoring the phase c notes). 201 tests pass locally.
Sign in to join this conversation.