QuestionnaireResponse
Overview
The QuestionnaireResponse resource is a collection of answers to a given questionnaire typically used to request patient healthcare information. A given QuestionnaireResponse must belong to a corresponding Questionnaire. An example of a questionnaire is a form used to collect a patient’s social history. Currently, only social history is supported. The resource should be leveraged as a snapshot in time and new data should be consistently retrieved through the API rather than stored within an application.
The following fields are returned if valued:
Terminology Bindings
QuestionnaireResponse.answer.valueCoding |
|
Extensions
Custom Extensions
URLs for custom extensions are defined as https://fhir-ehr.cerner.com/r4/StructureDefinition/{id}
ID | Value[x] Type | Description |
---|---|---|
is-modifiable |
Boolean |
Indication of whether data is modifiable or not. Only present when false. |
choice-answer |
Boolean |
Indicates answers come from a list of options. |
note |
Annotation |
Additional details about a given QuestionnaireResponse group item. Includes author and date/time information. |
Search
Search for QuestionnaireResponses that meet supplied query parameters:
GET /QuestionnaireResponse?:parameters
Implementation Notes
- QuestionnaireResponses are sometimes system generated without any answers. These may be updated with the correct responses at any time.
Authorization Types
Parameters
Name | Required? | Type | Description |
---|---|---|---|
_id |
This or patient
|
token |
The logical resource id associated with the resource. |
patient |
This or _id
|
reference |
The subject (Patient) that the questionnaire response is about. Example: patient=12345
|
Headers
Accept: application/json+fhir
Authorization: <OAuth2 Bearer Token>
Example
Request
GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/QuestionnaireResponse?_id=SH-12508041
Response
Status: 200 OK
{
"resourceType": "Bundle",
"id": "902e1b49-b9c4-4786-b90b-c9612d478f2a",
"type": "searchset",
"link": [
{
"relation": "self",
"url": "https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/QuestionnaireResponse?_id=SH-12508041"
}
],
"entry": [
{
"fullUrl": "https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/QuestionnaireResponse/SH-12508041",
"resource": {
"resourceType": "QuestionnaireResponse",
"id": "SH-12508041",
"questionnaire": "https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Questionnaire/SH-12508041",
"status": "in-progress",
"subject": {
"reference": "Patient/12508041"
},
"authored": "2019-10-25T14:57:43Z",
"item": [
{
"id": "111",
"linkId": "93",
"text": "Tobacco",
"extension": [
{
"url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/note",
"valueAnnotation": {
"authorReference": {
"reference": "Practitioner/109413936",
"display": "Lombardi, Falco Shine"
},
"time": "2021-06-15T22:15:26.000Z",
"text": "category/group comment"
}
}
],
"item": [
{
"linkId": "93-123",
"text": "Number of years:",
"answer": [
{
"valueQuantity": {
"value": "20",
"unit": "year (iso1000)",
"system": "http://unitsofmeasure.org",
"code": "a"
}
}
]
},
{
"linkId": "93-456",
"text": "Tobacco use per day:",
"answer": [
{
"valueString": "Answer text"
}
]
},
{
"linkId": "93-789",
"text": "Ready to change:",
"extension": [
{
"url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/choice-answer",
"valueBoolean": true
}
],
"answer": [
{
"valueCoding": {
"system": "https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/nomenclature",
"code": "960439",
"display": "Yes"
}
},
{
"valueString": "Other answer text"
}
]
}
]
}
]
}
}
]
}
Note: The examples provided here are non-normative and replaying them in the public sandbox is not guaranteed to yield the results shown on the site.
Retrieve by id
List an individual QuestionnaireResponse by its id:
GET /QuestionnaireResponse/:id
Implementation Notes
- QuestionnaireResponses are sometimes system generated without any answers. These may be updated with the correct responses at any time.
Authorization Types
Headers
Accept: application/fhir+json
Authorization: <OAuth2 Bearer Token>
Example
Request
GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/QuestionnaireResponse/SH-12508041
Response
Status: 200 OK
{
"resourceType": "QuestionnaireResponse",
"id": "SH-12508041",
"questionnaire": "https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Questionnaire/SH-12508041",
"status": "in-progress",
"subject": {
"reference": "Patient/12508041"
},
"authored": "2019-10-25T14:57:43Z",
"item": [
{
"id": "111",
"linkId": "93",
"text": "Tobacco",
"extension": [
{
"url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/note",
"valueAnnotation": {
"authorReference": {
"reference": "Practitioner/109413936",
"display": "Lombardi, Falco Shine"
},
"time": "2021-06-15T22:15:26.000Z",
"text": "category/group comment"
}
}
],
"item": [
{
"linkId": "93-123",
"text": "Number of years:",
"answer": [
{
"valueQuantity": {
"value": "20",
"unit": "year (iso1000)",
"system": "http://unitsofmeasure.org",
"code": "a"
}
}
]
},
{
"linkId": "93-456",
"text": "Tobacco use per day:",
"answer": [
{
"valueString": "Answer text"
}
]
},
{
"linkId": "93-789",
"text": "Ready to change:",
"extension": [
{
"url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/choice-answer",
"valueBoolean": true
}
],
"answer": [
{
"valueCoding": {
"system": "https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/nomenclature",
"code": "960439",
"display": "Yes"
}
},
{
"valueString": "Other answer text"
}
]
}
]
}
]
}
Note: The examples provided here are non-normative and replaying them in the public sandbox is not guaranteed to yield the results shown on the site.
Errors
The common errors and OperationOutcomes may be returned.
Update
Update an QuestionnaireResponse.
PUT /QuestionnaireResponse/:id
Implementation Notes
- When an item is returned with the is-modifiable extension as false, that item cannot be updated unless the update is passed in without an id.
- An update should only be performed directly after a QuestionnaireResponse is retrieved. If an item.id is provided from the get operation, it MUST be provided on the subsequent update and must match the item.id returned from the get.
Authorization Types
Headers
Authorization: <OAuth2 Bearer Token>
Content-Type: application/fhir+json
Body fields
Name | Required | Type | |
---|---|---|---|
resourceType
|
Yes |
string |
|
|
|||
id
|
Yes |
id |
|
|
|||
questionnaire
|
Yes |
Questionnaire |
|
|
|||
status
|
Yes |
code |
|
|
|||
subject
|
Yes |
Reference |
|
|
|||
item
|
Yes |
List of BackboneElement |
|
|
|||
item.id
|
No |
string |
|
|
|||
item.linkId
|
Yes |
string |
|
|
|||
item.extension
|
No |
Extension |
|
|
|||
item.item
|
No |
List of BackboneElement |
|
|
|||
item.item.linkId
|
Yes |
string |
|
|
|||
item.item.extension
|
No |
Extension |
|
|
|||
item.item.answer
|
Yes |
string | Coding | Quantity |
|
|
Example
Request
PUT https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/QuestionnaireResponse/SH-12508041
Body
{
"resourceType": "QuestionnaireResponse",
"id": "SH-12508041",
"questionnaire": "https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Questionnaire/SH-12508041",
"status": "in-progress",
"subject": {
"reference": "Patient/12508041"
},
"item": [
{
"id": "111",
"linkId": "93",
"extension": [
{
"url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/note",
"valueAnnotation": {
"text": "category/group comment"
}
}
],
"item": [
{
"linkId": "93-123",
"answer": [
{
"valueQuantity": {
"value": "20",
"unit": "year (iso1000)",
"system": "http://unitsofmeasure.org",
"code": "a"
}
}
]
},
{
"linkId": "93-456",
"answer": [
{
"valueString": "Answer text"
}
]
},
{
"linkId": "93-789",
"extension": [
{
"url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/choice-answer",
"valueBoolean": true
}
],
"answer": [
{
"valueCoding": {
"system": "https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/nomenclature",
"code": "960439"
}
},
{
"valueString": "Other answer text"
}
]
}
]
}
]
}
Response
Status: 200 OK
Cache-Control: no-cache Content-Length: 0 Content-Type: application/fhir+json Date: Sun, 30 Jun 2019 10:40:00 GMT Vary: Origin X-Request-Id: 1638e30e497b93ff4383b2ff0eaeea91
Errors
The common errors and OperationOutcomes may be returned.