# `HL7v2.Type.NA`
[🔗](https://github.com/Balneario-de-Cofrentes/hl7v2/blob/v3.10.1/lib/hl7v2/type/na.ex#L1)

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):
1. Value 1 (NM)
2. Value 2 (NM)
3. Value 3 (NM)
4. Value 4 (NM)
... additional values as needed

# `t`

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

# `encode`

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

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)
    []

# `parse`

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

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{}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
