Day Type and Number (DTN) -- HL7v2 composite data type.
Specifies a day type and the number of days for insurance certification.
2 components:
- Day Type (IS) -- Table 0149: e.g., "AP" (approved), "DE" (denied), "PE" (pending)
- Number of Days (NM) -- the number of days
Summary
Types
@type t() :: %HL7v2.Type.DTN{ day_type: binary() | nil, number_of_days: HL7v2.Type.NM.t() | nil }
Functions
Encodes a DTN to a list of component strings.
Examples
iex> HL7v2.Type.DTN.encode(%HL7v2.Type.DTN{day_type: "AP", number_of_days: %HL7v2.Type.NM{value: "10", original: "10"}})
["AP", "10"]
iex> HL7v2.Type.DTN.encode(nil)
[]
Parses a DTN from a list of components.
Examples
iex> HL7v2.Type.DTN.parse(["AP", "10"])
%HL7v2.Type.DTN{day_type: "AP", number_of_days: %HL7v2.Type.NM{value: "10", original: "10"}}
iex> HL7v2.Type.DTN.parse([])
%HL7v2.Type.DTN{}