HL7v2.Type.LA1 (HL7v2 v3.10.1)

Copy Markdown View Source

Location with Address Variation 1 (LA1) -- HL7v2 composite data type.

Specifies a patient location with an optional address. Used for dispense-to and deliver-to locations in pharmacy segments.

9 components:

  1. Point of Care (IS)
  2. Room (IS)
  3. Bed (IS)
  4. Facility (HD) -- sub-components
  5. Location Status (IS)
  6. Patient Location Type (IS)
  7. Building (IS)
  8. Floor (IS)
  9. Address (AD) -- sub-components (street, city, state, zip, country, type)

Summary

Functions

Encodes an LA1 to a list of component strings.

Parses an LA1 from a list of components.

Types

t()

@type t() :: %HL7v2.Type.LA1{
  address: binary() | nil,
  bed: binary() | nil,
  building: binary() | nil,
  facility: HL7v2.Type.HD.t() | nil,
  floor: binary() | nil,
  location_status: binary() | nil,
  patient_location_type: binary() | nil,
  point_of_care: binary() | nil,
  room: binary() | nil
}

Functions

encode(la1)

@spec encode(t() | nil) :: list()

Encodes an LA1 to a list of component strings.

Examples

iex> HL7v2.Type.LA1.encode(%HL7v2.Type.LA1{point_of_care: "ICU", room: "101", bed: "A"})
["ICU", "101", "A"]

iex> HL7v2.Type.LA1.encode(nil)
[]

parse(components)

@spec parse(list()) :: t()

Parses an LA1 from a list of components.

Examples

iex> HL7v2.Type.LA1.parse(["ICU", "101", "A"])
%HL7v2.Type.LA1{point_of_care: "ICU", room: "101", bed: "A"}

iex> HL7v2.Type.LA1.parse([])
%HL7v2.Type.LA1{}