Read Receipts: Search for DocumentReference resources sent by your organisation, on a given date, which have been read by the patient

This example demonstrates how to determine which of your documents have been read by the patient.

This can be achieved by providing your organisation reference, the date of interest, and a status of "READ" as input parameters to the DocumentReference type search.

    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 Organization reference of your own organisation

      1. The example below assumes a reference of: Organization/235a397b-1ae8-4755-9c77-1a0e2fbc5314

    1. Confirm the date of interest

      1. The example below assumes a date of: 2018-08-01

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

    2. The matching DocumentReference 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/DocumentReference?source-organisation=Organization/235a397b-1ae8-4755-9c77-1a0e2fbc5314&indexed=2018-08-01&document-status=http://fhir.patientsknowbest.com/codesystem/document-status|READ"