--- type: "resource" title: "Location" resource: "Location" --- # Location ## Introduction ## Scope and Usage A Location includes both incidental locations (a place which is used for healthcare without prior designation or authorization) and dedicated, formally appointed locations. Locations may be private, public, mobile or fixed and scale from small freezers to full hospital buildings or parking garages. Examples of Locations are: - Building, ward, corridor, room or bed - Mobile Clinic - Freezer, incubator - Vehicle or lift - Home, shed, or a garage - Road, parking place, a park - Ambulance (generic) - Ambulance (specific) - Patient's Home (generic) - Jurisdiction These locations are not intended to cover locations on a patient where something occurred (i.e. a patient's broken leg), but can happily cover the location where the patient broke the leg (the playground) ## Boundaries and Relationships Locations and Organizations are very closely related resources and can often be mixed/matched/confused. The Location is intended to describe the more physical structures managed/operated by an organization, whereas the Organization is intended to represent the more conceptual hierarchies, such as a ward. Location may also be used to represent virtual locations, for example for telehealth visits. As noted in the Event pattern, a Location represents where a service is performed. An Organization can represent who performed the service. A Location is valid without an address in cases where it could be purely described by a geo-coded location in remote areas, or when recorded by a device. Locations with a mode = "kind" would also likely not have an address, as they are just a type of location, but could also have an address where they can be found at the address. Another use of location could be for describing a Jurisdiction. This jurisdiction may be considered a classified boundary which could be a combination of a physical boundary, and some other discriminator(s): - Nation - Country-wide community or Federal Government (Ministry of Health) - Province or State (community or Government) - Business (throughout an enterprise) - Business scope (CDC/FDA) - Business segment (UK Pharmacy) ## Notes ## Notes - Multiple Organizations or Practitioners may provide services at a Location. These references are not kept in Location, but can be found in the models for [Organization](organization) and [Practitioner](practitioner) instead. - Locations may range from whole buildings to cabinets; it is possible to relate smaller Locations to their containing bigger Location using the Location.partOf element. - Location.position is expressed using the same syntax, datum and reference system as used in Google Earth's KML files, see [Google/OGS's KML](http://www.opengeospatial.org/standards/kml). - Location availability exceptions such as public holidays or planned maintenance can be blocked out using the `hoursOfOperation.notAvailableTime` properties. It might be defined as just a textual description (e.g. Public Holidays) in which case the user would need to know what that means. Preferably it should include the actual start/end dates that is it not available. Not intended to store ongoing historic data here, but the most recent/upcoming relevant data (however nothing prevents that data from existing either) ### Location Mode The Location.mode element can be used to indicate whether a Location resource represents a specific (potentially identifiable) Location ('instance'), or a class of Locations ('kind'). Especially Resources capturing orders, resource scheduling, plans and definitions may refer to Locations in 'kind' mode. For these domains, it is often not necessary to refer to a specific Location, but rather to a class of Locations. An example of this is found in planning, where we need to allocate an "isolation room" for a patient, or need to dispatch "an ambulance" at a certain time. In these cases it is not important to identify exactly which isolation room or ambulance is allocated, it is sufficient to just indicate a 'kind' of Location. Note that 'kind' should not be used to represent Locations where an actual instance of a Location was involved, but by identifying missing information. E.g. when a patient arrived 'by ambulance', but it is not known by which ambulance, this should be represented using a Location in 'instance' mode with a missing identifier, not a Location of 'kind' ambulance. Some of Location's data elements are only relevant when mode is 'instance' and should not be used when mode is 'kind': _(however this information could still be included if was relevant, such as when it is a generic item, but not globally generic, e.g. a Burgers Medical Centre ambulance)_ - Location.identifier - Location.telecom - Location.address - Location.position - Location.status - Location.managingOrganization ## Example Location Hierarchy An example location hierarchy should help give some guidance as to one example of how a location hierarchy could look within a fictitious Hospital. _(The nesting here would be the "part-of" structure of the location)_ Hospital A Building C (instance) East Wing (instance) Level 1 (instance) Reception (instance) Nurses Station EM-ns1 (instance) Medication Cupboard A (instance) Room 1 (instance) Room 1a (instance) - space in room separatable via a curtain Bed 1a (instance) - always in this room Room 1b (instance) Trolley 43 (instance) - moves about Room 1d (instance) Trolley 19 (instance) - moves about Room 2 (instance) ... Theatre EM-TA (instance) Corridor (generic) Level 2 (instance) Reception (instance) ... Nurses Station EM-ns1 (instance) Medication Cupboard A (instance) Corridor (generic) Mobile Services (kind) Ambulance (kind) Ambulance AMB1 (instance) Ambulance AMB2 (instance) _Note: Wards/departments are not part of this structure - these would form part of the Organizational Hierarchy._ ### Positional Searching #### Near: Locations within a specified distance of a provided geocode Searching for locations often require that a facility is within a specified distance of a specified point. For example, to locate healthcare facilities within 11.2 kms of a client's home, or the current geo-coded position of a practitioner travelling between patients (read from a mobile phone or device). GET \[base\]/Location?near=-83.694810|42.256500|11.20|km... The distance and distance unit parameter components are optional, if the units are missing, kms are to be assumed. If the distance parameter component is missing, then the server may choose its own interpretation of what near enough is to be included in the search results. Note: The STU3 version of this functionality did not support the multiple separator `,` or chaining. The update to this format now supports both of these use cases. (And the near-distance was deprecated as a result of this change too) The distance between the location and the provided point is often used as one of the determining factors for selection of the location. So this value is included in the results. However the value cannot be inside the Location resource as it is different depending on the point of reference in the search. So the distance between is included in the search section of the bundle entry. Where multiple near positions are included, the distance to the closest point provided may be included. Note: When sorting by the **near** search parameter the results can be considered an ordered set, even if the implementation does not provide calculated distances to the point provided. Given the variety of possible implementations, this ordering might not be dependable. If no bounding distance is provided via the search parameter, this can be considered as an ordered set of closest matches (up to an implied or explicit count). If the expectation is that the response is ordered by near, then near MUST be provided as a search parameter in the request as well. A Bad Request will be returned if sorting by near is requested without the near search parameter. For example: GET \[base\]/Location?near=-83.694810|42.256500|11.20|km&\_sort=near #### Contains: Locations with a boundary that contains the provided geocode Locations can also include a definition of their boundary shape in the standard extension [location-boundary-geojson]([%extensions-location%]StructureDefinition-location-boundary-geojson). This is very useful with defining explicit coverage areas. The special `contains` search parameter tests that the geocoded point(s) provided (expressed as \[latitude\]|\[longitude\] using the WGS84 datum) are contained by the defined boundary. GET \[base\]/Location?contains=-83.694810|42.256500 Support for multiple points can also be provided using the `,` syntax which is interpreted as the location returned in the search contains at least 1 of the provided co-ordinates. > **Note:** Searching this data requires specialized geo-spatial search infrastructure, or other approximating implementations. ## StructureDefinition ### Elements (Simplified) - **[Location](/location-definitions#Location)** [0..*]: - Details and position information for a place - **[Location.identifier](/location-definitions#Location.identifier)** [0..*]: [Identifier](/Identifier) Unique code or number identifying the location to its users - **[Location.status](/location-definitions#Location.status)** [0..1]: [code](/code) required:[location-status](/valueset-location-status) active | suspended | inactive - **[Location.operationalStatus](/location-definitions#Location.operationalStatus)** [0..1]: [Coding](/Coding) preferred:[v2-0116](/valueset-v2-0116) The operational status of the location (typically only for a bed/room) - **[Location.code](/location-definitions#Location.code)** [0..*]: [CodeableConcept](/CodeableConcept) example:[iso3166-1-2](/valueset-iso3166-1-2) Codes that identify this location - **[Location.name](/location-definitions#Location.name)** [0..1]: [string](/string) Name of the location as used by humans - **[Location.alias](/location-definitions#Location.alias)** [0..*]: [string](/string) A list of alternate names that the location is known as, or was known as, in the past - **[Location.description](/location-definitions#Location.description)** [0..1]: [markdown](/markdown) Additional details about the location that could be displayed as further information to identify the location beyond its name - **[Location.mode](/location-definitions#Location.mode)** [0..1]: [code](/code) required:[location-mode](/valueset-location-mode) instance | kind - **[Location.type](/location-definitions#Location.type)** [0..*]: [CodeableConcept](/CodeableConcept) preferred:[service-type](/valueset-service-type) Types of services available at this location - **[Location.contact](/location-definitions#Location.contact)** [0..*]: [ExtendedContactDetail](/ExtendedContactDetail) Official contact details for the location - **[Location.address](/location-definitions#Location.address)** [0..1]: [Address](/Address) Physical location - **[Location.form](/location-definitions#Location.form)** [0..1]: [CodeableConcept](/CodeableConcept) example:[location-form](/valueset-location-form) Physical form of the location - **[Location.position](/location-definitions#Location.position)** [0..1]: [BackboneElement](/BackboneElement) The absolute geographic location - **[Location.position.longitude](/location-definitions#Location.position.longitude)** [1..1]: [decimal](/decimal) Longitude with WGS84 datum - **[Location.position.latitude](/location-definitions#Location.position.latitude)** [1..1]: [decimal](/decimal) Latitude with WGS84 datum - **[Location.position.altitude](/location-definitions#Location.position.altitude)** [0..1]: [decimal](/decimal) Altitude with WGS84 datum - **[Location.managingOrganization](/location-definitions#Location.managingOrganization)** [0..1]: Reference([Organization](/Organization)) Organization responsible for provisioning and upkeep - **[Location.partOf](/location-definitions#Location.partOf)** [0..1]: Reference([Location](/Location)) Another Location this one is physically a part of - **[Location.characteristic](/location-definitions#Location.characteristic)** [0..*]: [CodeableConcept](/CodeableConcept) example:[location-characteristic](/valueset-location-characteristic) Collection of characteristics (attributes) - **[Location.hoursOfOperation](/location-definitions#Location.hoursOfOperation)** [0..1]: [Availability](/Availability) What days/times during a week is this location usually open (including exceptions) - **[Location.virtualService](/location-definitions#Location.virtualService)** [0..*]: [VirtualServiceDetail](/VirtualServiceDetail) Connection details of a virtual service (e.g. conference call) - **[Location.endpoint](/location-definitions#Location.endpoint)** [0..*]: Reference([Endpoint](/Endpoint)) Technical endpoints providing access to services operated for the location ## Mappings - [Location Mappings](/location-mappings) — 34 mapping entries ## Implementation Guide ### implementationguide-Location-core.xml ```xml <status value="draft"/> <date value="1970-01-01T10:00:00+10:00"/> <publisher value="HL7"/> <description value="Defines common extensions used with or related to the Location resource"/> </ImplementationGuide> ``` ## Resource Packs ### list-Location-packs.xml ```xml <?xml version="1.0" encoding="UTF-8"?> <List xmlns="http://hl7.org/fhir"> <id value="Location-packs"/> <status value="current"/> <mode value="working"/> <entry> <item> <reference value="ImplementationGuide/Location-core"/> </item> </entry> </List> ``` ## Search Parameters - [address](/location-search#address) — **string** — A server defined search that may match any of the string fields in the Address, including line, city, district, state, country, postalCode, and/or text — `Location.address` - [address-city](/location-search#address-city) — **string** — A city specified in an address — `Location.address.city` - [address-country](/location-search#address-country) — **string** — A country specified in an address — `Location.address.country` - [address-postalcode](/location-search#address-postalcode) — **string** — A postal code specified in an address — `Location.address.postalCode` - [address-state](/location-search#address-state) — **string** — A state specified in an address — `Location.address.state` - [address-use](/location-search#address-use) — **token** — A use code specified in an address — `Location.address.use` - [endpoint](/location-search#endpoint) — **reference** — Technical endpoints providing access to services operated for the location — `Location.endpoint` - [identifier](/location-search#identifier) — **token** — An identifier for the location — `Location.identifier` - [name](/location-search#name) — **string** — A portion of the location's name or alias — `Location.name | Location.alias` - [near](/location-search#near) — **special** — Search for locations where the location.position is near to, or within a specified distance of, the provided coordinates expressed as [latitude]|[longitude]|[distance]|[units] (using the WGS84 datum, see notes). Servers which support the near parameter SHALL support the unit string 'km' for kilometers and SHOULD support '[mi_us]' for miles, support for other units is optional. If the units are omitted, then kms should be assumed. If the distance is omitted, then the server can use its own discretion as to what distances should be considered near (and units are irrelevant). If the server is unable to understand the units (and does support the near search parameter), it MIGHT return an OperationOutcome and fail the search with a http status 400 BadRequest. If the server does not support the near parameter, the parameter MIGHT report the unused parameter in a bundled OperationOutcome and still perform the search ignoring the near parameter. Note: The algorithm to determine the distance is not defined by the specification, and systems might have different engines that calculate things differently. They could consider geographic point to point, or path via road, or including current traffic conditions, or just simple neighboring postcodes/localities if that's all it had access to. — `Location.position` - [operational-status](/location-search#operational-status) — **token** — Searches for locations (typically bed/room) that have an operational status (e.g. contaminated, housekeeping) — `Location.operationalStatus` - [organization](/location-search#organization) — **reference** — Searches for locations that are managed by the provided organization — `Location.managingOrganization` - [partof](/location-search#partof) — **reference** — A location of which this location is a part — `Location.partOf` - [status](/location-search#status) — **token** — Searches for locations with a specific kind of status — `Location.status` - [type](/location-search#type) — **token** — A code for the type of location — `Location.type` - [contains](/location-search#contains) — **special** — Select locations that contain the specified co-ordinates — `Location.extension('http://hl7.org/fhir/StructureDefinition/location-boundary-geojson').value` - [characteristic](/location-search#characteristic) — **token** — One of the Location's characteristics — `Location.characteristic` - [characteristic](/location-search#characteristic) — **token** — Physical form of the location (e.g. bed/ward/site/virtual) — `Location.form` - [mode](/location-search#mode) — **token** — The mode of the location (instance | kind) — `Location.mode` - [code](/location-search#code) — **token** — The code of the location — `Location.code` [Full Search Parameters](/location-search) ## Examples - [1](/location-example-1) — location-example — Wing within a hospital - [2](/location-example-2) — location-example-room — Operation room within hospital - [3ad0687e-f477-468c-afd5-fcc2bf897819](/location-example-3ad0687e-f477-468c-afd5-fcc2bf897819) — location-examples-general — General location examples - [amb](/location-example-amb) — location-example-ambulance — Ambulance provided by Burgers Healthcare - [hl7](/location-example-hl7) — location-example-hl7hq — HL7 HQ Location - [location-example](/location-example-location-example) — location-example - [location-example-ambulance](/location-example-location-example-ambulance) — location-example-ambulance - [location-example-hl7hq](/location-example-location-example-hl7hq) — location-example-hl7hq - [location-example-patients-home](/location-example-location-example-patients-home) — location-example-patients-home - [location-example-room](/location-example-location-example-room) — location-example-room - [location-example-ukpharmacy](/location-example-location-example-ukpharmacy) — location-example-ukpharmacy - [location-examples-general](/location-example-location-examples-general) — location-examples-general - [location-examples-header](/location-example-location-examples-header) — location-examples-header - [ph](/location-example-ph) — location-example-patients-home — Patient's Home which can be used for remote encounters - [ukp](/location-example-ukp) — location-example-ukpharmacy — UK Pharmacy Jurisdiction - [wash-dc-metro](/location-example-wash-dc-metro) — location-wash-dc-metro — Washington, DC metro area - location with a boundary [Full Examples](/location-examples) ## Mapping Exceptions ### location-fivews-mapping-exceptions.xml ### Divergent Elements - **FiveWs.status** → **Location.operationalStatus** ### Unmapped Elements - **FiveWs.what** — Unknown - **FiveWs.recorded** — Unknown - **FiveWs.author** — Unknown - **FiveWs.actor** — Unknown - **FiveWs.cause** — Unknown - **FiveWs.version** — Unknown - **FiveWs.witness** — Unknown - **FiveWs.where** — Unknown - **FiveWs.context** — Unknown - **FiveWs.init** — Unknown - **FiveWs.why** — Unknown - **FiveWs.source** — Unknown - **FiveWs.who** — Unknown - **FiveWs.grade** — Unknown - **FiveWs.planned** — Unknown - **FiveWs.done** — Unknown - **FiveWs.subject** — Unknown ### location-participant-mapping-exceptions.xml ### Divergent Elements - **Participant.identifier** → **Location.identifier** - shortUnmatched | reason=Unknown | pattern=Business Identifier for location | resource=Unique code or number identifying the location to its users - definitionUnmatched | reason=Unknown | pattern=Business identifiers assigned to this location by one of the applications involved. These identifiers remain constant as the resource is updated and propagates from server to server. | resource=Unique code or number identifying the location to its users. - commentsUnmatched | reason=Unknown | pattern=Note: This is a business identifier, not a resource identifier (see [discussion](resource.html#identifiers)). It is best practice for the identifier to only appear on a single resource instance, however business practices may occasionally dictate that multiple resource instances with the same identifier can exist - possibly even with different resource types. For example, multiple Patient and a Person resource instance might share the same social insurance number. - requirementsUnmatched | reason=Unknown | pattern=Allows identification of the location as it is known by various participating systems and in a way that remains consistent across servers. | resource=Organization label locations in registries, need to keep track of those. - **Participant.active** → **Location.status** - missingTypes | reason=Unknown | pattern=boolean - extraTypes | reason=Unknown - shortUnmatched | reason=Unknown | pattern=Whether the location is currently active | resource=active | suspended | inactive - definitionUnmatched | reason=Unknown | pattern=Whether this location record is in active use. | resource=The status property covers the general availability of the resource, not the current value which may be covered by the operationalStatus, or by a schedule/slots if they are configured for the location. - **Participant.name** → **Location.name** - shortUnmatched | reason=Unknown | pattern=A name for the location | resource=Name of the location as used by humans - definitionUnmatched | reason=Unknown | pattern=Description of the location as presented to a consumer while searching. | resource=Name of the location as used by humans. Does not need to be unique. ### location-participantcontactable-mapping-exceptions.xml ### Divergent Elements - **ParticipantContactable.address** → **Location.address** - summary | reason=Unknown | pattern=true - shortUnmatched | reason=Unknown | pattern=An address for the location | resource=Physical location - definitionUnmatched | reason=Unknown | pattern=An address where the location can be reached. | resource=Physical location. - requirementsUnmatched | reason=Unknown | pattern=May need to keep track of location addresses for contacting, billing or reporting requirements and also to help with identification. | resource=If locations can be visited, we need to keep track of their address. ### Unmapped Elements - **Participant.identifier** — Unknown - **Participant.name** — Unknown - **Participant.active** — Unknown - **ParticipantContactable.telecom** — Unknown