HL7v2.Segment.ZXX (HL7v2 v3.10.1)

Copy Markdown View Source

Generic Z-Segment (ZXX) — HL7v2 v2.5.1.

Handles any Z-segment (ZPD, ZPI, ZDX, etc.) by preserving all fields as raw values. Z-segments are site-defined extensions — their structure is unknown to the standard, so we store them losslessly.

Summary

Functions

Creates a ZXX from a specific Z-segment name and raw field list.

Parses a Z-segment, preserving all fields as raw values.

Returns the segment identifier for a specific ZXX instance.

Types

t()

@type t() :: %HL7v2.Segment.ZXX{raw_fields: list(), segment_id: binary()}

Functions

new(segment_name, raw_fields)

@spec new(binary(), list()) :: t()

Creates a ZXX from a specific Z-segment name and raw field list.

parse(raw_fields, separators \\ HL7v2.Separator.default())

@spec parse(list(), HL7v2.Separator.t()) :: t()

Parses a Z-segment, preserving all fields as raw values.

The segment_name is stored so we can re-encode with the correct identifier.

segment_name(zxx)

@spec segment_name(t()) :: binary()

Returns the segment identifier for a specific ZXX instance.