# `HL7v2.Type.LA1`
[🔗](https://github.com/Balneario-de-Cofrentes/hl7v2/blob/v3.10.1/lib/hl7v2/type/la1.ex#L1)

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)

# `t`

```elixir
@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
}
```

# `encode`

```elixir
@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`

```elixir
@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{}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
