FHIR Patient

Base Path: /fhir/3.0/Patient

Version: 1.0.0

The FHIR Patient API allows you to look up a patient's demographics and other administrative information. The endpoint provides the ability to:

  • Retrieve all Patient resources that match a search criteria.
  • Retrieve a specific Patient resource based on its resource ID.

To learn more about using this API in your application you can view our guide on working with the FHIR Patient API.

The data returned in this API is subject to privacy and permissions settings, refer to the Working with Privacy guide to learn how this might affect your application.

This API is based on the STU3 release of the FHIR standard, for more information on this API refer to the official FHIR documentation.

Authorization: OAuth 2.0 Bearer token is required to access the resources of this API. Once signed up, credentials and URL to access the OAuth API can be found on My Apps Page.


Methods

Search for a Patient

GET /fhir/3.0/Patient/

This method returns demographics and other administrative information for patients that match the supplied search criteria. Patient searches may be performed by supplying a combination of the following minimum criteria. Either:

  • Identifier
  • Or, Family name and one (or more) of the following:
    • Given name
    • Date of birth
    • Gender

When searching for patients with names with diacritics, you need to perform the search with HTTP Header "Content-Type: charset=utf-8".


Parameters

Name

Type

Data Type

Description


Name:

identifier

optional

Type:

query

Data Type:

string

Description:

The identifier for the patient which consists of patient identifier namespace (also known as the system) and identifier, separated using a URL encoded | character i.e. %7c.


Sample Value: ORION|AAAA-0124-8



Name:

family

optional

Type:

query

Data Type:

string

Description:

The family name (last name) of the patient.


Sample Value: dodgson



Name:

given

optional

Type:

query

Data Type:

string

Description:

Filters the results to patients with a matching given name (first name)


Sample Value: charles



Name:

birthdate

optional

Type:

query

Data Type:

string

Description:

Filters the results to patients with a matching date of birth. The format of the birthdate value is yyyy-mm-dd


Sample Value: 1940-03-18



Name:

gender

optional

Type:

query

Data Type:

string

Description:

Filters the results to patients of a given gender. Possible values are

  • male
  • female
  • other
  • unknown


Sample Value: male


Responses


application/json+fhir

200

Returns a FHIR Bundle containing 0..* OperationOutcome resources and 0..* Patient resources


application/json+fhir

400

This code is returned when the query contains one or more invalid parameters, e.g using an incorrectly formatted patient birth date.

Sample Requests

Search by Identifier
curl -X GET "https://api.orionhealth.io/fhir/3.0/Patient/?identifier=ORION%7CAAAA-0124-8" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'
Search by Demographics
curl -X GET "https://api.orionhealth.io/fhir/3.0/Patient/?family=dodgson&given=charles&birthdate=1940-03-18&gender=male" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'

Search for a Patient

POST /fhir/3.0/Patient/_search

This method returns demographics and other administrative information for patients that match the supplied search criteria. Patient searches may be performed by supplying a combination of the following minimum criteria. Either:

  • Identifier
  • Or, Family name and one (or more) of the following:
    • Given name
    • Date of birth
    • Gender

When searching for patients with names with diacritics, you need to perform the search with HTTP Header "Content-Type: charset=utf-8".


Parameters

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:

identifier

optional

Type:

formData

Data Type:

string

Description:

The identifier for the patient which consists of patient identifier namespace (also known as the system) and identifier, separated using a URL encoded | character i.e. %7c.


Sample Value: ORION|AAAA-0124-8



Name:

family

optional

Type:

formData

Data Type:

string

Description:

The family name (last name) of the patient.


Sample Value: dodgson



Name:

given

optional

Type:

formData

Data Type:

string

Description:

Filters the results to patients with a matching given name (first name)


Sample Value: charles



Name:

birthdate

optional

Type:

formData

Data Type:

string

Description:

Filters the results to patients with a matching date of birth. The format of the birthdate value is yyyy-mm-dd


Sample Value: 1940-03-18



Name:

gender

optional

Type:

formData

Data Type:

string

Description:

Filters the results to patients of a given gender. Possible values are

  • male
  • female
  • other
  • unknown


Sample Value: male


Responses


application/json+fhir

200

Returns a FHIR Bundle containing 0..* OperationOutcome resources and 0..* Patient resources


application/json+fhir

400

This code is returned when the query contains one or more invalid parameters, e.g using an incorrectly formatted patient birth date.

Sample Requests

Search by Identifier
curl -X POST "https://api.orionhealth.io/fhir/3.0/Patient/_search" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'identifier=ORION%7CAAAA-0124-8'
Search by Demographics
curl -X POST "https://api.orionhealth.io/fhir/3.0/Patient/_search" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'family=dodgson' \
-d 'given=charles' \
-d 'birthdate=1940-03-18' \
-d 'gender=male'

Retrieve a single Patient

GET /fhir/3.0/Patient/{id}

This method returns the Patient resource matching the requested resource ID.


Parameters

Name

Type

Data Type

Description


Name:

id

required

Type:

path

Data Type:

string

Description:

The id of the Patient resource


Sample Value: IFAUCQJNGAYTENBNHBAE6USJJ5HA


Responses


application/json+fhir

200

Returns a Patient resource matching the requested resource ID.


application/json+fhir

400

This code is returned when the FHIR ID is empty or not valid.


application/json+fhir

404

No Patient resource found with the requested resource ID.

Sample Request

curl -X GET "https://api.orionhealth.io/fhir/3.0/Patient/IFAUCQJNGAYTENBNHBAE6USJJ5HA" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'