Function: unknownMaintenanceType()
unknownMaintenanceType(
position,code):X12ParseWarning
Build an X12_834_UNKNOWN_MAINTENANCE_TYPE warning. Emitted by the 834
helper when a member-level INS-03 (or a health-coverage HD-01)
maintenance type code falls outside the bundled snapshot (see
"../code-lists/maintenance-type.js".MAINTENANCE_TYPE_CODES).
Maintenance type is the 834's safety-critical field - an unknown action
code must NEVER be silently coerced to add / change / terminate, so the
verbatim code is preserved on the parsed enrollment and this warning
flags the gap. The code value is shape-validated against [0-9]{3}
before echoing; a hostile non-conformant value collapses to the literal
(non-spec) (H-PHI invariant).
Parameters
position
code
string
Returns
Example
import { unknownMaintenanceType } from "@cosyte/x12";
const w = unknownMaintenanceType(
{ segmentIndex: 9, interchangeIndex: 0, groupIndex: 0, transactionIndex: 0 },
"999",
);