Skip to main content
Version: v0.0.4

Interface: CustomSegmentDefinition

Shape of a single custom Z-segment declaration used by profile authoring (defineProfile()). fields maps a caller-visible field NAME to its 1-indexed HL7 position within the segment. Declared here (alongside Profile) to keep the parser's type module the single source of truth; src/profiles/define.ts re-exports this type, so consumers can write import type { CustomSegmentDefinition } from "@cosyte/hl7".

Example

import type { CustomSegmentDefinition } from "@cosyte/hl7";
const zdp: CustomSegmentDefinition = {
fields: { departmentCode: 3, departmentName: 4 },
};

Properties

fields

readonly fields: Readonly<Record<string, number>>