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
  • Description
    • An answer from a list of available Coding answer options.
  • Details: Nomenclature Value
    System: https://fhir.cerner.com/<EHR source id>/nomenclature

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 for QuestionnaireResponses that meet supplied query parameters:

GET /QuestionnaireResponse?:parameters

Implementation Notes

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/QuestionnaireResponses?_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

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

Authorization Types

Headers

Authorization: <OAuth2 Bearer Token>
Content-Type: application/fhir+json

Body fields

Name Required Type
resourceType Yes string
  • Description
    • The type of the FHIR resource.
  • Example
    • {
        "resourceType": "QuestionnaireResponse"
      }
      
  • Notes
    • resourceType must be QuestionnaireResponse
id Yes id
  • Description
    • The logical id of the resource.
  • Example
    • {
        "id": "SH-12508041"
      }
      
questionnaire Yes Questionnaire
  • Description
    • The Questionnaire that defines and organizes the questions for which answers are being provided.
  • Example
    • {
        "questionnaire": "https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Questionnaire/SH-12508041"
      }
      
status Yes code
  • Description
    • The position of the questionnaire response within its overall lifecycle.
  • Example
    • {
        "status": "in-progress"
      }
      
  • Notes
    • Status must be 'in-progress'.
subject Yes Reference
  • Description
    • The subject of the questionnaire response. This is the patient the answers apply to, but is not necessarily the source of information.
  • Example
    • {
        "subject": {
          "reference": "Patient/12508041"
        }
      }
      
item Yes List of BackboneElement
  • Description
    • A group or question item from the original questionnaire for which answers are provided.
  • Example
    • {
        "item": [
          {
            "id": "111",
            "linkId": "93",
            "extension": [
              {​​​​​​​​​​​​
                "url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/note",
                "valueAnnotation": {​​​​​​​​​​​​​​​​​​​
                  "text": "category/group comment"
                }​​​​​​​​​​​​​​​​​​​​​​​​​​
              }​​​​​​​​​​​​​​​​​​​​​​​​​​
            ],
            "item": [
              {
                "linkId": "93-123",
                "extension": [
                  {​​​​​​​​​​​​
                    "url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/choice-answer",
                    "valueBoolean": true
                  }​​​​​​​​​​​​​​​​​​​​​​​​​​
                ],
                "answer": [
                  {
                    "valuestring": "Answer text"
                  }
                ]
              }
            ] 
          }
        ]
      }
      
item.id No string
  • Description
    • Unique id for inter-element referencing.
  • Example
    • {
        "id": "111"
      }
      
  • Notes
    • If an item.id is returned on a read, it must be provided on an update.
item.linkId Yes string
  • Description
    • The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.
  • Example
    • {
        "linkId": "93"
      }
      
item.extension No Extension
  • Description
    • Additional details about a given QuestionnaireResponse group item.
  • Example
    • {
        "extension": [
          {​​​​​​​​​​​​
            "url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/note",
            "valueAnnotation": {​​​​​​​​​​​​​​​​​​​
              "text": "category/group comment"
            }​​​​​​​​​​​​​​​​​​​​​​​​​​
          }​​​​​​​​​​​​​​​​​​​​​​​​​​
        ]
      }
      
  • Notes
    • Only the 'note' extension is supported for this field. Notes can only be added, not replaced or deleted.
item.item No List of BackboneElement
  • Description
    • Questions nested beneath a group.
  • Example
    • {
        "item": [
          {
            "linkId": "93-123",
            "extension": [
              {​​​​​​​​​​​​
                "url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/choice-answer",
                "valueBoolean": true
              }​​​​​​​​​​​​​​​​​​​​​​​​​​
            ],
            "answer": [
              {
                "valuestring": "Answer text"
              }
            ]
          }
        ]
      }
      
item.item.linkId Yes string
  • Description
    • The item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resource.
  • Example
    • {
        "linkId": "93-123"
      }
      
item.item.extension No Extension
  • Description
    • Whether the answers come from a list of options.
  • Example
    • {
        "extension": [
          {​​​​​​​​​​​​
            "url": "https://fhir-ehr.cerner.com/r4/StructureDefinition/choice-answer",
            "valueBoolean": true
          }​​​​​​​​​​​​​​​​​​​​​​​​​​
        ]
      }
      
  • Notes
    • Only the 'choice-answer' extension is supported for this field. Extension must be provided and true when answering a question of type choice or open choice.
item.item.answer Yes string | Coding | Quantity
  • Description
    • The respondent's answer(s) to the question.
  • Example
    • {
        "answer": [
          {
            "valueString": "Answer text"
          }
        ]
      }
      
  • Example
    • {
        "answer": [
          {
            "valueCoding": {
              "system": "https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/nomenclature",
              "code": "960439"
            }
          }
        ]
      }
      
  • Example
    • {
        "answer": [
          {
            "valueQuantity": {
              "value": 20
            }
          }
        ]
      }
      
  • Notes
    • Only answer value types of String, Quantity, and Coding are supported.

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.