...
Code Block |
---|
{ "resourceType": "Bundle", "id": "6d7847cc-408d-48db-9c3e-6bc847058d13", "meta": { "lastUpdated": "2019-08-27T10:48:35.114+00:00" }, "type": "searchset", "total": 1, "link": [ { "relation": "self", "url": "/QuestionnaireResponse?questionnaire=Questionnaire/f1a841f1-6f3a-43fc-830f-e1417b4ff13d&patient=Patient/3d8afd18-0844-459a-b3c2-355d02e54c0a" } ], "entry": [ { "fullUrl": "https://sandbox.patientsknowbest.com/fhir/QuestionnaireResponse/9badcf07-1357-45c0-9520-52e3b13ddee5", "resource": { "resourceType": "QuestionnaireResponse", "id": "9badcf07-1357-45c0-9520-52e3b13ddee5", "meta": { "lastUpdated": "2019-06-10T11:12:13.123Z", "security": [ { "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label", "code": "GENERAL_HEALTH" } ] }, "questionnaire": { "reference": "Questionnaire/f1a841f1-6f3a-43fc-830f-e1417b4ff13d", "display": "IBD Control PROM" }, "subject": { "reference": "Patient/3d8afd18-0844-459a-b3c2-355d02e54c0a", "display": "Mr Test Patient" }, "authored": "2019-06-10T11:12:13.123Z", "item": [ { "linkId": "2", "text": "a. Your IBD has been well controlled in the past two weeks?", "answer": [ { "valueString": "Yes" } ] }, { "linkId": "3", "text": "b. Your current treatment is useful in controlling your IBD?", "answer": [ { "valueString": "Yes" } ] }, { "linkId": "4", "text": "(if you are not taking any treatment, please tick this box)", "answer": [ { "valueString": "Not taking any treatment" } ] }, { "linkId": "5", "text": "2. Over the past 2 weeks, have your bowel symptoms been getting worse, getting better or not changed?", "answer": [ { "valueString": "Better" } ] }, { "linkId": "7", "text": "a. Miss any planned activities because of IBD? (e.g. attending school/college, going to work or a social event)", "answer": [ { "valueString": "Yes" } ] }, { "linkId": "8", "text": "b. Wake up at night because of symptoms of IBD?", "answer": [ { "valueString": "Yes" } ] }, { "linkId": "9", "text": "c. Suffer from significant pain or discomfort?", "answer": [ { "valueString": "Yes" } ] }, { "linkId": "10", "text": "d. Often feel lacking in energy (fatigued) (by ‘often’ we mean more than half of the time)", "answer": [ { "valueString": "Yes" } ] }, { "linkId": "11", "text": "e. Feel anxious or depressed because of your IBD?", "answer": [ { "valueString": "Yes" } ] }, { "linkId": "12", "text": "f. Think you needed a change to your treatment?", "answer": [ { "valueString": "Yes" } ] }, { "linkId": "14", "text": "a. Alternative types of drug for controlling IBD", "answer": [ { "valueString": "Yes" } ] }, { "linkId": "15", "text": "b. Ways to adjust your own treatment", "answer": [ { "valueString": "Yes" } ] }, { "linkId": "16", "text": "c. Side effects or difficulties with using your medicines", "answer": [ { "valueString": "Yes" } ] }, { "linkId": "17", "text": "d. New symptoms that have developed since your last visit", "answer": [ { "valueString": "Yes" } ] }, { "linkId": "18", "text": "5 How would you rate the OVERALL control of your IBD in the past two weeks?", "answer": [ { "valueString": "0- Worst possible control" } ] } ] }, "search": { "mode": "match" } } ] } |
Search for questionnaire responses matching a specific procedure request business identifier as a System client
This example demonstrates how to find responses to a specific questionnaire, completed by a specific patient.
Generate an access token by following the OAuth 2.0 walkthrough
The example below assumes you have been granted an access token of: eyJhbGxxxx
Confirm the ID of the Organisation whose questionnaires you are fetching
The example below assumes you have an ID of: 235a397b-1ae8-4755-9c77-1a0e2fbc5314
Confirm the Procedure Request business identifier
The example below assumes you have the following business identifier:
system: https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/ServiceRequest
value: 294672281
Make the call as detailed below, replacing the access token and search parameters with your own values
The matching QuestionnaireResponse resources will be returned, as well as the ProcedureRequest resources they were based on
Example request
This example is written for http://sandbox.patientsknowbest.com ; replace the URL as needed if you are connecting to a different environment. Note the ‘%7C’ string between the business identifier system and value, it is the html-encoded value of a '|' character.
curl -X GET --header "Accept: application/fhir+json" --header "Authorization: Bearer eyJhbGxxxx" --header "X-Org-Public-Id: 235a397b-1ae8-4755-9c77-1a0e2fbc5314" "https://sandbox.patientsknowbest.com/fhir/QuestionnaireResponse?based-on:ProcedureRequest.identifier=https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/ServiceRequest%7C294672281&_include=QuestionnaireResponse:basedOn:ProcedureRequest"