Function: controlNumberMismatch()
controlNumberMismatch(
position,pair,header,trailer):X12ParseWarning
Build an X12_CONTROL_NUMBER_MISMATCH warning. Emitted when an
envelope-trailer control number does not match its matching header -
ISA-13 ↔ IEA-02, GS-06 ↔ GE-02, or ST-02 ↔ SE-02. Message carries the
field pair label and the expected-vs-actual values bounded to the 9-char
(interchange) / variable (group/transaction) numeric forms - these are
control numbers, not PHI.
Parameters
position
pair
string
header
string
trailer
string
Returns
Example
import { controlNumberMismatch } from "@cosyte/x12";
const w = controlNumberMismatch(
{ segmentIndex: 1, interchangeIndex: 0, elementIndex: 2 },
"ISA-13/IEA-02",
"000000001",
"000000002",
);