Interface: Build834HeaderSpec
The 834 header - BGN beginning segment + sponsor (N1*P5) + payer
(N1*IN) + header REF / DTP. Mirrors "./types.js".X12EnrollmentHeader minus the read-only warnings.
Example
import type { Build834HeaderSpec } from "@cosyte/x12";
const header: Build834HeaderSpec = {
transactionSetPurposeCode: "00", referenceId: "FILE-202606", date: "20260601",
sponsor: { entityIdentifierCode: "P5", name: "EMPLOYER CO" },
payer: { entityIdentifierCode: "IN", name: "MEDPAY INSURANCE" },
};
Properties
actionCode?
readonlyoptionalactionCode?:string
BGN-08 - action code (2 change / 4 verify / RX replace, …).
date?
readonlyoptionaldate?:string
BGN-03 - transaction set creation date (CCYYMMDD).
dates?
readonlyoptionaldates?: readonlyBuild834DateSpec[]
Header DTP dates.
payer?
readonlyoptionalpayer?:Build834PartySpec
Loop 1000B payer (N1*IN).
referenceId?
readonlyoptionalreferenceId?:string
BGN-02 - reference identification (the file / batch id).
references?
readonlyoptionalreferences?: readonlyBuild834ReferenceSpec[]
Header REF identifiers.
sponsor?
readonlyoptionalsponsor?:Build834PartySpec
Loop 1000A sponsor (N1*P5).
time?
readonlyoptionaltime?:string
BGN-04 - transaction set creation time (HHMM).
transactionSetPurposeCode
readonlytransactionSetPurposeCode:string
BGN-01 - transaction set purpose code (00 original, 15 re-submission, …).