FHIR CI-Build

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions icon

2.6 Resource QuestionnaireResponse - Content

FHIR Infrastructure icon Work GroupMaturity Level: 5 Trial UseSecurity Category: Patient Compartments: 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 questionnaire being responded to.

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.

Questionnaire responses 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. Questionnaire responses record specifics about data capture - exactly what questions were asked, in what order, what answers were given, 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.

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 component 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., while QuestionnaireResponse can be used to capture any types of data, including data that would typically map to other resources (Procedure, Patient, MedicationStatement, etc.). Second, 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.

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. QuestionnaireResponse TU DomainResource A structured set of questions and their answers

Elements defined in Ancestors: id, meta, implicitRules, language, text, contained, extension, modifierExtension
... identifier Σ 0..* Identifier Business identifier for this set of answers

... basedOn Σ 0..* Reference(CarePlan | ServiceRequest) Request fulfilled by this QuestionnaireResponse

... partOf Σ 0..* Reference(Observation | Procedure) Part of referenced event

... status ?!Σ 1..1 code in-progress | completed | amended | entered-in-error | stopped
Binding: Questionnaire Response Status (Required)
... subject Σ 0..1 Reference(Any) The subject of the questions
... encounter Σ 0..1 Reference(Encounter) Encounter the questionnaire response is part of
... authored Σ 0..1 dateTime Date the answers were gathered
... author Σ 0..1 Reference(Device | Practitioner | PractitionerRole | Patient | RelatedPerson | Organization) The individual or device that received and recorded the answers
... source Σ 0..1 Reference(Device | Organization | Patient | Practitioner | PractitionerRole | RelatedPerson) The individual or device that answered the questions
... item C 0..* BackboneElement Groups and questions
+ Rule: Item cannot contain both item and answer
+ Rule: Repeated answers are combined in the answers array of a single item

.... linkId C 1..1 string Pointer to specific item from Questionnaire
.... definition 0..1 uri ElementDefinition - details for the item
.... text 0..1 string Name for group or question text
.... answer C 0..* BackboneElement The response(s) to the question

..... value[x] C 1..1 Single-valued answer to the question
Binding: Questionnaire Answer Codes (Example)
...... valueBoolean boolean
...... valueDecimal decimal
...... valueInteger integer
...... valueDate date
...... valueDateTime dateTime
...... valueTime time
...... valueString string
...... valueUri uri
...... valueAttachment Attachment
...... valueCoding Coding
...... valueQuantity SimpleQuantity
...... valueReference Reference(Any)
..... item 0..* see item Child items of question

.... item 0..* see item Child items of group item


doco Documentation for this format icon

See the Extensions for this resource

 

Additional definitions: Master Definition XML + JSON, XML Schema/Schematron + JSON Schema, ShEx (for Turtle) + see the extensions, the spreadsheet version & the dependency analysis

Path ValueSet Type Documentation
QuestionnaireResponse.status QuestionnaireResponseStatus Required

Lifecycle status of the questionnaire response.

QuestionnaireResponse.item.answer.value[x] QuestionnaireAnswerCodes (a valid code from SNOMED CT icon) Example

Example list of codes for answers to questions. (Not complete or necessarily appropriate.)

UniqueKeyLevelLocationDescriptionExpression
img qrs-1Rule QuestionnaireResponse.itemItem cannot contain both item and answer(answer.exists() and item.exists()).not()
img qrs-2Rule QuestionnaireResponse.itemRepeated answers are combined in the answers array of a single itemrepeat(answer|item).select(item.where(answer.value.exists()).linkId.isDistinct()).allTrue()

  • QuestionnaireResponses can be authored by clinicians, patients, or patients' relatives (or even owners in the case of animals). Clinicians may author questionnaire responses, where the answers are provided by others on behalf of the patient. Additionally, information gathered on behalf of a patient may be about the patient's relatives (e.g. in family anamnesis). Therefore, QuestionnaireResponse makes a distinction between the author, the subject and the source of information.
  • The QuestionnaireResponse's encounter element can be used to link to the encounter when the questionnaire response was authored. This can be relevant since the encounter gives context to the answers and can be used to relate information in the QuestionnaireResponse to orders and observations that were done during the same Encounter.
  • The QuestionnaireResponse's language element can be used to indicate the language in which the patient completed the survey/questionnaire
  • The order of questions within groups, groups within groups and groups within questions is relevant and must be retained for display and capture. The hierarchy of the items within the QuestionnaireResponse SHALL mirror the hierarchy of the items in the corresponding Questionnaire (if any).
  • For use of QuestionnaireResponse.item.definition, see notes on Questionnaire
  • Because of the lack of explicit support for Questionnaires in HL7 v3 icon, CDA icon Documents frequently used named sections with Observations to model questionnaires. Such use cases should now utilize the QuestionnaireResponse resource instead.

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

A QuestionnaireResponse may be stand-alone or may point to the definition of the questions in Questionnaire. If the QuestionnaireResponse refers to a Questionnaire:

  • The QuestionnaireResponse structure must be consistent with the Questionnaire (i.e. questions must be organized into the same groups, nested questions must still be nested, etc.
  • The linkage between the questions and groups in the two resources is established using the linkId element
  • LinkIds are unique across all items in a Questionnaire, but can sometimes appear multiple times within a QuestionnaireResponse if the corresponding item (or one of its ancestors) is allowed to repeat.
  • When a QuestionnaireResponse references a Questionnaire, all the items in the questionnaire SHOULD be included in the QuestionnaireResponse if they are relevant to the interpretation of the answers, including items of type = display. When the QuestionnaireResponse is not yet marked as 'completed', this might also include items that are not enabled based on what answers are currently present. However, once a QuestionnaireResponse is marked as "completed", the QuestionnaireResponse SHALL only include items that are 'enabled'. I.e. stuff that was perhaps answered through populate or user-action but subsequently got disabled due to other answers must not be included in a final QuestionnaireResponse.

A diagram showing a Questionnaire with multiple nested groups and items and the corresponding QuestionnaireResponse

The diagram above shows a Questionnaire with a hierarchy of group and question items, some marked as 'repeats'=true, and others false and with similar variation in 'required'=true and false. It also shows a hypothetical QuestionnaireResponse that is valid against that questionnaire with appropriate nesting of items and answers and linkIds showing the alignment between the Questionnaire and QuestionnaireResponse items.

Rules imposed by a Questionnaire about expectations for answers are not expected to be met until a Questionnaire is deemed to be 'completed' (or 'amended'). For example, items that are marked as 'required' may be omitted, minimum numbers of answers might not be met, length requirement for answers, co-occurrence constraints, etc. might all be violated when the QuestionnaireResponse is still in the process of being completed. QuestionnaireResponses may be stored in this 'incomplete' state. Such QuestionnaireResponses might also include data for disabled questions, entries and text for non-answered questions, etc. However, once a QuestionnaireResponse is marked as 'completed' (including if it is subsequently changed to 'amended'), all requirements of the associated Questionnaire must be met, all non-answered question items must be removed, all non-enabled items must be removed, etc. (Display items MAY be retained. Certain extensions on the Questionnaire item may mandate that a display item needed for a human reviewer to interpret the QuestionnaireResponse be retained in a completed QuestionnaireResponse.)

QuestioinnaireResponse has two different mechanisms to support nesting of items - item.item and item.answer.item. The former is used when nesting items within a 'group' and the latter is always used when nesting items within a question. This is because items nested within a question always nest within each answer to the question. If the question allows multiple answers, each will have its own set of nested items.

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.

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.

It is possible to profile QuestionnaireResponse in the same way as any other resource. However, such profiling should not be used to constrain QuestionnaireResponse to only be able to capture the answers associated with a single type of form - that is what the Questionnaire resource is for. Profiling QuestionnaireResponse is appropriate when there's a need to enforce that certain metadata is always present, to indicate limitations on what types of answers can be handled, etc. - independent of what Questionnaire is being completed.

Search parameters for this resource. See also the full list of search parameters for this resource, and check the Extensions registry for search parameters on extensions related to this resource. The common parameters also apply. See Searching for more information about searching in REST, messaging, and services.

Name Type Description Expression In Common
author reference The author of the questionnaire response QuestionnaireResponse.author
(Practitioner, Organization, Device, Patient, PractitionerRole, RelatedPerson)
authored date When the questionnaire response was last changed QuestionnaireResponse.authored
based-on reference Plan/proposal/order fulfilled by this questionnaire response QuestionnaireResponse.basedOn
(CarePlan, ServiceRequest)
encounter reference Encounter associated with the questionnaire response QuestionnaireResponse.encounter
(Encounter)
29 Resources
identifier token The unique identifier for the questionnaire response QuestionnaireResponse.identifier 65 Resources
item-subject reference Allows searching for QuestionnaireResponses by item value where the item has isSubject=true QuestionnaireResponse.item.where(extension('http://hl7.org/fhir/StructureDefinition/questionnaireresponse-isSubject').exists()).answer.value.ofType(Reference)
part-of reference Procedure or observation this questionnaire response was performed as a part of QuestionnaireResponse.partOf
(Observation, Procedure)
patient reference The patient that is the subject of the questionnaire response QuestionnaireResponse.subject.where(resolve() is Patient)
(Patient)
65 Resources
questionnaire reference The questionnaire the answers are provided for QuestionnaireResponse.questionnaire
(Questionnaire)
source reference The individual providing the information reflected in the questionnaire response QuestionnaireResponse.source
(Practitioner, Organization, Device, Patient, PractitionerRole, RelatedPerson)
status token The status of the questionnaire response QuestionnaireResponse.status
subject reference The subject of the questionnaire response QuestionnaireResponse.subject
(Any)