Developer documentation‎ > ‎FHIR REST API‎ > ‎Resources‎ > ‎Patient‎ > ‎

Examples

Search for a Patient by NHS number

This example demonstrates how to search for a Patient resource based on their known NHS number.
  1. Generate an access token by following the OAuth2 walkthrough
  2. Confirm the NHS number of the patient you want to search for
    1. The example below assumes an NHS number of: 9999999999
  3. Make the call as detailed below, replacing the access token and NHS number with your own values
  4. The Patient resource will be returned in the search results
You might like to navigate to the patient's record in the web UI, in order to compare the data you can see with the data returned from the FHIR API.

ExampleDetails
Relative URL/Patient
Sandbox example 
Absolute URLhttps://sandbox.patientsknowbest.com/fhir/Patient?identifier=https://fhir.nhs.uk/Id/nhs-number|9999999999
curlcurl -X GET --header "Accept: application/fhir+json" --header "Authorization: Bearer your access token" "https://sandbox.patientsknowbest.com/fhir/Patient?identifier=https://fhir.nhs.uk/Id/nhs-number|9999999999"

Retrieve information by Patient ID

This example demonstrates how to retrieve the Patient resource for a known ID.
  1. Generate an access token by following the OAuth2 walkthrough
  2. Confirm the patient's ID. For example, by searching by NHS number as in the example above.
    1. The example assumes a Patient ID of: 00000000-0000-0000-0000-000000000000
  3. Make the call as detailed below, replacing the patient ID with your own value.
  4. The Patient resource will be returned

ExampleDetails
Relative URL/Patient/<ID>
Sandbox example 
Absolute URLhttps://sandbox.patientsknowbest.com/fhir/Patient/00000000-0000-0000-0000-000000000000
curlcurl -X GET --header "Accept: application/fhir+json" --header "Authorization: Bearer your access token" "https://sandbox.patientsknowbest.com/fhir/Patient/00000000-0000-0000-0000-000000000000"


Comments