This page is part of the FHIR Specification (v0.0.82: DSTU 1). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions

4.28 Resource QuestionnaireAnswers - Content

This resource maintained by the Patient Care Work Group

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.28.1 Scope and Usage

QuestionnaireAnswers provides a complete or partial list of answers to a set of questions. 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 may be provided to provide both formal rules for editing the questionnaire (via link to Questionnaire) as well as sufficient local information to allow rendering of the questionnaire.

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:

QuestionnaireAnswers 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.28.2 Boundaries and Relationships

The QuestionnaireAnswers 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, QuestionnaireAnswers 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 QuestionnaireAnswers 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 and Contract

4.28.3 Resource Content

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. QuestionnaireAnswers DomainResourceA structured set of questions and their answers
... identifier Σ0..1IdentifierUnique id for this set of answers
... questionnaire Σ0..1QuestionnaireForm being answered
... status ?! Σ1..1codein-progress | completed | amended
QuestionnaireAnswersStatus (Required)
... subject Σ0..1AnyThe subject of the questions
... author Σ0..1Practitioner | Patient | RelatedPersonPerson who received and recorded the answers
... authored Σ0..1dateTimeDate this version was authored
... source Σ0..1Patient | Practitioner | RelatedPersonThe person who answered the questions
... encounter Σ0..1EncounterPrimary encounter during which the answers were collected
... group I0..1ElementGrouped questions
Groups may either contain questions or groups but not both
.... linkId 0..1stringCorresponding group within Questionnaire
.... title 0..1stringName for this group
.... text 0..1stringAdditional text for the group
.... subject 0..1AnyThe subject this group's answers are about
.... group I0..*see groupNested questionnaire answers group
.... question I0..*ElementQuestions in this group
..... linkId 0..1stringCorresponding question within Questionnaire
..... text 0..1stringText of the question as it is shown to the user
..... answer 0..*ElementThe response(s) to the question
...... value[x] Single-valued answer to the question
....... valueBoolean0..1boolean
....... valueDecimal0..1decimal
....... valueInteger0..1integer
....... valueDate0..1date
....... valueDateTime0..1dateTime
....... valueInstant0..1instant
....... valueTime0..1time
....... valueString0..1string
....... valueUri0..1uri
....... valueAttachment0..1Attachment
....... valueCoding0..1Coding
....... valueQuantity0..1Quantity
....... valueReference0..1Any
..... group 0..*see groupNested questionnaire group

UML Diagram

QuestionnaireAnswers (DomainResource)A business identifier assigned to a particular completed (or partially completed) questionnaireidentifier : Identifier 0..1Indicates the Questionnaire resource that defines the form for which answers are being providedquestionnaire : Reference(Questionnaire) 0..1The lifecycle status of the questionnaire answers as a whole (this element modifies the meaning of other elements)status : code 1..1 « Lifecycle status of the questionnaire answersQuestionnaireAnswersStatus »The subject of the questionnaire answers. 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(Any) 0..1Person who received the answers to the questions in the QuestionnaireAnswers and recorded them in the systemauthor : Reference(Practitioner|Patient| RelatedPerson) 0..1The date and/or time that this version of the questionnaire answers was authoredauthored : dateTime 0..1The person who answered the questions about the subjectsource : Reference(Patient|Practitioner| RelatedPerson) 0..1Encounter during which this set of questionnaire answers were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answersencounter : Reference(Encounter) 0..1GroupIdentifies the group from the Questionnaire that corresponds to this group in the QuestionnaireAnswers resourcelinkId : string 0..1Text that is displayed above the contents of the grouptitle : string 0..1Additional text for the group, used for display purposestext : string 0..1More specific subject this section's answers are about, details the subject given in QuestionnaireAnswerssubject : Reference(Any) 0..1QuestionIdentifies the question from the Questionnaire that corresponds to this question in the QuestionnaireAnswers resourcelinkId : string 0..1The actual question as shown to the user to prompt them for an answertext : string 0..1AnswerThe answer (or one of the answers) provided by the respondant to the questionvalue[x] : boolean|decimal|integer|date|dateTime| instant|time|string|uri|Attachment| Coding|Quantity|Reference(Any) 0..1A sub-group within a group. The ordering of groups within this group is relevantgroup0..*The respondent's answer(s) to the questionanswer0..*Nested group, containing nested question for this question. The order of groups within the question is relevantgroup0..*Set of questions within this group. The order of questions within the group is relevantquestion0..*A group of questions to a possibly similarly grouped set of questions in the questionnaire answersgroup0..1

XML Template

<QuestionnaireAnswers 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(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>
 <group>  <!-- 0..1 Grouped questions -->
  <linkId value="[string]"/><!-- 0..1 Corresponding group within Questionnaire -->
  <title value="[string]"/><!-- 0..1 Name for this group -->
  <text value="[string]"/><!-- 0..1 Additional text for the group -->
  <subject><!-- 0..1 Reference(Any) The subject this group's answers are about --></subject>
  <group><!-- ?? 0..* Content as for QuestionnaireAnswers.group Nested questionnaire answers group --></group>
  <question>  <!-- ?? 0..* Questions in this group -->
   <linkId value="[string]"/><!-- 0..1 Corresponding question within Questionnaire -->
   <text value="[string]"/><!-- 0..1 Text of the question as it is shown to the user -->
   <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]>
   </answer>
   <group><!-- 0..* Content as for QuestionnaireAnswers.group Nested questionnaire group --></group>
  </question>
 </group>
</QuestionnaireAnswers>

JSON Template

{doco
  "resourceType" : "QuestionnaireAnswers",
  // 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(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
  "group" : { // Grouped questions
    "linkId" : "<string>", // Corresponding group within Questionnaire
    "title" : "<string>", // Name for this group
    "text" : "<string>", // Additional text for the group
    "subject" : { Reference(Any) }, // The subject this group's answers are about
    "group" : [{ Content as for QuestionnaireAnswers.group }], // C? Nested questionnaire answers group
    "question" : [{ // C? Questions in this group
      "linkId" : "<string>", // Corresponding question within Questionnaire
      "text" : "<string>", // Text of the question as it is shown to the user
      "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) }
      }],
      "group" : [{ Content as for QuestionnaireAnswers.group }] // Nested questionnaire group
    }]
  }
}

Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. QuestionnaireAnswers DomainResourceA structured set of questions and their answers
... identifier Σ0..1IdentifierUnique id for this set of answers
... questionnaire Σ0..1QuestionnaireForm being answered
... status ?! Σ1..1codein-progress | completed | amended
QuestionnaireAnswersStatus (Required)
... subject Σ0..1AnyThe subject of the questions
... author Σ0..1Practitioner | Patient | RelatedPersonPerson who received and recorded the answers
... authored Σ0..1dateTimeDate this version was authored
... source Σ0..1Patient | Practitioner | RelatedPersonThe person who answered the questions
... encounter Σ0..1EncounterPrimary encounter during which the answers were collected
... group I0..1ElementGrouped questions
Groups may either contain questions or groups but not both
.... linkId 0..1stringCorresponding group within Questionnaire
.... title 0..1stringName for this group
.... text 0..1stringAdditional text for the group
.... subject 0..1AnyThe subject this group's answers are about
.... group I0..*see groupNested questionnaire answers group
.... question I0..*ElementQuestions in this group
..... linkId 0..1stringCorresponding question within Questionnaire
..... text 0..1stringText of the question as it is shown to the user
..... answer 0..*ElementThe response(s) to the question
...... value[x] Single-valued answer to the question
....... valueBoolean0..1boolean
....... valueDecimal0..1decimal
....... valueInteger0..1integer
....... valueDate0..1date
....... valueDateTime0..1dateTime
....... valueInstant0..1instant
....... valueTime0..1time
....... valueString0..1string
....... valueUri0..1uri
....... valueAttachment0..1Attachment
....... valueCoding0..1Coding
....... valueQuantity0..1Quantity
....... valueReference0..1Any
..... group 0..*see groupNested questionnaire group

UML Diagram

QuestionnaireAnswers (DomainResource)A business identifier assigned to a particular completed (or partially completed) questionnaireidentifier : Identifier 0..1Indicates the Questionnaire resource that defines the form for which answers are being providedquestionnaire : Reference(Questionnaire) 0..1The lifecycle status of the questionnaire answers as a whole (this element modifies the meaning of other elements)status : code 1..1 « Lifecycle status of the questionnaire answersQuestionnaireAnswersStatus »The subject of the questionnaire answers. 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(Any) 0..1Person who received the answers to the questions in the QuestionnaireAnswers and recorded them in the systemauthor : Reference(Practitioner|Patient| RelatedPerson) 0..1The date and/or time that this version of the questionnaire answers was authoredauthored : dateTime 0..1The person who answered the questions about the subjectsource : Reference(Patient|Practitioner| RelatedPerson) 0..1Encounter during which this set of questionnaire answers were collected. When there were multiple encounters, this is the one considered most relevant to the context of the answersencounter : Reference(Encounter) 0..1GroupIdentifies the group from the Questionnaire that corresponds to this group in the QuestionnaireAnswers resourcelinkId : string 0..1Text that is displayed above the contents of the grouptitle : string 0..1Additional text for the group, used for display purposestext : string 0..1More specific subject this section's answers are about, details the subject given in QuestionnaireAnswerssubject : Reference(Any) 0..1QuestionIdentifies the question from the Questionnaire that corresponds to this question in the QuestionnaireAnswers resourcelinkId : string 0..1The actual question as shown to the user to prompt them for an answertext : string 0..1AnswerThe answer (or one of the answers) provided by the respondant to the questionvalue[x] : boolean|decimal|integer|date|dateTime| instant|time|string|uri|Attachment| Coding|Quantity|Reference(Any) 0..1A sub-group within a group. The ordering of groups within this group is relevantgroup0..*The respondent's answer(s) to the questionanswer0..*Nested group, containing nested question for this question. The order of groups within the question is relevantgroup0..*Set of questions within this group. The order of questions within the group is relevantquestion0..*A group of questions to a possibly similarly grouped set of questions in the questionnaire answersgroup0..1

XML Template

<QuestionnaireAnswers 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(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>
 <group>  <!-- 0..1 Grouped questions -->
  <linkId value="[string]"/><!-- 0..1 Corresponding group within Questionnaire -->
  <title value="[string]"/><!-- 0..1 Name for this group -->
  <text value="[string]"/><!-- 0..1 Additional text for the group -->
  <subject><!-- 0..1 Reference(Any) The subject this group's answers are about --></subject>
  <group><!-- ?? 0..* Content as for QuestionnaireAnswers.group Nested questionnaire answers group --></group>
  <question>  <!-- ?? 0..* Questions in this group -->
   <linkId value="[string]"/><!-- 0..1 Corresponding question within Questionnaire -->
   <text value="[string]"/><!-- 0..1 Text of the question as it is shown to the user -->
   <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]>
   </answer>
   <group><!-- 0..* Content as for QuestionnaireAnswers.group Nested questionnaire group --></group>
  </question>
 </group>
</QuestionnaireAnswers>

JSON Template

{doco
  "resourceType" : "QuestionnaireAnswers",
  // 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(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
  "group" : { // Grouped questions
    "linkId" : "<string>", // Corresponding group within Questionnaire
    "title" : "<string>", // Name for this group
    "text" : "<string>", // Additional text for the group
    "subject" : { Reference(Any) }, // The subject this group's answers are about
    "group" : [{ Content as for QuestionnaireAnswers.group }], // C? Nested questionnaire answers group
    "question" : [{ // C? Questions in this group
      "linkId" : "<string>", // Corresponding question within Questionnaire
      "text" : "<string>", // Text of the question as it is shown to the user
      "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) }
      }],
      "group" : [{ Content as for QuestionnaireAnswers.group }] // Nested questionnaire group
    }]
  }
}

 

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

4.28.3.1 Terminology Bindings

PathDefinitionTypeReference
QuestionnaireAnswers.status Lifecycle status of the questionnaire answersRequiredhttp://hl7.org/fhir/questionnaire-answers-status

4.28.3.2 Constraints

4.28.4 Notes

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

4.28.5 Security

QuestionnaireAnswers 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 take precautions before rendering or executing any attached content.

4.28.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 sensitvity level of the information are also known. E.g. drug, observation type, clinical trial randomaization status, etc. However, for QuestionnaireAnswers, the sensitivity of an instance is dependent on what type of Questionnaire it's 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 QuestionnaireAnswers to ensure that access to information is not granted improperly.

4.28.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 questionnaireQuestionnaireAnswers.author
(Patient, Practitioner, RelatedPerson)
authoreddateWhen the questionnaire was authoredQuestionnaireAnswers.authored
encounterreferenceEncounter during which questionnaire was authoredQuestionnaireAnswers.encounter
(Encounter)
patientreferenceThe patient that is the subject of the questionnaireQuestionnaireAnswers.subject
(Patient)
questionnairereferenceThe questionnaire the answers are provided forQuestionnaireAnswers.questionnaire
(Questionnaire)
sourcereferenceThe person who answered the questionsQuestionnaireAnswers.source
(Patient, Practitioner, RelatedPerson)
statustokenThe status of the questionnaire answersQuestionnaireAnswers.status
subjectreferenceThe subject of the questionnaireQuestionnaireAnswers.subject
(Any)