Skip to main content
Version: v0.0.2

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?

readonly optional actionCode?: string

BGN-08 - action code (2 change / 4 verify / RX replace, …).


date?

readonly optional date?: string

BGN-03 - transaction set creation date (CCYYMMDD).


dates?

readonly optional dates?: readonly Build834DateSpec[]

Header DTP dates.


payer?

readonly optional payer?: Build834PartySpec

Loop 1000B payer (N1*IN).


referenceId?

readonly optional referenceId?: string

BGN-02 - reference identification (the file / batch id).


references?

readonly optional references?: readonly Build834ReferenceSpec[]

Header REF identifiers.


readonly optional sponsor?: Build834PartySpec

Loop 1000A sponsor (N1*P5).


time?

readonly optional time?: string

BGN-04 - transaction set creation time (HHMM).


transactionSetPurposeCode

readonly transactionSetPurposeCode: string

BGN-01 - transaction set purpose code (00 original, 15 re-submission, …).