HL7 v2.5.1 standard metadata — single source of truth.
Compile-time catalogs for segments, data types, message structures, and trigger-to-structure mappings from the HL7 v2.5.1 specification.
Each entry includes a capability tier indicating the library's current level of support:
:typed— full parse/encode with Elixir struct:raw— preserved as raw fields during typed parsing, no typed access:unsupported— not in the library, unknown segments become raw tuples
Usage
HL7v2.Standard.segment("PID")
#=> %{name: "Patient Identification", tier: :typed, module: HL7v2.Segment.PID}
HL7v2.Standard.type("CX")
#=> %{name: "Extended Composite ID with Check Digit", category: :composite, tier: :typed}
HL7v2.Standard.segment_tier("PID")
#=> :typed
Summary
Functions
Returns segment metadata by ID, or nil.
Returns the total count of standard segments in the catalog.
Returns all segment IDs in the catalog.
Returns the segment module for a typed segment, or nil.
Returns the capability tier for a segment (:typed, :raw, or :unsupported).
Returns type metadata by code, or nil.
Returns all type codes in the catalog.
Returns the total count of standard data types in the catalog.
Returns the capability tier for a data type.
Returns all typed segment IDs.
Returns all typed type codes.
Functions
Returns segment metadata by ID, or nil.
@spec segment_count() :: non_neg_integer()
Returns the total count of standard segments in the catalog.
@spec segment_ids() :: [binary()]
Returns all segment IDs in the catalog.
Returns the segment module for a typed segment, or nil.
@spec segment_tier(binary()) :: :typed | :raw | :unsupported
Returns the capability tier for a segment (:typed, :raw, or :unsupported).
Returns type metadata by code, or nil.
@spec type_codes() :: [binary()]
Returns all type codes in the catalog.
@spec type_count() :: non_neg_integer()
Returns the total count of standard data types in the catalog.
@spec type_tier(binary()) :: :typed | :unsupported
Returns the capability tier for a data type.
@spec typed_segment_ids() :: [binary()]
Returns all typed segment IDs.
@spec typed_type_codes() :: [binary()]
Returns all typed type codes.