Name with Date and Location (NDL) -- HL7v2 composite data type.
Used in OBR fields 32-35 to identify persons (interpreters, technicians, transcriptionists) along with the time and location of their activity.
11 components per HL7 v2.5.1:
- Name (CNN) -- sub-components delimited by
& - Start Date/Time (TS) -- sub-components delimited by
& - End Date/Time (TS) -- sub-components delimited by
& - Point of Care (IS)
- Room (IS)
- Bed (IS)
- Facility (HD) -- sub-components delimited by
& - Location Status (IS)
- Patient Location Type (IS)
- Building (IS)
- Floor (IS)
Summary
Types
@type t() :: %HL7v2.Type.NDL{ bed: binary() | nil, building: binary() | nil, end_date_time: HL7v2.Type.TS.t() | nil, facility: HL7v2.Type.HD.t() | nil, floor: binary() | nil, location_status: binary() | nil, name: HL7v2.Type.CNN.t() | nil, patient_location_type: binary() | nil, point_of_care: binary() | nil, room: binary() | nil, start_date_time: HL7v2.Type.TS.t() | nil }
Functions
Encodes an NDL to a list of component strings.
Examples
iex> HL7v2.Type.NDL.encode(%HL7v2.Type.NDL{name: %HL7v2.Type.CNN{id_number: "12345", family_name: "Smith", given_name: "John"}})
["12345&Smith&John"]
iex> HL7v2.Type.NDL.encode(nil)
[]
iex> HL7v2.Type.NDL.encode(%HL7v2.Type.NDL{})
[]
Parses an NDL from a list of components.
Component 1 (Name/CNN), 2-3 (TS), and 7 (HD) contain sub-components
delimited by &.
Examples
iex> HL7v2.Type.NDL.parse(["12345&Smith&John"])
%HL7v2.Type.NDL{
name: %HL7v2.Type.CNN{id_number: "12345", family_name: "Smith", given_name: "John"}
}
iex> HL7v2.Type.NDL.parse([])
%HL7v2.Type.NDL{}