Connectathon 11 Snapshot

This page is part of the FHIR Specification (v1.2.0: STU 3 Draft). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

4.36 Resource QuestionnaireResponse - Content

Patient Care Work GroupMaturity Level: 2Compartments: Device, Encounter, Patient, Practitioner, RelatedPerson

A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions.

4.36.1 Scope and Usage

QuestionnaireResponse provides a complete or partial list of answers to a set of questions filled when responding to a questionnaire. The questions may be included directly or by reference to a Questionnaire resource that defines the questions as well as the constraints on the allowed answers. In some cases, both formal rules for editing the questionnaire (via link to Questionnaire) as well as sufficient local information to allow rendering of the questionnaire may be provided.

Each time a questionnaire is completed for a different subject or at a different time, a distinct QuestionnaireResponse is generated, though it may be possible for a previously entered set of answers to be edited or updated.

Questionnaires cover the need to communicate data originating from forms used in medical history examinations, research questionnaires and sometimes full clinical specialty records. In many systems this data is collected using user-defined screens and forms. Questionnaires record specifics about data capture - exactly what questions were asked, in what order, what choices for answers were, etc. Each of these questions is part of the Questionnaire, and as such the Questionnaire is a separately identifiable Resource, whereas the individual questions are not.

Examples of Questionnaires include:

  • Past medical history (PMH)
  • Family diseases
  • Social history
  • Research questionnaires and Case report forms (CRFs)
  • Quality and evaluation forms
  • Patient intake form (e.g. clipboard)
  • Insurance claim form

QuestionnaireResponse resources can be validated against their corresponding Questionnaire to verify that required groups and questions are answered and that answers fit constraints in terms of cardinality, data type, etc.

4.36.2 Boundaries and Relationships

The QuestionnaireResponse resource captures the responses to a questionnaire, while Questionnaire represents the definition of the questionnaire form, including what questions are asked, how they're organized and the constraints on the allowed answers.

While Observation, with its nested relatedObservation structure, can create complex hierarchies of questions and answers, the focus is different. First, Observation is used primarily for capturing data elements that are "true" observations - lab measurements, vital signs, social assessments, etc. On the other hand, QuestionnaireResponse can be used to capture any types of data, including data that would typically map to other resources (Procedure, Patient, MedicationStatement, etc.) In addition, the focus of QuestionnaireResponse includes the specific phrasing and organization of the questions. All data must be explicitly captured as a question. With Observation, the focus is only on the meaning of the answer, not what question was asked (assuming a question was even asked at all). Additional information such as normal ranges, interpretation, date, etc. may also be captured.

This resource is referenced by ClinicalImpression, Contract and Observation

4.36.3 Resource Content

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. QuestionnaireResponse DomainResourceA structured set of questions and their answers
... identifier Σ0..1IdentifierUnique id for this set of answers
... questionnaire Σ0..1Reference(Questionnaire)Form being answered
... status ?! Σ1..1codein-progress | completed | amended
QuestionnaireResponseStatus (Required)
... subject Σ0..1Reference(Any)The subject of the questions
... author Σ0..1Reference(Device | Practitioner | Patient | RelatedPerson)Person who received and recorded the answers
... authored Σ0..1dateTimeDate this version was authored
... source Σ0..1Reference(Patient | Practitioner | RelatedPerson)The person who answered the questions
... encounter Σ0..1Reference(Encounter)Primary encounter during which the answers were collected
... item 0..*BackboneElementGroups and questions
.... linkId 0..1stringCorresponding item within Questionnaire
.... text 0..1stringName for group or question text
.... subject 0..1Reference(Any)The subject this group's answers are about
.... answer 0..*BackboneElementThe response(s) to the question
..... value[x] 0..1Single-valued answer to the question
...... valueBooleanboolean
...... valueDecimaldecimal
...... valueIntegerinteger
...... valueDatedate
...... valueDateTimedateTime
...... valueInstantinstant
...... valueTimetime
...... valueStringstring
...... valueUriuri
...... valueAttachmentAttachment
...... valueCodingCoding
...... valueQuantityQuantity
...... valueReferenceReference(Any)
..... item 0..*see itemNested groups and questions
.... item 0..*see itemNested questionnaire response items

doco Documentation for this format

UML Diagram

QuestionnaireResponse (DomainResource)A business identifier assigned to a particular completed (or partially completed) questionnaireidentifier : Identifier [0..1]Indicates the Questionnaire resource that defines the form for which answers are being providedquestionnaire : Reference [0..1] « Questionnaire »The lifecycle status of the questionnaire response as a whole (this element modifies the meaning of other elements)status : code [1..1] « Lifecycle status of the questionnaire response. (Strength=Required)QuestionnaireResponseStatus! »The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of informationsubject : Reference [0..1] « Any »Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the systemauthor : Reference [0..1] « Device|Practitioner|Patient| RelatedPerson »The date and/or time that this version of the questionnaire response was authoredauthored : dateTime [0..1]The person who answered the questions about the subjectsource : Reference [0..1] « Patient|Practitioner|RelatedPerson »Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answersencounter : Reference [0..1] « Encounter »ItemIdentifies the item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resourcelinkId : string [0..1]Text that is displayed above the contents of the group or as the text of the question being answeredtext : string [0..1]More specific subject this section's answers are about, details the subject given in QuestionnaireResponsesubject : Reference [0..1] « Any »AnswerThe answer (or one of the answers) provided by the respondent to the questionvalue[x] : Type [0..1] « boolean|decimal|integer|date|dateTime| instant|time|string|uri|Attachment|Coding|Quantity|Reference( Any) »Nested groups and/or questions found within this particular answeritem[0..*]The respondent's answer(s) to the questionanswer[0..*]Questions or sub-groups nested beneath a question or groupitem[0..*]Corresponds to a group or question item from the original questionnaireitem[0..*]

XML Template

<QuestionnaireResponse xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <identifier><!-- 0..1 Identifier Unique id for this set of answers --></identifier>
 <questionnaire><!-- 0..1 Reference(Questionnaire) Form being answered --></questionnaire>
 <status value="[code]"/><!-- 1..1 in-progress | completed | amended -->
 <subject><!-- 0..1 Reference(Any) The subject of the questions --></subject>
 <author><!-- 0..1 Reference(Device|Practitioner|Patient|RelatedPerson) Person who received and recorded the answers --></author>
 <authored value="[dateTime]"/><!-- 0..1 Date this version was authored -->
 <source><!-- 0..1 Reference(Patient|Practitioner|RelatedPerson) The person who answered the questions --></source>
 <encounter><!-- 0..1 Reference(Encounter) Primary encounter during which the answers were collected --></encounter>
 <item>  <!-- 0..* Groups and questions -->
  <linkId value="[string]"/><!-- 0..1 Corresponding item within Questionnaire -->
  <text value="[string]"/><!-- 0..1 Name for group or question text -->
  <subject><!-- 0..1 Reference(Any) The subject this group's answers are about --></subject>
  <answer>  <!-- 0..* The response(s) to the question -->
   <value[x]><!-- 0..1 boolean|decimal|integer|date|dateTime|instant|time|string|
     uri|Attachment|Coding|Quantity|Reference(Any) Single-valued answer to the question --></value[x]>
   <item><!-- 0..* Content as for QuestionnaireResponse.item Nested groups and questions --></item>
  </answer>
  <item><!-- 0..* Content as for QuestionnaireResponse.item Nested questionnaire response items --></item>
 </item>
</QuestionnaireResponse>

JSON Template

{doco
  "resourceType" : "QuestionnaireResponse",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "identifier" : { Identifier }, // Unique id for this set of answers
  "questionnaire" : { Reference(Questionnaire) }, // Form being answered
  "status" : "<code>", // R!  in-progress | completed | amended
  "subject" : { Reference(Any) }, // The subject of the questions
  "author" : { Reference(Device|Practitioner|Patient|RelatedPerson) }, // Person who received and recorded the answers
  "authored" : "<dateTime>", // Date this version was authored
  "source" : { Reference(Patient|Practitioner|RelatedPerson) }, // The person who answered the questions
  "encounter" : { Reference(Encounter) }, // Primary encounter during which the answers were collected
  "item" : [{ // Groups and questions
    "linkId" : "<string>", // Corresponding item within Questionnaire
    "text" : "<string>", // Name for group or question text
    "subject" : { Reference(Any) }, // The subject this group's answers are about
    "answer" : [{ // The response(s) to the question
      // value[x]: Single-valued answer to the question. One of these 13:
      "valueBoolean" : <boolean>,
      "valueDecimal" : <decimal>,
      "valueInteger" : <integer>,
      "valueDate" : "<date>",
      "valueDateTime" : "<dateTime>",
      "valueInstant" : "<instant>",
      "valueTime" : "<time>",
      "valueString" : "<string>",
      "valueUri" : "<uri>",
      "valueAttachment" : { Attachment },
      "valueCoding" : { Coding },
      "valueQuantity" : { Quantity },
      "valueReference" : { Reference(Any) },
      "item" : [{ Content as for QuestionnaireResponse.item }] // Nested groups and questions
    }],
    "item" : [{ Content as for QuestionnaireResponse.item }] // Nested questionnaire response items
  }]
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. QuestionnaireResponse DomainResourceA structured set of questions and their answers
... identifier Σ0..1IdentifierUnique id for this set of answers
... questionnaire Σ0..1Reference(Questionnaire)Form being answered
... status ?! Σ1..1codein-progress | completed | amended
QuestionnaireResponseStatus (Required)
... subject Σ0..1Reference(Any)The subject of the questions
... author Σ0..1Reference(Device | Practitioner | Patient | RelatedPerson)Person who received and recorded the answers
... authored Σ0..1dateTimeDate this version was authored
... source Σ0..1Reference(Patient | Practitioner | RelatedPerson)The person who answered the questions
... encounter Σ0..1Reference(Encounter)Primary encounter during which the answers were collected
... item 0..*BackboneElementGroups and questions
.... linkId 0..1stringCorresponding item within Questionnaire
.... text 0..1stringName for group or question text
.... subject 0..1Reference(Any)The subject this group's answers are about
.... answer 0..*BackboneElementThe response(s) to the question
..... value[x] 0..1Single-valued answer to the question
...... valueBooleanboolean
...... valueDecimaldecimal
...... valueIntegerinteger
...... valueDatedate
...... valueDateTimedateTime
...... valueInstantinstant
...... valueTimetime
...... valueStringstring
...... valueUriuri
...... valueAttachmentAttachment
...... valueCodingCoding
...... valueQuantityQuantity
...... valueReferenceReference(Any)
..... item 0..*see itemNested groups and questions
.... item 0..*see itemNested questionnaire response items

doco Documentation for this format

UML Diagram

QuestionnaireResponse (DomainResource)A business identifier assigned to a particular completed (or partially completed) questionnaireidentifier : Identifier [0..1]Indicates the Questionnaire resource that defines the form for which answers are being providedquestionnaire : Reference [0..1] « Questionnaire »The lifecycle status of the questionnaire response as a whole (this element modifies the meaning of other elements)status : code [1..1] « Lifecycle status of the questionnaire response. (Strength=Required)QuestionnaireResponseStatus! »The subject of the questionnaire response. This could be a patient, organization, practitioner, device, etc. This is who/what the answers apply to, but is not necessarily the source of informationsubject : Reference [0..1] « Any »Person who received the answers to the questions in the QuestionnaireResponse and recorded them in the systemauthor : Reference [0..1] « Device|Practitioner|Patient| RelatedPerson »The date and/or time that this version of the questionnaire response was authoredauthored : dateTime [0..1]The person who answered the questions about the subjectsource : Reference [0..1] « Patient|Practitioner|RelatedPerson »Encounter during which this set of questionnaire response were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answersencounter : Reference [0..1] « Encounter »ItemIdentifies the item from the Questionnaire that corresponds to this item in the QuestionnaireResponse resourcelinkId : string [0..1]Text that is displayed above the contents of the group or as the text of the question being answeredtext : string [0..1]More specific subject this section's answers are about, details the subject given in QuestionnaireResponsesubject : Reference [0..1] « Any »AnswerThe answer (or one of the answers) provided by the respondent to the questionvalue[x] : Type [0..1] « boolean|decimal|integer|date|dateTime| instant|time|string|uri|Attachment|Coding|Quantity|Reference( Any) »Nested groups and/or questions found within this particular answeritem[0..*]The respondent's answer(s) to the questionanswer[0..*]Questions or sub-groups nested beneath a question or groupitem[0..*]Corresponds to a group or question item from the original questionnaireitem[0..*]

XML Template

<QuestionnaireResponse xmlns="http://hl7.org/fhir"> doco
 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <identifier><!-- 0..1 Identifier Unique id for this set of answers --></identifier>
 <questionnaire><!-- 0..1 Reference(Questionnaire) Form being answered --></questionnaire>
 <status value="[code]"/><!-- 1..1 in-progress | completed | amended -->
 <subject><!-- 0..1 Reference(Any) The subject of the questions --></subject>
 <author><!-- 0..1 Reference(Device|Practitioner|Patient|RelatedPerson) Person who received and recorded the answers --></author>
 <authored value="[dateTime]"/><!-- 0..1 Date this version was authored -->
 <source><!-- 0..1 Reference(Patient|Practitioner|RelatedPerson) The person who answered the questions --></source>
 <encounter><!-- 0..1 Reference(Encounter) Primary encounter during which the answers were collected --></encounter>
 <item>  <!-- 0..* Groups and questions -->
  <linkId value="[string]"/><!-- 0..1 Corresponding item within Questionnaire -->
  <text value="[string]"/><!-- 0..1 Name for group or question text -->
  <subject><!-- 0..1 Reference(Any) The subject this group's answers are about --></subject>
  <answer>  <!-- 0..* The response(s) to the question -->
   <value[x]><!-- 0..1 boolean|decimal|integer|date|dateTime|instant|time|string|
     uri|Attachment|Coding|Quantity|Reference(Any) Single-valued answer to the question --></value[x]>
   <item><!-- 0..* Content as for QuestionnaireResponse.item Nested groups and questions --></item>
  </answer>
  <item><!-- 0..* Content as for QuestionnaireResponse.item Nested questionnaire response items --></item>
 </item>
</QuestionnaireResponse>

JSON Template

{doco
  "resourceType" : "QuestionnaireResponse",
  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "identifier" : { Identifier }, // Unique id for this set of answers
  "questionnaire" : { Reference(Questionnaire) }, // Form being answered
  "status" : "<code>", // R!  in-progress | completed | amended
  "subject" : { Reference(Any) }, // The subject of the questions
  "author" : { Reference(Device|Practitioner|Patient|RelatedPerson) }, // Person who received and recorded the answers
  "authored" : "<dateTime>", // Date this version was authored
  "source" : { Reference(Patient|Practitioner|RelatedPerson) }, // The person who answered the questions
  "encounter" : { Reference(Encounter) }, // Primary encounter during which the answers were collected
  "item" : [{ // Groups and questions
    "linkId" : "<string>", // Corresponding item within Questionnaire
    "text" : "<string>", // Name for group or question text
    "subject" : { Reference(Any) }, // The subject this group's answers are about
    "answer" : [{ // The response(s) to the question
      // value[x]: Single-valued answer to the question. One of these 13:
      "valueBoolean" : <boolean>,
      "valueDecimal" : <decimal>,
      "valueInteger" : <integer>,
      "valueDate" : "<date>",
      "valueDateTime" : "<dateTime>",
      "valueInstant" : "<instant>",
      "valueTime" : "<time>",
      "valueString" : "<string>",
      "valueUri" : "<uri>",
      "valueAttachment" : { Attachment },
      "valueCoding" : { Coding },
      "valueQuantity" : { Quantity },
      "valueReference" : { Reference(Any) },
      "item" : [{ Content as for QuestionnaireResponse.item }] // Nested groups and questions
    }],
    "item" : [{ Content as for QuestionnaireResponse.item }] // Nested questionnaire response items
  }]
}

 

Alternate definitions: Schema/Schematron, Resource Profile (XML, JSON), Questionnaire

4.36.3.1 Terminology Bindings

PathDefinitionTypeReference
QuestionnaireResponse.status Lifecycle status of the questionnaire response.RequiredQuestionnaireResponseStatus
QuestionnaireResponse.item.answer.value[x] Code indicating the response provided for a question.UnknownNo details provided yet

4.36.4 Notes

  • Questionnaires can be authored by clinicians, the patient or a patient's relatives (or even the owner in the case of animals). Clinicians may author questionnaires, where the answers are provided by others on behalf of the patient. Additionally, information gathered for the purpose of a patient may be about the patient's relatives (e.g. in family anamnesis). Therefore, Questionnaire makes a distinction between the author, the subject and the source of information.
  • A QuestionnaireResponse may be stand-alone or may point to the form that defines the questions in Questionnaire. In this second case, the linkage between the questions and groups in the two resources is established using the linkId element.
  • Because of the lack of explicit support for Questionnaires in HL7 v3 , CDA Documents frequently used named sections with Observations to model Questionnaires. Such use cases should now utilize the QuestionnaireResponse Resource instead.
  • The Questionnaire's encounter element can be used to link to the encounter during which the Questionnaire was taken. This can be relevant since the encounter gives context to the answers and can be used to relate information in the Questionnaire to orders and observations that were done during the same Encounter.
  • The order of questions within groups, groups within groups and groups within questions is relevant and must be retained for display and capture.
  • Typically Questionnaire items of type display are not mirrored in a QuestionnaireResponse as the purpose of a QuestionnaireResponse is to reflect the information entered into the form, not the instructions provided, though questions and group headings are retained to ensure that the meaning of answers can be interpreted independent of the Questionnaire.

Refer to additional guidance provided in the Questionnaire resource dealing with the design of questionnaires.

4.36.5 Security

QuestionnaireResponse resources can have answers with values of type Attachment. These attachments will typically be selected by the user answering the questionnaire and this selection may be done in an uncontrolled environment. Systems should ensure that the attachment is of the desired type and should take precautions before rendering or executing any attached content.

4.36.6 Access Control

For most resources, the type of information that can be conveyed in the resource is determined by the resource, and the key attributes that determine the sensitivity level of the information are also known; e.g., drug, observation type, clinical trial randomization status, etc. However, for QuestionnaireResponse, the sensitivity of an instance is dependent on what type of Questionnaire it is associated with. And the data elements that determine that sensitivity could be the answers to any of the questions. This makes automatically enforcing access control rules more challenging. Designers should take these challenges into account and may need to place stricter access controls around QuestionnaireResponse to ensure that access to information is not granted improperly.

4.36.7 Search Parameters

Search parameters for this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.

NameTypeDescriptionPaths
authorreferenceThe author of the questionnaireQuestionnaireResponse.author
(Device, Patient, Practitioner, RelatedPerson)
authoreddateWhen the questionnaire was authoredQuestionnaireResponse.authored
encounterreferenceEncounter during which questionnaire was authoredQuestionnaireResponse.encounter
(Encounter)
patientreferenceThe patient that is the subject of the questionnaireQuestionnaireResponse.subject
(Patient)
questionnairereferenceThe questionnaire the answers are provided forQuestionnaireResponse.questionnaire
(Questionnaire)
sourcereferenceThe person who answered the questionsQuestionnaireResponse.source
(Patient, Practitioner, RelatedPerson)
statustokenThe status of the questionnaire responseQuestionnaireResponse.status
subjectreferenceThe subject of the questionnaireQuestionnaireResponse.subject
(Any)