Driver's License Number (DLN) -- HL7v2 composite data type.
Used for driver's license identification.
3 components:
- License Number (ST)
- Issuing State, Province, Country (IS) -- Table 0333
- Expiration Date (DT)
Summary
Types
@type t() :: %HL7v2.Type.DLN{ expiration_date: Date.t() | HL7v2.Type.DT.t() | nil, issuing_state_province_country: binary() | nil, license_number: binary() | nil }
Functions
Encodes a DLN to a list of component strings.
Examples
iex> HL7v2.Type.DLN.encode(%HL7v2.Type.DLN{license_number: "S12345678", issuing_state_province_country: "CA", expiration_date: ~D[2028-01-01]})
["S12345678", "CA", "20280101"]
iex> HL7v2.Type.DLN.encode(%HL7v2.Type.DLN{license_number: "S12345678"})
["S12345678"]
iex> HL7v2.Type.DLN.encode(nil)
[]
Parses a DLN from a list of components.
Examples
iex> HL7v2.Type.DLN.parse(["S12345678", "CA", "20280101"])
%HL7v2.Type.DLN{license_number: "S12345678", issuing_state_province_country: "CA", expiration_date: ~D[2028-01-01]}
iex> HL7v2.Type.DLN.parse(["S12345678", "CA"])
%HL7v2.Type.DLN{license_number: "S12345678", issuing_state_province_country: "CA"}
iex> HL7v2.Type.DLN.parse(["S12345678"])
%HL7v2.Type.DLN{license_number: "S12345678"}
iex> HL7v2.Type.DLN.parse([])
%HL7v2.Type.DLN{}