FHIR API: Patient Read
Pre-requisites
Resource:
GET /partners/fhir/stu3/api/Patient/{id}
Authentication:
Endpoint is secured with mutual TLS. More information can be found here: API Authentication
API Request
Request Parameters
Name | Description | Type | Required | Example |
---|---|---|---|---|
id | Patient logical ID (FHIR ID). Note: patient.id |
String | Yes | Bj6.1Lq-hvb-28 |
Request Headers
Name | Description | Type | Required | Example |
---|---|---|---|---|
org_id | Organization OID | String | Yes | 2.16.724.4.2 |
client_id | Public identifier for organizations generated by Roche DC | String | Yes | 1234567890 |
client_secret | Client related secret known only to the EMR and Roche DC | String | Yes | 1234567890 |
Content-Type | json or fhir+json | String | Yes | application/json or application/fhir+json |
Request Example
curl --location --request GET 'https://api-services-eu.rochedcplatform.com/partners/fhir/stu3/api/Patient/Bj6.1Lq-hvb-28' \ --header 'client_id: e63ab70a4fea4034bcf50b5ecfdb2994' \ --header 'client_secret: CaC74B40140D4a0280478E4188682241' \ --header 'Content-Type: application/fhir+json' \ --header 'org_id: 2.16.724.4.2'
API Response
API code response
HTTP Response Code | Description | Response Body | FHIR error code | FHIR error code description |
---|---|---|---|---|
200 | Patient demographic information retrieved | Patient | NA | NA |
400 | Request failed because of incorrect parameters, returns no data | OperationOutcome | not-supported | FHIR id missing in the request |
403 | Not Authorized, organization id not valid | Empty | forbidden | The user does not have the rights to perform this action |
403 | Not Authorized. Missing/invalid parameters in header parameters. | Empty | NA | Validation policy error: ClientID enforcement error |
404 | Patient Not Found | OperationOutcome | not-found | Patient Not Found |
500 | Request failed with internal exception | OperationOutcome | exception | Internal server error. |
API Payload response
Successful response object:
{ "resourceType": "Patient", "id": "Bj6.1Lq-hvb-28", "language": "en", "identifier": [ { "system": "urn:oid:2.16.724.4.41", "value": "12345678Z" } ], "name": [ { "family": "Doe", "given": [ "John" ] } ], "telecom": [ { "system": "phone", "value": "123456789" }, { "system": "email", "value": "johndoe123@email.com" } ], "gender": "male", "birthDate": "1991-01-01" }
Error response object:
As an example, if the FHIR ID was not created in the context of the organization id, a 404 HTTP error status code will be received together the following rersponse body:
{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "not-found", "diagnostics": "Patient Not Found" } ] }