Examples

Check whether a specific document has been read

This example demonstrates how to check whether a single, specific document has been read.
  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 ID of the Organization
    1. The example below assumes you have an ID of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314
  3. Confirm the identifier of the document
    1. The example below assumes an identifier of: 97a25402-622b-47e0-b650-bbbd08de4daf
  4. Make the call as detailed below, replacing the access token, organisation ID and document ID with your own values
  5. The read indicator will be returned

Example request

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

ExampleDetails
Absolute URLhttps://sandbox.patientsknowbest.com/fhir/DocumentReference/$read-receipt-query
curlcurl -X POST --header "Accept: application/fhir+json" --header "Content-Type: application/fhir+json" --header "Authorization: Bearer aaaaa-bbbbb" --header "X-Org-Public-Id: 235a397b-1ae8-4755-9c77-1a0e2fbc5314" "https://sandbox.patientsknowbest.com/fhir/DocumentReference/$read-receipt-query" --data  "{ \"resourceType\": \"Parameters\", \"parameter\": [ { \"name\": \"documentIdentifier\", \"valueString\": \"97a25402-622b-47e0-b650-bbbd08de4daf\"  } ] }"

Note: whilst every effort has been made to ensure that the examples are correct and useful, they do not form part of the official specification.
{ "resourceType": "Parameters", "parameter": [ { "name": "documentIdentifier", "valueString": "97a25402-622b-47e0-b650-bbbd08de4daf" } ] }

Example response

Note: whilst every effort has been made to ensure that the examples are correct and useful, they do not form part of the official specification.
{ "resourceType" : "Parameters", "parameter" : [ { "name" : "read_receipt", "part" : [ { "name" : "documentIdentifier", "valueString" : "97a25402-622b-47e0-b650-bbbd08de4daf" }, { "name" : "read", "valueBoolean" : true } ] } ] }

Comments