Search for laboratory results for a specific Patient

This example demonstrates how search for laboratory results for a specific Patient.

Since laboratory results are mapped to Observation resources with a PKB category of LABORATORY, this can be achieved by searching the Observation type.

    1. Generate an access token by following the OAuth 2.0 walkthrough

      1. The example below assumes you have been granted an access token of: aaaaa-bbbbb

    2. Confirm the Patient reference of the desired Patient

      1. The example below assumes a reference of: Patient/3d8afd18-0844-459a-b3c2-355d02e54c0a

    1. Make the call as detailed below, replacing the access token and search parameters with your own values

    2. The matching Observation resources will be returned in the search results

Example request

This example is written for sandbox.patientsknowbest.com; replace the URL as needed if you are connecting to a different environment.

curl -X GET --header "Accept: application/fhir+json" --header "Authorization: Bearer aaaaa-bbbbb" "https://sandbox.patientsknowbest.com/fhir/Observation?category=http://fhir.patientsknowbest.com/codesystem/observation-category|LABORATORY&patient=Patient/3d8afd18-0844-459a-b3c2-355d02e54c0a"