RCMbox Docs

map-277-to-claim-responses

Parses 277 (Claim Status Response) transactions from a ParsedX12 structure and produces draft FHIR ClaimResponse resources. Traverses the 277 HL loop hierarchy (2000A → 2000B → 2000C → 2000D → 2200D) and maps claim status codes (STC segments) to ClaimResponse extensions.

Script path: @aidbox-billing/billing-case/map-277-to-claim-responses

Input

ParameterTypeDescription
parsedParsedX12Parsed X12 structure from parse-x12
billingTransmissionIdstringID of the BillingTransmission resource for this 277 file

Output

FieldTypeDescription
claimResponsesobject[]Array of draft ClaimResponse FHIR resources
billingTransmissionobjectUpdated BillingTransmission resource (status: processed)

What it produces

For each claim in the 277 (2200D HL loop):

  • A draft ClaimResponse with the claim status category and entity codes as extensions.
  • Contained patient, payer, and provider resources extracted from the HL hierarchy.
  • Service line addItem entries from SVC segments.
  • Identifiers extracted from REF segments (patient control number, payer claim number).

Usage in workflow YAML

- id: map-277
  script: "@aidbox-billing/billing-case/map-277-to-claim-responses"
  params:
    parsed: $activities.parse-x12.output.parsed
    billingTransmissionId: $input.billingTransmissionId
  children: [save-responses]

See also

Last updated: