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

Waveform Source (WVS) -- HL7v2 composite data type.

Identifies the source(s) of a waveform channel. Used in CD (Channel Definition).

2 components:
1. Source One Name (ST)
2. Source Two Name (ST)

# `t`

```elixir
@type t() :: %HL7v2.Type.WVS{
  source_one_name: binary() | nil,
  source_two_name: binary() | nil
}
```

# `encode`

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

Encodes a WVS to a list of component strings.

## Examples

    iex> HL7v2.Type.WVS.encode(%HL7v2.Type.WVS{source_one_name: "RA", source_two_name: "LA"})
    ["RA", "LA"]

    iex> HL7v2.Type.WVS.encode(%HL7v2.Type.WVS{source_one_name: "V1"})
    ["V1"]

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

# `parse`

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

Parses a WVS from a list of components.

## Examples

    iex> HL7v2.Type.WVS.parse(["RA", "LA"])
    %HL7v2.Type.WVS{source_one_name: "RA", source_two_name: "LA"}

    iex> HL7v2.Type.WVS.parse(["V1"])
    %HL7v2.Type.WVS{source_one_name: "V1"}

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

---

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