HL7v2.Type.MA (HL7v2 v3.10.1)

Copy Markdown View Source

Multiplexed Array (MA) -- HL7v2 composite data type.

Contains a variable number of numeric (NM) sample values from multiple waveform channels. Used in OBX for waveform data transmission.

Variable components (4+ per HL7 spec):

  1. Sample Y From Channel 1 (NM)
  2. Sample Y From Channel 2 (NM)
  3. Sample Y From Channel 3 (NM)
  4. Sample Y From Channel 4 (NM) ... additional channels as needed

Summary

Functions

Encodes an MA to a list of component strings.

Parses an MA from a list of components.

Types

t()

@type t() :: %HL7v2.Type.MA{values: [binary()]}

Functions

encode(arg1)

@spec encode(t() | nil) :: list()

Encodes an MA to a list of component strings.

Examples

iex> HL7v2.Type.MA.encode(%HL7v2.Type.MA{values: ["1.2", "3.4", "5.6"]})
["1.2", "3.4", "5.6"]

iex> HL7v2.Type.MA.encode(%HL7v2.Type.MA{})
[]

iex> HL7v2.Type.MA.encode(nil)
[]

parse(components)

@spec parse(list()) :: t()

Parses an MA from a list of components.

All components are stored as a list of string values.

Examples

iex> HL7v2.Type.MA.parse(["1.2", "3.4", "5.6"])
%HL7v2.Type.MA{values: ["1.2", "3.4", "5.6"]}

iex> HL7v2.Type.MA.parse(["100"])
%HL7v2.Type.MA{values: ["100"]}

iex> HL7v2.Type.MA.parse([])
%HL7v2.Type.MA{}