Location — Physical or virtual place of care
From a hospital room to a patient's home, from an ambulance to a vaccination drive-through: Location models any place where care is delivered, with geolocation and hierarchy.
Purpose of the resource
Location represents a place where services are provided and resources and participants may be stored, found, contained, or accommodated. The resource covers a variety of granularities: a hospital campus, a building, a floor, a room, a bed, an emergency vehicle, a patient's home, even a geographical area (health region) or a virtual platform.
Location supports both specific instances ("room 312 in building A") and generalised
types ("a standard examination room") through the mode element. Physical
hierarchy is materialised by partOf — a Location points to the Location
that contains it.
Key fields
| Field | Type | Cardinality | Role |
|---|---|---|---|
identifier | Identifier[] | 0..* | External identifiers (HRIS code, FINESS, local OID…). |
status | code | 0..1 | Administrative status: active, suspended, inactive. |
operationalStatus | Coding | 0..1 | Bed/room operational status (v2-0116: U/O/K/I/H/C — Unoccupied, Occupied, Contaminated…). |
name | string | 0..1 | Official, user-facing name. |
alias | string[] | 0..* | Alternate names or abbreviations. |
description | markdown | 0..1 | Detailed description (markdown). |
mode | code | 0..1 | instance = real, unique place. kind = generic type. |
type | CodeableConcept[] | 0..* | Functional type (hospital, pharmacy, ambulance, ICU… — v3-RoleCode). |
contact | ExtendedContactDetail[] | 0..* | Phones, emails, contacts associated with the place. |
address | Address | 0..1 | Postal address (structured: line, city, state, postalCode, country). |
form | CodeableConcept | 0..1 | Physical form: building, floor, room, bed, vehicle, virtual… (location-physical-type). |
position | BackboneElement | 0..1 | GPS coordinates: longitude, latitude, altitude (WGS84 degrees). |
managingOrganization | Reference(Organization) | 0..1 | Organisation responsible for maintaining the place. |
partOf | Reference(Location) | 0..1 | Parent location in the physical hierarchy. |
characteristic | CodeableConcept[] | 0..* | Characteristics (PMR accessible, allergen-free, infectious isolation…). |
hoursOfOperation | Availability[] | 0..* | Opening / availability hours. |
virtualService | VirtualServiceDetail[] | 0..* | Virtual service details (Zoom URL, Teams room…) when form=vi (virtual). |
endpoint | Reference(Endpoint)[] | 0..* | Technical endpoints attached (FHIR, HL7 v2, DICOM…). |
Instance vs kind
The mode field is central to using Location correctly. Two values:
instance— a unique, identifiable physical place. Example: room 312, bed B, building A. This is what an Encounter or Appointment references.kind— a generic place type. Example: "a standard ECG examination room". Useful for modelling resource categories without a physical instance.
In practice, an Encounter must reference a Location with
mode=instance. A kind Location is used upstream to configure
Schedules, services, and equipment inventories.
JSON example
HL7 canonical Location example: second floor of the Burgers University Medical Center South Wing, formerly used by Psychiatry, with address, GPS coordinates and opening hours.
{
"resourceType": "Location",
"id": "1",
"identifier": [{
"value": "B1-S.F2"
}],
"status": "active",
"operationalStatus": {
"system": "http://terminology.hl7.org/CodeSystem/v2-0116",
"code": "U",
"display": "Unoccupied"
},
"name": "South Wing, second floor",
"alias": ["BU MC, SW, F2", "Burgers University Medical Center, South Wing, second floor"],
"description": "Second floor of the Old South Wing, formerly in use by Psychiatry",
"mode": "instance",
"type": [{
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"code": "HOSP",
"display": "Hospital"
}]
}],
"contact": [{
"telecom": [{
"system": "phone",
"value": "2328",
"use": "work"
}, {
"system": "fax",
"value": "2329",
"use": "work"
}, {
"system": "email",
"value": "second wing admissions"
}]
}],
"address": {
"use": "work",
"line": ["Galapagosweg 91, Building A"],
"city": "Den Burg",
"postalCode": "9105 PZ",
"country": "NLD"
},
"form": {
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
"code": "wi",
"display": "Wing"
}]
},
"position": {
"longitude": -83.6945691,
"latitude": 42.25475478,
"altitude": 0
},
"managingOrganization": { "reference": "Organization/f001" },
"partOf": { "reference": "Location/2" },
"hoursOfOperation": [{
"availableTime": [{
"daysOfWeek": ["mon", "tue", "wed", "thu", "fri"],
"availableStartTime": "09:00:00",
"availableEndTime": "17:00:00"
}]
}],
"endpoint": [{ "reference": "Endpoint/example" }]
} Worth pointing out in this example:
mode=instance— this is a real, unique floor.form= "Wing" — the physical form.operationalStatusreuses the HL7 v2-0116 table inherited from the PL (Person Location) segment.partOfpoints to Location/2, the parent building.positionenables proximity search (?near=42.25,-83.69|10|km).
Hierarchy through partOf
Location is typically used as a tree: campus → building → floor → department → room →
bed. Each level points to its parent via partOf. This hierarchy enables:
- Transitive search:
GET /Location?partof=Location/campus-xreturns everything on campus X. - Ancestor inclusion:
GET /Location/room-312?_include=Location:partof:iteratewalks up the chain to the root. - Containment modelling: room is part of floor, which is part of building, and so on.
Common pitfalls
- Confusing
addressandposition— the postal address does not give latitude/longitude:positionmust be populated separately. Many FHIR servers don't auto-geocode. - Encounter pointing to
Location[mode=kind]— invalid. An Encounter references a specific physical instance, not a category. - Cycle in
partOf— the tree must be acyclic. A Location A pointing to B pointing to A breaks aggregations. status=activeon akindLocation — fuzzy semantics. Administrative status is designed for physical instances.- Multiple
position— cardinality is0..1. For large places (campus), pick a central point. - Hours without timezone —
availableStartTimeis of typetimewithout timezone. Timezone context is carried byaddressor the attached Organization. - Virtual Location without
virtualService— whenform=vi,virtualServicewith connection details must be populated.
Related resources
- Organization — the organisation managing the Location (
managingOrganization). - Encounter — references one or more Locations to model an intra-stay journey (room A → OR → recovery → room B).
- Appointment, Schedule — may reference a Location as actor or appointment place.
- HealthcareService — care service offered at a Location.
- Endpoint — technical access points attached to the Location.
See also: the FHIR R5 index.