...
X-Org-Public-ID is no longer required as a header. This has been replaced by x-team-id
QuestionnaireResponse search parameters
...
The QuestionnaireResponse endpoint does not currently support search parameters. We expect to implement the following search parameters in March 2024:
...
Code Block |
---|
GET https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/QuestionnaireResponse?_subject:Patient.identifier=PATIENT_ID |
The PATIENT_ID in the above example is the patient’s PKB public ID. The above search will return QuestionnaireResponses for the patient with this PKB public ID.
Note: The subject field only represents the patient that the questionnaire was sent to, not the patient that completed the answers. The source field represents the individual that answered the questions. At the moment, source and subject will always be the same. In the future, we will support carers completing questionnaires on behalf of patients. When this happens, the source and subject may be different.
Coming soon: Searching for a QuestionnaireResponse
...
using a subject’s national ID
Organisations that use national IDs (e.g. NHS numbers) to send questionnaires to patients may benefit from searching for QuestionnaireResponses using a patient’s NHS number:
Code Block |
---|
GET https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/QuestionnaireResponse?subject:Patient.identifier=NHS_NUMBER |
Searching for a QuestionnaireResponse based on date
The authored field on a QuestionnaireResponse represents the date and time that the answers were provided. To search for all QuestionnaireResponse resources for your team from a particular day, include the authored search parameter in your API call to the QuestionnaireResponse endpoint:
Code Block |
---|
GET https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/QuestionnaireResponse?_authored=2024-03-152024-01-01 |
The above API call will return QuestionnaireResponses that were completed on 1st January 2024.
Searching for a QuestionnaireResponse based on questionnaire
...
Code Block |
---|
GET https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/QuestionnaireResponse?_basedOn:ServiceRequest.identifier=QUESTIONNAIRE_ID |
QUESTIONNAIRE_ID in the above example is the ID of the questionnaire that is used in the API call to $send-questionnaire-request. The above API call will return QuestionnaireResponses that relate to the questionnaire with this ID.
Note: In previous versions of FHIR, the questionnaire field on a QuestionnaireResponse contained a direct reference to the Questionnaire resource that was sent to the patient. However, this questionnaire field has been replaced in FHIR R4 with a canonical reference, meaning it cannot be used in searches. This is the reason that a chained search on the ServiceRequest is now required.
...
Code Block |
---|
GET https://aggregated-fhir.sandbox.patientsknowbest.com/fhir/QuestionnaireResponse?_status=completed |
The above API call will return QuestionnaireResponses that have a status of ‘completed’.