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

Scheduling Class Value Pair (SCV) -- HL7v2 composite data type.

Associates a scheduling parameter class with its value. Used in APR segment.

2 components:
1. Parameter Class (CWE) -- sub-components, Table 0294
2. Parameter Value (ST)

# `t`

```elixir
@type t() :: %HL7v2.Type.SCV{
  parameter_class: HL7v2.Type.CWE.t() | nil,
  parameter_value: binary() | nil
}
```

# `encode`

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

Encodes an SCV to a list of component strings.

## Examples

    iex> HL7v2.Type.SCV.encode(%HL7v2.Type.SCV{parameter_class: %HL7v2.Type.CWE{identifier: "PREFDAY"}, parameter_value: "MON"})
    ["PREFDAY", "MON"]

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

# `parse`

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

Parses an SCV from a list of components.

## Examples

    iex> HL7v2.Type.SCV.parse(["PREFDAY&Preferred Day&HL70294", "MON"])
    %HL7v2.Type.SCV{
      parameter_class: %HL7v2.Type.CWE{identifier: "PREFDAY", text: "Preferred Day", name_of_coding_system: "HL70294"},
      parameter_value: "MON"
    }

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

---

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