Example ServiceRequest resource

This page contains the JSON for a ServiceRequest resource, generated when a GAD7 questionnaire was sent to a patient using the advanced questionnaires feature. This page is intended as a guide for how to read a ServiceRequest resource generated by the advanced questionnaires feature and to define various fields within the ServiceRequest.

ServiceRequest resources cannot be directly retrieved from PKB using the ServiceRequest endpoint. Instead, they can be retrieved using the _include search parameter when performing a search on the QuestionnaireResponse endpoint.

JSON

{ "resourceType": "ServiceRequest", "id": "25c6b07b-ceac-4492-8dbf-5f1b4beb8f6f", "meta": { "extension": [ { "url": "ex:createdAt", "valueInstant": "2024-12-09T10:47:50.538722Z" } ], "versionId": "17173", "lastUpdated": "2024-12-09T10:47:50.538722Z", "security": [ { "system": "http://fhir.patientsknowbest.com/codesystem/privacy-label", "code": "NOT_SET" }, { "system": "http://fhir.patientsknowbest.com/codesystem/source-organization", "code": "73c1f864-e111-4dda-a7b7-fa366b440330", "display": "AQS source org requester" } ] }, "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/servicerequest-questionnaireRequest", "valueReference": { "reference": "Questionnaire/2becaa96-8d4c-4ea4-84b8-6b41edba854a", "display": "GAD-7" } }, { "url": "http://fhir.patientsknowbest.com/structuredefinition/amendable-by", "valueCode": "patient" }, { "url": "http://fhir.patientsknowbest.com/structuredefinition/amendable-by", "valueCode": "practitioner" } ], "identifier": [ { "system": "http://hl7.org/fhir/R4/questionnaire", "value": "2becaa96-8d4c-4ea4-84b8-6b41edba854a" } ], "status": "active", "intent": "order", "code": { "text": "Questionnaire" }, "subject": { "reference": "Patient/6935a405-efdc-4e4f-b330-862bcf0ae36a" }, "authoredOn": "2024-12-09T10:47:50+00:00", "requester": { "reference": "Organization/dc67926b-4545-44b1-ab95-e487c6ab431b" }, "performer": [ { "extension": [ { "url": "http://fhir.patientsknowbest.com/structuredefinition/questionnaire-requester", "valueString": "questionnaire-requester" } ], "reference": "Practitioner/34b0d352-712f-4d16-a442-1bf3238ede8d" } ] }

ServiceRequest field definitions

The above ServiceRequest resource is in JSON format and adheres to the FHIR R4 standard. The FHIR ServiceRequest resource spec can be found here. Key information it contains includes:

Field

Description

Reference to other resource

Notes

Field

Description

Reference to other resource

Notes

id

Logical ID for the ServiceRequest

 

 

meta.security

Contains privacy label

 

Privacy label determines which users can see the questionnaire request in the UI. It is set using the default privacy label of the team in requester.

questionnaireRequest extension

Extension containing the id and title of the Questionnaire resource being sent

 

 

amendable-by extension

Extension representing which users can amend the questionnaire once it has been submitted.

 

Can be “patient” or “practitioner” (or neither or both).

This is configured using the amendableBy parameter on the $send-questionnaire-request operation

identifier

The logical ID of the Questionnaire resource being sent

Facilitates a chained search which allows users to search for QuestionnaireResponse resources that relate to a specific Questionnaire.

status

The status of the ServiceRequest

 

This does not currently get updated and therefore will always be “active”

intent

The nature of the service being requested

 

Always set to “order” for advanced questionnaire ServiceRequests

code

A code that represents the service being requested

 

Always set to “Questionnaire” for advanced questionnaire ServiceRequests

authoredOn

The date and time that the ServiceRequest was generated

 

 

requester

The Organization that sent the questionnaire request

Organization

Set to the team whose ID is used in the $send-questionnaire-request API call

performer

The individual/organization that initiated the questionnaire

Organization

Practitioner

Patient*

The actor that initiated the questionnaire.

For questionnaires sent using the $send-questionnaire-request, this references the same Organization as the requester field.

For questionnaires sent via the UI, this references the Practitioner who sent the questionnaire request.

For patient initiated questionnaires (once this functionality is released), this will reference the Patient resource.