Skip to main content
Version: v0.0.2

Function: get277CADisposition()

get277CADisposition(delimiters, tx): X12ClaimStatusResponse | undefined

Extract a 277CA Claim Acknowledgment (005010X214). Returns undefined unless the transaction is a 277 whose ST-03 is 005010X214 - use get277Status for the general 277 Claim Status Response. The returned model is the same X12ClaimStatusResponse; the transactionType is always "claim-acknowledgment".

Parameters

delimiters

Delimiters

tx

X12TransactionSet

Returns

X12ClaimStatusResponse | undefined

Example

import { parseX12, get277CADisposition } from "@cosyte/x12";
const ix = parseX12(raw);
const tx = ix.groups[0]?.transactions.find((t) => t.st.elements[1] === "277");
const ack = tx === undefined ? undefined : get277CADisposition(ix.delimiters, tx);
ack?.claims[0]?.statuses[0]?.statuses[0]?.categoryCode; // "A1" / "A2" / "A3"