Numeric Array (NA) -- HL7v2 composite data type.
Contains a variable number of numeric (NM) values. Used in OBX for waveform data (single-channel numeric arrays).
Variable components (4+ per HL7 spec):
- Value 1 (NM)
- Value 2 (NM)
- Value 3 (NM)
- Value 4 (NM) ... additional values as needed
Summary
Types
@type t() :: %HL7v2.Type.NA{values: [binary()]}
Functions
Encodes an NA to a list of component strings.
Examples
iex> HL7v2.Type.NA.encode(%HL7v2.Type.NA{values: ["10", "20", "30", "40"]})
["10", "20", "30", "40"]
iex> HL7v2.Type.NA.encode(%HL7v2.Type.NA{})
[]
iex> HL7v2.Type.NA.encode(nil)
[]
Parses an NA from a list of components.
All components are stored as a list of string values.
Examples
iex> HL7v2.Type.NA.parse(["10", "20", "30", "40"])
%HL7v2.Type.NA{values: ["10", "20", "30", "40"]}
iex> HL7v2.Type.NA.parse(["100"])
%HL7v2.Type.NA{values: ["100"]}
iex> HL7v2.Type.NA.parse([])
%HL7v2.Type.NA{}