Base Path: /fhir/4.0/Location
Version: 1.0.0
The FHIR Location API allows you to look up details about the FHIR 4.0 Locations. The endpoint provides the ability to:
The Location API aggregates data from multiple sources, to learn about working with aggregated APIs refer to the Aggregated APIs guide in the Knowledge Hub.
This API is based on the R4 release of the FHIR standard, for more information on this API refer to the official FHIR documentation.
GET /fhir/4.0/Location/
Return all Location resources for the given search criteria, or all Locations if a search criteria is not specified.
Name
Type
Data Type
Description
Name:
address
optional
Type:
query
Data Type:
string
Description:
Filters the locations to those that match the specified address
Sample Value: 123 Main St, Suite 200, Anytown, CA, 12345, USA
Name:
address-city
optional
Type:
query
Data Type:
string
Description:
Filters the locations to those that match the specified address-city
Sample Value: Sydney
Name:
address-country
optional
Type:
query
Data Type:
string
Description:
Filters the locations to those that match the specified address-country
Sample Value: Australia
Name:
address-postalcode
optional
Type:
query
Data Type:
string
Description:
Filters the locations to those that match the specified address-postal-code
Sample Value: 1466
Name:
address-state
optional
Type:
query
Data Type:
string
Description:
Filters the locations to those that match the specified address-state
Sample Value: NSW
Name:
address-use
optional
Type:
query
Data Type:
string
Description:
Filters the locations to those that match the specified address-use. Possible values are
Sample Value: home
Name:
endpoint
optional
Type:
query
Data Type:
array
Description:
Filters the locations to those that match the specified endpoint references
Note: the endpoint
can be chained to define filters on the reference endpoint, each of the chained parameters can specify multiple comma separated values.
Sample Value: endpoint.name=Questionnaire Destination&endpoint.connection-type=http://terminology.hl7.org/CodeSystem/endpoint-connection-type|ihe-iid&endpoint.status=active
Name:
identifier
optional
Type:
query
Data Type:
array
Description:
Filters the locations to those that match the specified identifier
Sample Value: http://hl7.org/fhir/sid/us-npi|1234567890
Name:
name
optional
Type:
query
Data Type:
array
Description:
Filters the locations to those which their requested name is a portion of the location's name or alias
Sample Value: University Medical Center, South Wing Neuro 1
Name:
near
optional
Type:
query
Data Type:
string
Description:
Filters the locations to those where the position is near or within a specified distance of the provided coordinates in the format [latitude]|[longitude]|[distance]|[units]
Sample Value: 42.361,-71.068,10
Name:
operational-status
optional
Type:
query
Data Type:
array
Description:
Filters the locations to those that match the specified operational status
Sample Value: http://terminology.hl7.org/CodeSystem/v2-0116|C, http://terminology.hl7.org/CodeSystem/v2-0116|K
Name:
organization
optional
Type:
query
Data Type:
array
Description:
Filters the locations to those where the managing Organization match the specified Organization references.
Note: the organization can be chained to define filters on the reference organization, each of the chained parameters can specify multiple comma separated values.
Sample Value: organization.name=South Wing Neuro 1&organization.address=123 Grafton Road Auckland&organization.type=http://terminology.hl7.org/CodeSystem/organization-type|prov
Name:
partof
optional
Type:
query
Data Type:
array
Description:
Filters the location to those that are physically part of the specified Location references.
Note: partof
can be chained to define filter on the reference location, each of the chained location can specify multiple comma separated values.
Sample Value: partof=Location/shaO74NZR7CTOEKDLODIFSODJS4DLRWBEJ6XIO4PGOGJDCTSMCWVNSQ&partof.name=UK Pharmacies
Name:
status
optional
Type:
query
Data Type:
string
Description:
Filters the locations to those that match the specified status. Possible values are
Sample Value: active
Name:
type
optional
Type:
query
Data Type:
string
Description:
Filters the locations to those that match the specified function performed by the location
Sample Value: type=http://terminology.hl7.org/CodeSystem/v3-ServiceDeliveryLocationRoleType|HOSP
Name:
-include-sources
optional
Type:
query
Data Type:
array
Description:
The -include-sources parameter defines which sources should be queried for the results.
Note: Either -include-sources
or -exclude-sources
parameter can be specified, not both. If -include-sources is specified, ONLY the specified sources will be searched. Note that the sources specified should be enabled.
Name:
-exclude-sources
optional
Type:
query
Data Type:
array
Description:
The -exclude-sources parameter defines which sources should NOT be queried for the results.
Note: Either -include-sources
or -exclude-sources
parameter can be specified, not both. If -exclude-sources is specified, the specified sources will NOT be searched. Note that the sources specified should be enabled..
Name:
_format
optional
Type:
query
Data Type:
string
Description:
Media type of the response. It takes precedence over the accept header.
Default Value: json
Sample Value: json
Name:
Accept
optional
Type:
header
Data Type:
string
Description:
Media type of the response
Default Value: application/xml
Sample Value: application/json
200
Returns a FHIR Bundle containing 0..* OperationOutcome resources and 0..* Location resources
400
This response code is returned when the query is invalid e.g. an invalid parameter or a partial token in the search.
curl -X GET "https://developer-solution/fhir/4.0/Location/?address=123 Main St, Suite 200, Anytown, CA, 12345, USA&name=University Medical Center, South Wing Neuro 1" \
-H 'Accept: application/json' \
-H 'Authorization: Basic bGV2ZWwxLnN5c19hOk9yaW9uc3k1IT8='
POST /fhir/4.0/Location/_search
Return all Location resources for the given search criteria, or all Locations if a search criteria is not specified. consumes:
Name
Type
Data Type
Description
Name:
Content-Type
required
Type:
header
Data Type:
string
Description:
Specifies how to encode the form data. The Content-Type value must be application/x-www-form-urlencoded
Sample Value: application/x-www-form-urlencoded
Name:
address
optional
Type:
formData
Data Type:
string
Description:
Filters the locations to those that match the specified address
Sample Value: 123 Main St, Suite 200, Anytown, CA, 12345, USA
Name:
address-city
optional
Type:
formData
Data Type:
string
Description:
Filters the locations to those that match the specified address-city
Sample Value: Sydney
Name:
address-country
optional
Type:
formData
Data Type:
string
Description:
Filters the locations to those that match the specified address-country
Sample Value: Australia
Name:
address-postalcode
optional
Type:
formData
Data Type:
string
Description:
Filters the locations to those that match the specified address-postal-code
Sample Value: 1466
Name:
address-state
optional
Type:
formData
Data Type:
string
Description:
Filters the locations to those that match the specified address-state
Sample Value: NSW
Name:
address-use
optional
Type:
formData
Data Type:
string
Description:
Filters the locations to those that match the specified address-use. Possible values are
Sample Value: home
Name:
endpoint
optional
Type:
formData
Data Type:
array
Description:
Filters the locations to those that match the specified endpoint references
Note: the endpoint
can be chained to define filters on the reference endpoint, each of the chained parameters can specify multiple comma separated values.
Sample Value: endpoint.name=Questionnaire Destination&endpoint.connection-type=http://terminology.hl7.org/CodeSystem/endpoint-connection-type|ihe-iid&endpoint.status=active
Name:
identifier
optional
Type:
formData
Data Type:
array
Description:
Filters the locations to those that match the specified identifier
Sample Value: http://hl7.org/fhir/sid/us-npi|1234567890
Name:
name
optional
Type:
formData
Data Type:
array
Description:
Filters the locations to those which their requested name is a portion of the location's name or alias
Sample Value: University Medical Center, South Wing Neuro 1
Name:
near
optional
Type:
formData
Data Type:
string
Description:
Filters the locations to those where the position is near or within a specified distance of the provided coordinates in the format [latitude]|[longitude]|[distance]|[units]
Sample Value: 42.361,-71.068,10
Name:
operational-status
optional
Type:
formData
Data Type:
array
Description:
Filters the locations to those that match the specified operational status
Sample Value: http://terminology.hl7.org/CodeSystem/v2-0116|C, http://terminology.hl7.org/CodeSystem/v2-0116|K
Name:
organization
optional
Type:
formData
Data Type:
array
Description:
Filters the locations to those where the managing Organization match the specified Organization references.
Note: the organization can be chained to define filters on the reference organization, each of the chained parameters can specify multiple comma separated values.
Sample Value: organization.name=South Wing Neuro 1&organization.address=123 Grafton Road Auckland&organization.type=http://terminology.hl7.org/CodeSystem/organization-type|prov
Name:
partof
optional
Type:
formData
Data Type:
array
Description:
Filters the location to those that are physically part of the specified Location references.
Note: partof
can be chained to define filter on the reference location, each of the chained location can specify multiple comma separated values.
Sample Value: partof=Location/shaO74NZR7CTOEKDLODIFSODJS4DLRWBEJ6XIO4PGOGJDCTSMCWVNSQ&partof.name=UK Pharmacies
Name:
status
optional
Type:
formData
Data Type:
string
Description:
Filters the locations to those that match the specified status. Possible values are
Sample Value: active
Name:
type
optional
Type:
formData
Data Type:
string
Description:
Filters the locations to those that match the specified function performed by the location
Sample Value: type=http://terminology.hl7.org/CodeSystem/v3-ServiceDeliveryLocationRoleType|HOSP
Name:
-include-sources
optional
Type:
formData
Data Type:
array
Description:
The -include-sources parameter defines which sources should be queried for the results.
Note: Either -include-sources
or -exclude-sources
parameter can be specified, not both. If -include-sources is specified, ONLY the specified sources will be searched. Note that the sources specified should be enabled.
Name:
-exclude-sources
optional
Type:
formData
Data Type:
array
Description:
The -exclude-sources parameter defines which sources should NOT be queried for the results.
Note: Either -include-sources
or -exclude-sources
parameter can be specified, not both. If -exclude-sources is specified, the specified sources will NOT be searched. Note that the sources specified should be enabled..
Name:
_format
optional
Type:
formData
Data Type:
string
Description:
Media type of the response. It takes precedence over the accept header.
Default Value: json
Sample Value: json
Name:
Accept
optional
Type:
header
Data Type:
string
Description:
Media type of the response
Default Value: application/xml
Sample Value: application/json
200
Returns a FHIR Bundle containing 0..* OperationOutcome resources and 0..* Location resources
400
This response code is returned when the query is invalid e.g. an invalid parameter or a partial token in the search.
curl -X POST "https://developer-solution/fhir/4.0/Location/_search" \
-H 'Accept: application/json' \
-H 'Authorization: Basic bGV2ZWwxLnN5c19hOk9yaW9uc3k1IT8=' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'address-state=NSW' \
-d 'identifier=http://hl7.org/fhir/sid/us-npi%7C1234567890'
GET /fhir/4.0/Location/{id}
This method returns the Location resource matching the requested resource ID.
Name
Type
Data Type
Description
Name:
id
required
Type:
path
Data Type:
string
Description:
The id of the Location resource to query for
Sample Value: shaTWIQUXLR7RLNCR45AMPETZEQYJ6UDN6OV43CD6JCRJJZE3OX6IJQ
200
Returns a Location resource matching the requested resource ID.
404
No Location resource found with the requested resource ID.
curl -X GET "https://developer-solution/fhir/4.0/Location/shaTWIQUXLR7RLNCR45AMPETZEQYJ6UDN6OV43CD6JCRJJZE3OX6IJQ" \
-H 'Accept: application/json' \
-H 'Authorization: Basic bGV2ZWwxLnN5c19hOk9yaW9uc3k1IT8='
GET /fhir/4.0/Location/{id}/_history
This method returns the change history for a Location resource matching the requested resource ID.
Name
Type
Data Type
Description
Name:
id
required
Type:
path
Data Type:
string
Description:
The id of the Location resource to query for
Sample Value: shaTZJPZBQMDLCHZG2ZFGLUSU2CUWV2JVI5ZUVHDTNJP6XQCVSJMKFA
Name:
_format
optional
Type:
query
Data Type:
string
Description:
Media type of the response. It takes precedence over the Accept header.
Possible values are json
and xml
. The default value is xml
.
Sample Value: json
Name:
Accept
optional
Type:
header
Data Type:
string
Description:
Media type of the response.
Possible values are application/json
and application/xml
. The default value is application/xml
.
Sample Value: application/xml
200
A FHIR Bundle containing 0..* Location resources matching the requested resource ID.
400
The source providing the Location resource is not capable of returning history of Location resources.
404
No Location resource found with the requested resource ID.
curl -X GET "https://developer-solution/fhir/4.0/Location/shaTZJPZBQMDLCHZG2ZFGLUSU2CUWV2JVI5ZUVHDTNJP6XQCVSJMKFA/_history" \
-H 'Accept: application/json' \
-H 'Authorization: Basic bGV2ZWwxLnN5c19hOk9yaW9uc3k1IT8='