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

Discharge to Location and Date (DLD) -- HL7v2 composite data type.

Used to convey the location where a patient is discharged to and the
effective date of discharge.

2 components:
1. Discharge to Location (IS) -- Table 0113
2. Effective Date (TS) -- sub-components delimited by `&`

# `t`

```elixir
@type t() :: %HL7v2.Type.DLD{
  discharge_to_location: binary() | nil,
  effective_date: HL7v2.Type.TS.t() | nil
}
```

# `encode`

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

Encodes a DLD to a list of component strings.

## Examples

    iex> HL7v2.Type.DLD.encode(%HL7v2.Type.DLD{discharge_to_location: "HOME"})
    ["HOME"]

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

# `parse`

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

Parses a DLD from a list of components.

## Examples

    iex> HL7v2.Type.DLD.parse(["HOME"])
    %HL7v2.Type.DLD{discharge_to_location: "HOME"}

    iex> HL7v2.Type.DLD.parse(["HOME", "20260322"])
    %HL7v2.Type.DLD{discharge_to_location: "HOME", effective_date: %HL7v2.Type.TS{time: %HL7v2.Type.DTM{year: 2026, month: 3, day: 22}}}

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

---

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