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

Query Input Parameter List (QIP) -- HL7v2 composite data type.

Used in QPD segment for passing query parameters.

2 components:
1. Segment Field Name (ST) -- e.g., "@PID.3.1"
2. Values (ST)

# `t`

```elixir
@type t() :: %HL7v2.Type.QIP{
  segment_field_name: binary() | nil,
  values: binary() | nil
}
```

# `encode`

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

Encodes a QIP to a list of component strings.

## Examples

    iex> HL7v2.Type.QIP.encode(%HL7v2.Type.QIP{segment_field_name: "@PID.3.1", values: "12345"})
    ["@PID.3.1", "12345"]

    iex> HL7v2.Type.QIP.encode(%HL7v2.Type.QIP{segment_field_name: "@PID.5.1"})
    ["@PID.5.1"]

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

# `parse`

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

Parses a QIP from a list of components.

## Examples

    iex> HL7v2.Type.QIP.parse(["@PID.3.1", "12345"])
    %HL7v2.Type.QIP{segment_field_name: "@PID.3.1", values: "12345"}

    iex> HL7v2.Type.QIP.parse(["@PID.5.1"])
    %HL7v2.Type.QIP{segment_field_name: "@PID.5.1"}

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

---

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