Person Location (PL) -- HL7v2 composite data type.
Used to specify patient location (point of care, room, bed, facility, etc.).
11 components:
- Point of Care (IS) -- Table 0302
- Room (IS) -- Table 0303
- Bed (IS) -- Table 0304
- Facility (HD) -- sub-components delimited by
& - Location Status (IS) -- Table 0306
- Person Location Type (IS) -- Table 0305: C=Clinic, N=Nursing, etc.
- Building (IS) -- Table 0307
- Floor (IS) -- Table 0308
- Location Description (ST)
- Comprehensive Location Identifier (EI) -- sub-components delimited by
& - Assigning Authority for Location (HD) -- sub-components delimited by
&
Summary
Types
@type t() :: %HL7v2.Type.PL{ assigning_authority_for_location: HL7v2.Type.HD.t() | nil, bed: binary() | nil, building: binary() | nil, comprehensive_location_identifier: HL7v2.Type.EI.t() | nil, facility: HL7v2.Type.HD.t() | nil, floor: binary() | nil, location_description: binary() | nil, location_status: binary() | nil, person_location_type: binary() | nil, point_of_care: binary() | nil, room: binary() | nil }
Functions
Encodes a PL to a list of component strings.
Examples
iex> HL7v2.Type.PL.encode(%HL7v2.Type.PL{point_of_care: "ICU", facility: %HL7v2.Type.HD{namespace_id: "HOSP"}})
["ICU", "", "", "HOSP"]
iex> HL7v2.Type.PL.encode(nil)
[]
Parses a PL from a list of components.
Examples
iex> HL7v2.Type.PL.parse(["ICU", "101", "A", "HOSP&2.16.840.1.113883.19.4.6&ISO", "", "N"])
%HL7v2.Type.PL{
point_of_care: "ICU",
room: "101",
bed: "A",
facility: %HL7v2.Type.HD{namespace_id: "HOSP", universal_id: "2.16.840.1.113883.19.4.6", universal_id_type: "ISO"},
person_location_type: "N"
}
iex> HL7v2.Type.PL.parse([])
%HL7v2.Type.PL{}