Search for laboratory results, returning at most 1 per dayThis example demonstrates how to query for laboratory results for a specific patient, within a given date range, returning at most 1 resource per day. - Generate an access token by following the OAuth2 walkthrough
- The example below assumes you have been granted an access token of: aaaaa-bbbbb
- Confirm the Patient reference of the Patient you are interested in
- The example below assumes a reference of: Patient/00000000-0000-0000-0000-000000000000
- Confirm the start of the date range you are interested in, and whether the date is inclusive (ge) or exclusive (gt)
- The example below assumes a start date of: ge2018-01-01
- Confirm the end of the date range you are interested in, and whether the date is inclusive (le) or exclusive (lt)
- The example below assumes an end date of: le2018-12-31
- Make the call as detailed below, replacing the access token and search parameters with your own values
- The matching Consent resources will be returned in the search results
Example | Details | Relative URL | /Observation/$group | Sandbox example | | Absolute URL | https://sandbox.patientsknowbest.com/fhir/Observation/$group?category=http://fhir.patientsknowbest.com/codesystem/observation-category|LABORATORY&patient=Patient/00000000-0000-0000-0000-000000000000&date=ge2018-01-01&date=le2018-12-31 | curl | curl -X GET --header "Accept: application/fhir+json" --header "Authorization: Bearer aaaaa-bbbbb" "https://sandbox.patientsknowbest.com/fhir/Observation/$group?category=http://fhir.patientsknowbest.com/codesystem/observation-category|LABORATORY&patient=Patient/00000000-0000-0000-0000-000000000000&date=ge2018-01-01&date=le2018-12-31" |
|