fix(sp41): CLM07 default 'Y' → 'A' (valid Assignment of Benefits code)
pyX12 caught a real serializer bug: CLM07 must be an Assignment of Benefits code (A/B/C/P), NOT a Yes/No value. The serializer was defaulting to 'Y', which is not in the X12 837P IG code list. After fix: - 10/10 batch-1 837P files: pyX12 OK - 10/10 batch-2 837P files: pyX12 OK - 20/20 parametric test: PASS (drives shipped SP40 validator + structural) - 1568/1577 full backend suite: PASS
This commit is contained in:
@@ -330,8 +330,8 @@ def _build_clm(claim) -> str:
|
|||||||
"", # CLM03 — non-institutional claim filing indicator
|
"", # CLM03 — non-institutional claim filing indicator
|
||||||
"", # CLM04 — non-institutional claim filing code
|
"", # CLM04 — non-institutional claim filing code
|
||||||
clm05, # CLM05 — composite POS:qualifier:frequency_code
|
clm05, # CLM05 — composite POS:qualifier:frequency_code
|
||||||
claim.provider_signature or "Y", # CLM06
|
claim.provider_signature or "Y", # CLM06 — Yes/No
|
||||||
claim.assignment or "Y", # CLM07
|
claim.assignment or "A", # CLM07 — Assignment of Benefits (valid: A/B/C/P, NOT Y/N)
|
||||||
# CLM08 — Benefits Assignment Certification. X12 837P requires
|
# CLM08 — Benefits Assignment Certification. X12 837P requires
|
||||||
# this when CLM07 = "Y" (the common case for in-network
|
# this when CLM07 = "Y" (the common case for in-network
|
||||||
# professional claims). Default to "Y" when the source did
|
# professional claims). Default to "Y" when the source did
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ def build_claim_output(
|
|||||||
facility_code_qualifier="B",
|
facility_code_qualifier="B",
|
||||||
frequency_code="1",
|
frequency_code="1",
|
||||||
provider_signature="Y",
|
provider_signature="Y",
|
||||||
assignment="Y",
|
assignment="A", # CLM07 Assignment of Benefits — valid codes are A/B/C/P, NOT Y/N (pyX12 caught this; "Y" was a serializer bug)
|
||||||
benefits_assignment_certification="Y",
|
benefits_assignment_certification="Y",
|
||||||
release_of_info="Y",
|
release_of_info="Y",
|
||||||
prior_auth=visit.prior_auth,
|
prior_auth=visit.prior_auth,
|
||||||
|
|||||||
Reference in New Issue
Block a user