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:
- Discharge to Location (IS) -- Table 0113
- Effective Date (TS) -- sub-components delimited by
&
Summary
Types
@type t() :: %HL7v2.Type.DLD{ discharge_to_location: binary() | nil, effective_date: HL7v2.Type.TS.t() | nil }
Functions
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)
[]
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{}