2c0afbe9c5
- Add cyclone.parsers.models_277ca + parse_277ca (X12 005010X214)
- Per-Patient HL ClaimStatus with REF*1K (PCN), REF*EJ (tax ID),
STC category code, amount, service date
- STC classifier: A1-A3 accepted, A4/A6/A7 rejected, A8/A9 pended,
P1-P5 paid, anything else unknown
- Multiple STCs per Patient HL: last wins (canonical pattern for
'first pended, then paid' acknowledgments)
- Subscriber-level STCs surface in unscoped_statuses
- Add apply_277ca_rejections — stamps Claim.payer_rejected_* fields on
matching rows (lookup by patient_control_number, mirrors 999 path)
- New /api/parse-277ca, /api/277ca-acks, /api/277ca-acks/{id} endpoints
- New two77ca_acks table + Two77caAck ORM model
- New Claim columns: payer_rejected_at, _reason, _status_code, _by_277ca_id
- New payer_rejected lane in /api/inbox/lanes (distinct from 999
envelope rejected lane)
- New PayerConfig277CA block in config/payers.yaml + Pydantic model
- Migration 0008 bumps user_version to 8
Tests: 654 -> 688 (parser 22 + apply 6 + API 8 + config 6 + adjustments).
All 688 backend tests pass; 1 pre-existing skipped test class unaffected.
62 lines
2.6 KiB
YAML
62 lines
2.6 KiB
YAML
# Cyclone payer configuration
|
|
# SP9 — loaded at boot by cyclone.payers.load_payer_configs()
|
|
# Schema-validated against Pydantic models in cyclone.providers
|
|
# See spec: docs/superpowers/specs/2026-06-20-cyclone-multi-payer-npi-sftp-design.md
|
|
|
|
payers:
|
|
# Colorado Medical Assistance Program (FFS) — the user's primary payer
|
|
- payer_id: CO_TXIX
|
|
name: "Colorado Medical Assistance Program"
|
|
receiver_name: "COLORADO MEDICAL ASSISTANCE PROGRAM"
|
|
receiver_id: "COMEDASSISTPROG"
|
|
configs:
|
|
"837P":
|
|
submitter_name: "Dzinesco"
|
|
submitter_contact_name: "Tyler Martinez"
|
|
submitter_contact_email: "tyler@dzinesco.com"
|
|
receiver_name: "COLORADO MEDICAL ASSISTANCE PROGRAM"
|
|
receiver_id_qualifier: "46"
|
|
receiver_id: "COMEDASSISTPROG"
|
|
bht06_allowed: ["CH", "RP"]
|
|
bht06_default: "CH"
|
|
sbr09_default: "MC"
|
|
sbr09_allowed: ["MC", "16", "MA", "MB", "ZZ"]
|
|
payer_id_qualifier: "PI"
|
|
# Per spec: NM1*PR NM109 = "CO_TXIX".
|
|
# Production reality (June 2026): SKCO0 is still being sent in
|
|
# the prod 837P files. SP9 emits CO_TXIX per the CO MAP companion
|
|
# guide. If Gainwell rejects CO_TXIX, set this to "SKCO0".
|
|
payer_id: "CO_TXIX"
|
|
pwk_supported: false
|
|
cas_2320_group_allowed: false
|
|
claim_type_codes:
|
|
"11": "Office"
|
|
"12": "Home"
|
|
"99": "Other"
|
|
"835":
|
|
expected_payer_tax_ids:
|
|
- "81-1725341"
|
|
- "811725341"
|
|
- "84-0644739"
|
|
- "840644739"
|
|
- "1811725341"
|
|
expected_payer_health_plan_id: "7912900843"
|
|
payer_name_pattern: "^CO_(TXIX|BHA)$"
|
|
"277CA":
|
|
# Per X12 005010X214. HCPF sends back 277CAs to acknowledge
|
|
# claims we submit. The parser matches each STC row against our
|
|
# 837 batch via REF*1K (cross-references CLM01 / patient_control_number).
|
|
#
|
|
# rejected_status_codes → claim ends up in the Inbox Payer-Rejected
|
|
# lane. Per HCPF's published STC code set, A4/A6/A7 are rejection,
|
|
# A8/A9 are pended, A1/A2/A3 are accepted, P1-P5 are paid.
|
|
rejected_status_codes: ["A4", "A6", "A7"]
|
|
pended_status_codes: ["A8", "A9"]
|
|
accepted_status_codes: ["A1", "A2", "A3"]
|
|
paid_status_codes: ["P1", "P2", "P3", "P4", "P5"]
|
|
# ST*01 transaction set identifier — HCPF uses "277CA" but the
|
|
# X12 005010X214 spec allows just "277". Both are accepted.
|
|
transaction_set_ids_allowed: ["277", "277CA"]
|
|
# Implementation guide version HCPF sends.
|
|
implementation_guide: "005010X214"
|