0625c83a45
The 999 handler's rejection pass was looking up claims by patient control number, but Gainwell rejects at the SET level (ST envelope) when the whole batch fails the NM109=CO_TXIX rule. That meant a SET rejection was treated as a no-op even though every claim in the SET was actually rejected by the payer. Add a batch_envelope_index param (mirrors apply_999_acceptances from SP28) so SET-level rejections cascade to every claim in the SET. Falls back to the legacy PCN lookup when the index has no entry. Also tightens test_payer.py: PayerConfig.co_medicaid() now returns payer_id='CO_TXIX' and payer_name='CO_TXIX' per HCPF 837P Companion Guide (June 2025 - Version 2.5).
23 lines
828 B
Python
23 lines
828 B
Python
from cyclone.parsers.payer import PayerConfig
|
|
|
|
|
|
def test_co_medicaid_defaults():
|
|
cfg = PayerConfig.co_medicaid()
|
|
assert cfg.name == "Colorado Medical Assistance Program"
|
|
assert cfg.sbr09_claim_filing == "MC"
|
|
assert cfg.allowed_claim_frequencies == {1, 7, 8}
|
|
assert cfg.require_ref_g1_for_adjustments is False # lenient in v1
|
|
assert cfg.allowed_bht06 == {"CH"}
|
|
assert cfg.payer_id == "CO_TXIX"
|
|
assert cfg.payer_name == "CO_TXIX"
|
|
assert cfg.no_patient_loop is True
|
|
assert cfg.encounter_claim_in_same_batch is False
|
|
|
|
|
|
def test_generic_837p_defaults_are_relaxed():
|
|
cfg = PayerConfig.generic_837p()
|
|
assert cfg.name == "Generic 837P"
|
|
assert cfg.allowed_claim_frequencies == {1, 2, 3, 4, 5, 6, 7, 8, 9}
|
|
assert cfg.no_patient_loop is False
|
|
assert cfg.payer_id == "" # unset
|