Function: hlParentMismatch()
hlParentMismatch(
position,hlId,declaredParentId):X12ParseWarning
Build an X12_HL_PARENT_MISMATCH warning. Emitted by the 837 helper
when an HL segment's HL-02 (parent id) does not match any earlier-
emitted HL-01 in the same transaction. The walker NEVER silently
re-numbers the hierarchy - the safety primitive of the 837 is HL
parent-pointer integrity. The reported ids are shape-validated against
the HL-id grammar before echoing.
Parameters
position
hlId
string
declaredParentId
string
Returns
Example
import { hlParentMismatch } from "@cosyte/x12";
const w = hlParentMismatch(
{ segmentIndex: 14, interchangeIndex: 0, groupIndex: 0, transactionIndex: 0 },
"3",
"9",
);