Profiles & Operations > Operation: Retrieve Location
Retrieve Location
Location Read is a simple RESTful interactions. It aligns with the generic RESTful read operation defined in the FHIR core specification. It supports retrieving a single Location instance by their RESTful resource id.In this implementation, the resource id refers to provider Location EPID in PPR.
Scope
This transaction involves a request by a FHIR Provider RESTful Client for the identification, naming, licensing and contact information associated with a single Location record, identified by the target server's record id for that Location. The request is received by the FHIR Provider RESTful Server which returns the requested record.
For example, an immunization or medication record provides a FHIR "reference" pointing to the Provincial Provider Registry "id" for a particular Location. To look up information about the referenced Location, the EMR uses the read operation to retrieve the Location's contact and other information from the registry.
Interaction Diagrams
The following diagram illustrates the high level interaction between a FHIR Provider RESTful Client and FHIR Provider RESTful Server. The Provider transaction will use the following queries and responses:
- Read Location / Read Location Response
Actor: FHIR Provider RESTful Client
Role: Requests a demographic details for a single Location based on a known resource id from the FHIR Provider RESTful Server. The FHIR Provider RESTful Client populates its local store with information received from the FHIR Provider RESTful Server
Actor: FHIR Provider RESTful Server
Role: Returns demographic information for the single Location corresponding to the resource id specified by the FHIR Provider RESTful Client.
NOTE: In this implementation guide, Provincial Provider Registry is the FHIR Provider RESTful Server. All subsequent references of this actor should be interpreted as Provincial Provider Registry.
Specification
This FHIR spec is based on the HL7 R4 Read operation. It makes use of the following resources:
Provider Location Read Request
GET [base]/Location/EPID(Logical ID)
Provider Location Read Response
General
The PPR FHIR profiles are developed to constrain value sets and cardinality of data elements in the resources listed above. Since FHIR R4 does not support all the data elements required for this project, we have introduced a few extensions which can be found here.
Extensions
The PPR FHIR profiles are developed to constrain value sets and cardinality of data elements in the resources listed above. Since FHIR R4 does not support all the data elements required for this project, we have introduced a few extensions which can be found here.
Extensions
Summary of Supported Operations
The table below shows the allowed transactions for each profile and how they support FHIR endpoints, resources and their corresponding HTTP operations:
Resource | Transaction | HTTP Operations | URL | Request Body Resource | Response Body Resource |
---|---|---|---|---|---|
Location | Search | GET | [base]/Location? | N/A | Location |
The interaction summary table below lists the HTTP status codes that may be returned for the query.
Interaction | Content-Type | Body | Location | Versioning | Status Codes | Comments |
---|---|---|---|---|---|---|
read (Location) | R | R: Location | N/A | N/A | 200,400,404,422,500 |
Location Read Operations
This represents an HTTP GET specifying the id of a single Location instance from the FHIR Provider RESTful Client to retrieve the resource from the FHIR Provider RESTful Server.
Trigger Event
When a FHIR Provider RESTful Client has the server's "id" for an Location but does not yet have the name, contact, license and other information or wishes to retrieve an updated version of the Location's information, it invokes an Location read.
Expected Behaviour
The FHIR Provider RESTful Server shall return the records that correspond to the "id" provided by the FHIR Provider RESTful Client. The FHIR Provider RESTful Server shall respond synchronously (i.e. on the same connection as was used to initiate the request).
See Response Handling page for additional response handling behaviour.
Legend |
---|
code = OperationOutcome.issue.code |
severity = OperationOutcome.issue.severity |
details.coding.code=OperationOutcome.issue.details.coding.code |
details.coding.display=OperationOutcome.issue.details.coding.display |
details.text = OperationOutcome.issue.details.coding.text |
HTTP Status | Scenario Description | severity | code | details.coding.code | details.coding.display | details.text |
---|---|---|---|---|---|---|
200 OK | The PHSD finds in its information source, a location whose id (location.id) matches the id specified by the FHIR Client Application | HTTP 200 | OK. Returns a Location resources that match the requested id | |||
404 Not Found | The PPR cannot find a Location whose EPID matches the id specified by the FHIR Client Application. | error | not-found | |||
400 Bad Request | Missing security token | error | required | Missing required security token: PIN | ||
400 Bad Request | POST operation contains incorrect header value for "Content-Type" - should be "application/fhir+json" | error | invalid | |||
400 Bad Request | When there was syntactical error such as a missing or invalid header, a missing or invalid URL parameter, a request body that can't be parsed or doesn't conform to the basic FHIR JSON/XML syntax rules, etc. Returns an OperationOutcome resource indicating an issue. The client must fix the request and try again. | error | invalid | Will vary depending on the error | ||
401 Unauthorized | Failed authentication | error | security | Authorization is required for the interaction that was attempted | ||
406 Not Acceptable | The Accept header requested a format that the server does not support | error | not-supported | |||
422 Unprocessible Entity | FHIR validation errors such as invalid code, wrong date format, or violation of LOB defined business rules | Will vary depending on the error | Will vary depending on the error | OH-defined error code | OH-defined errror message | |
429 Too Many Requests | Rate Limit | error | throttled | Too Many Requests | ||
500 Internal Server Error | PHSD API validates the request but cannot return a valid response due to internal issues. | fatal | exception | Internal Error | ||
503 Service Unavailable | Indicates that the services has been temporarily taken down (on purpose) | |||||
504 Gateway Timeout | Downstream system(s) did not return timely response | error | timeout |
Examples
Location read request :
Examples of Location Read request can be found below
GET [base]/Location/67890
Location search response):
Examples of a Location read response can be found below
Example of Operation Outcome