DSTU2 FHIR Release 3 (STU)

This page is part of the FHIR Specification (v1.0.2: DSTU (v3.0.2: STU 2). 3). 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 R3 R2

4.26 2.38 Resource Questionnaire - Content

Patient Care FHIR Infrastructure Work Group Maturity Level : 2 3   Trial Use Compartments : Not linked to any defined compartments

A structured set of questions intended to guide the collection of answers. The questions are ordered answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouped into coherent subsets, corresponding to the structure of the grouping of the underlying questions. to allow coherent, consistent data collection.

A Questionnaire is an organized collection of questions intended to solicit information from patients, providers or other individuals involved in the healthcare domain. They may be simple flat lists of questions or can be hierarchically organized in groups and sub-groups, each containing questions. The Questionnaire defines the questions to be asked, how they are ordered and grouped grouped, any intervening instructional text and what the constraints are on the allowed answers. The results of a Questionnaire can be communicated using the QuestionnaireResponse resource.

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 define 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. (Questionnaire questions can be linked to shared data elements using the Questionnaire.item.definition element.)

Examples of Questionnaires include:

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

This resource is limited in scope to support the characteristics of simple questionnaires. However, common extensions have been defined to allow more sophisticated behavior. This includes:

  • Questionnaire core extensions which defines the additional descriptive characteristics for questionnaires and their groups and questions
  • Element extensions which can describe additional constraints on allowed answers for questionnaires such as string length and date and numeric ranges

Additional profiles such as the Structured Data Capture Questionnaire profile may provide additional capabilities for defining more sophisticated questionnaires and forms.

Questionnaires differ from Lists because Lists group existing resources, while Questionnaires group arbitrary questions. In theory, a Questionnaire could be expressed as a List or Composition containing DataElement resources. However, the former would disregard the "wholeness" associated with a questionnaire where questions must generally be maintained as a single structure. The latter would focus on rendering of the data elements rather than organizing the capture of information.

Questionnaires are distinct from Observations and DiagnosticReports in that both of these resources are intended to capture only certain types of information (lab, imaging, vitals, etc.) and should not be used to capture the full breadth of healthcare information (allergies, medications, care plans, etc.), while Questionnaires are able to capture any information at all. More importantly, Observation and DiagnosticReport focus on capturing the discrete information in a standardized form so that the information can be used consistently regardless of where or how it is captured. Questionnaire focuses on information capture. The same information can be captured using a wide variety of questionnaires with differently phrased questions organized in different manners. As such, the Questionnaire resource provides a means to standardize the information gathering process (how information is captured), but not the actual information collected. Observation and DiagnosticReport standardize what information is actually captured, but not how the information is gathered.

Questionnaires are similar to the notion of "logical models" supported by the StructureDefinition resource. Both support the representation of a collection of data points with labels, data types and hierarchy. It will be common to find the two of them mapped together. The primary difference is that Questionnaire is focused on user-facing data collection. It describes specific questions and includes information such as what number/label should be displayed beside each question, conditions in which questions should be displayed (or not), what instructions should be provided to the user, etc. StructureDefinition, on the other hand, merely defines a data structure with no guidance on display or rules around capture mechanism, only what data should exist in the end. As well, logical models are not intended to capture data directly. Rather, they provide a basis for mapping between data capture structures.

Groups and questions that make up a Questionnaire can be explicitly coded use the definition element to refer to externally defined numbering or identification data elements in external code systems, DataElements and StructureDefinitions . In this way, it's possible to leverage standard definitions of questions and sections on formally defined their associated data types and answer sets across questionnaires. This also allows extraction of the data on from a form and questionnaire response into other data structures (e.g. populating a ReferralRequest or CarePlan from information in a completed questionnaire response. It can also support other sorts of post-processing of the data contained in a Questionnaire. Such coding questionnaire response. However, use of the definition element is not required however and Questionnaires may be quite loosely defined. The section Questionnaire versus Resources below discusses the issues of collecting data in such loosely defined Questionnaires versus collecting data as well-defined separate Resources.

This resource is referenced by CarePlan , FamilyMemberHistory and questionnaireresponse QuestionnaireResponse

Structure

External identifiers Logical identifier for this Organization/individual who designed Σ 1..1 Grouped questions To link questionnaire with Σ Name to be displayed Concept that represents Additional text for the group Whether Whether the see group Nested questionnaire group 0..* Questions in this group A question must use either option To link questionnaire with questionnaire response Concept that represents this question on a questionnaire Text of the question as it is shown to the user boolean | decimal | integer | date | dateTime +
Name Flags Card. Type Description & Constraints doco
. . Questionnaire I DomainResource A structured set of questions
If root group must be "required" + The link ids for groups and questions must be unique within the questionnaire
Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension
. . . url Σ 0..1 uri Logical URI to reference this questionnaire (globally unique)
... identifier Σ 0..* Identifier Additional identifier for this the questionnaire
. . . version Σ 0..1 string Business version of Questionnaire the questionnaire
. . . name Σ 0..1 string Name for this questionnaire (computer friendly)
... title Σ 0..1 string Name for this questionnaire (human friendly)
... status ?! Σ 1..1 code draft | published active | retired | unknown
QuestionnaireStatus PublicationStatus ( Required )
. . . experimental ?! Σ 0..1 boolean For testing purposes, not real usage
... date Σ 0..1 dateTime Date this version was authored last changed
. . . publisher Σ 0..1 string Name of the publisher (organization or individual)
... description 0..1 markdown Natural language description of the questionnaire
. . telecom . purpose 0..1 markdown Why this questionnaire is defined
... approvalDate 0..1 date When the questionnaire was approved by publisher
... lastReviewDate 0..1 date When the questionnaire was last reviewed
... effectivePeriod Σ 0..1 Period When the questionnaire is expected to be used
... useContext Σ 0..* ContactPoint UsageContext Context the content is intended to support
... jurisdiction Σ 0..* CodeableConcept Intended jurisdiction for questionnaire (if applicable)
Jurisdiction ValueSet ( Extensible )
... contact Σ 0..* ContactDetail Contact information of details for the publisher
. . . copyright 0..1 markdown Use and/or publishing restrictions
... code Σ 0..* Coding Concept that represents the overall questionnaire
Questionnaire Question Codes ( Example )
... subjectType Σ 0..* code Resource that can be subject of QuestionnaireResponse
ResourceType ( Required )
. . group . item I 0..* BackboneElement Questions and sections within the Questionnaire
Groups may either contain questions or + Read-only can't be specified for "display" items
+ Default values can't be specified for groups but not or display items
+ Required and repeat aren't permitted for display items
+ Only 'choice' items can have options
+ A question cannot have both option and options
+ Display items cannot have a "code" asserted
+ Maximum length can only be declared for simple question types
+ Group items must have nested items, display items cannot have nested items
. . . . linkId 0..1 1..1 string Unique id for item in questionnaire response
. . . title . definition 0..1 string uri ElementDefinition - details for group the item
. . . concept . code Σ I 0..* Coding Corresponding concept for this section item in a questionnaire terminology
Questionnaire Question Codes ( Example )
. . . text . prefix 0..1 string E.g. "1(a)", "2.5.3"
. . . required . text Σ 0..1 boolean string Primary text for the group must be included in data results item
. . . repeats . type 0..1 1..1 boolean code group may repeat | display | boolean | decimal | integer | date | dateTime +
QuestionnaireItemType ( Required )
. . . group . enableWhen ?! Σ I 0..* BackboneElement Only allow data when
+ enableWhen must contain either a 'answer' or a 'hasAnswer' element
. . . . . question 1..1 string Question that determines whether item is enabled
..... hasAnswer I 0..1 BackboneElement boolean Enable when answered or options, not both
. . . . linkId . answer[x] I 0..1 string Value question must have
Questionnaire Answer Codes ( Example )
...... answerBoolean boolean
. . . . concept . . answerDecimal decimal
. . . . . . answerInteger 0..* Coding integer Questionnaire Question Codes ( Example
. . . . . . answerDate date )
. . . . text . . answerDateTime dateTime
. . . . . . answerTime time
. . . . . . answerString 0..1 string
. . . . . . answerUri uri
. . . . type . . answerAttachment Attachment
. . . . . . answerCoding Coding
. . . . . . answerQuantity 0..1 code Quantity AnswerFormat
. . . . . . answerReference Reference ( Required Any )
. . . . required I 0..1 boolean Whether the question item must be answered included in data results
. . . . repeats I 0..1 boolean Whether the question can have multiple answers item may repeat
. . . . readOnly I 0..1 boolean Don't allow human editing
.... maxLength I 0..1 integer No more than this many characters
.... options I 0..1 Reference ( ValueSet ) Valueset containing permitted answers
. . . . option I 0..* Coding BackboneElement Permitted answer
. . . . . value[x] 1..1 Answer value
Questionnaire Answer Codes ( Example )
. . . . group . . valueInteger integer
. . . . . . valueDate date
. . . . . . valueTime time
...... valueString string
...... valueCoding Coding
.... initial[x] I 0..1 Default value when item is first rendered
Questionnaire Answer Codes ( Example )
..... initialBoolean boolean
..... initialDecimal decimal
..... initialInteger integer
..... initialDate date
..... initialDateTime dateTime
..... initialTime time
..... initialString string
..... initialUri uri
..... initialAttachment Attachment
..... initialCoding Coding
..... initialQuantity Quantity
..... initialReference Reference ( Any )
.... item I 0..* see group item Nested questionnaire group items

doco Documentation for this format

UML Diagram ( Legend )

Questionnaire ( DomainResource ) This records identifiers associated with this question set An absolute URI that are defined by business processes and/or is used to refer to it identify this questionnaire when it is referenced in a direct specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. The URL reference to SHOULD include the resource itself major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions) url : uri [0..1] A formal identifier that is not appropriate (e.g. used to identify this questionnaire when it is represented in CDA documents, other formats, or referenced in written / printed documentation) a specification, model, design or an instance identifier : Identifier [0..*] The identifier that is used to identify this version number assigned by the publisher for business reasons. It may remain of the same questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the resource questionnaire author and is updated not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence version : string [0..1] A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation name : string [0..1] A short, descriptive, user-friendly title for the questionnaire title : string [0..1] The lifecycle status of this questionnaire. Enables tracking the questionnaire as a whole life-cycle of the content (this element modifies the meaning of other elements) status : code [1..1] « Lifecycle The lifecycle status of the questionnaire. a Value Set or Concept Map. (Strength=Required) QuestionnaireStatus PublicationStatus ! » A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage (this element modifies the meaning of other elements) experimental : boolean [0..1] The date that this (and optionally time) when the questionnaire was last changed published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes date : dateTime [0..1] Organization The name of the individual or person responsible for developing and maintaining organization that published the questionnaire publisher : string [0..1] A free text natural language description of the questionnaire from a consumer's perspective description : markdown [0..1] Explaination of why this questionnaire is needed and why it has been designed as it has purpose : markdown [0..1] The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage approvalDate : date [0..1] The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date lastReviewDate : date [0..1] The period during which the questionnaire content was or is planned to be in active use effectivePeriod : Period [0..1] The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate questionnaire instances useContext : UsageContext [0..*] A legal or geographic region in which the questionnaire is intended to be used jurisdiction : CodeableConcept [0..*] Countries and regions within which this artifact is targeted for use (Strength=Extensible) Jurisdiction ValueSet + Contact details to assist a user in finding and communicating with the publisher telecom contact : ContactPoint ContactDetail [0..*] Identifies A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire copyright : markdown [0..1] An identifier for this question or group of questions in a particular terminology such as LOINC code : Coding [0..*] Codes for questionnaires, groups and individual questions (Strength=Example) Questionnaire Question ?? The types of subjects that can be the subject of responses created for the questionnaire subjectType : code [0..*] « One of the resource types defined as part of FHIR. (Strength=Required) ResourceType ! » Group Item An identifier that is unique within the Questionnaire allowing linkage to the equivalent group item in a QuestionnaireResponse resource linkId : string [0..1] [1..1] The human-readable name A reference to an [[[ElementDefinition]]] that provides the details for this section of the questionnaire item. If a definition is provided, then the following element values can be inferred from the definition: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * options (ElementDefinition.binding) Any information provided in these elements on a Questionnaire Item overrides the information from the definition title definition : string uri [0..1] Identifies a how A terminology code that corresponds to this group of questions is known in or question (e.g. a particular terminology such as LOINC code from LOINC, which defines many questions and answers) concept code : Coding [0..*] « Codes for groupings of questionnaire questions. questionnaires, groups and individual questions (Strength=Example) Questionnaire Question ?? » Additional text A short label for the a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire prefix : string [0..1] The name of a section, the text of a question or text content for a display purposes item text : string [0..1] If true, The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.) type : code [1..1] Distinguishes groups from questions and display text and indicates data type for questions (Strength=Required) QuestionnaireItemType ! An indication, if true, that the group item must be present and have required questions within it answered. in a "completed" QuestionnaireResponse. If false, the group item may be skipped when answering the questionnaire required : boolean [0..1] Whether An indication, if true, that the group item may occur multiple times in the instance, containing response, collecting multiple answers answers for questions or multiple sets of answers for groups repeats : boolean [0..1] Question An identifier indication, when true, that is unique within the questionnaire allowing linkage value cannot be changed by a human respondent to the equivalent group in a [[[QuestionnaireResponse]]] resource Questionnaire linkId readOnly : string boolean [0..1] Identifies a how this question is known The maximum number of characters that are permitted in the answer to be considered a particular terminology such as LOINC "valid" QuestionnaireResponse concept maxLength : Coding integer [0..*] « [0..1] Codes corresponding A reference to individual questions. (Strength=Example) a value set containing a list of codes representing permitted answers for a "choice" or "open-choice" question Questionnaire Question options : Reference [0..1] ValueSet ?? » The actual question as shown to value that should be defaulted when initially rendering the user to prompt them questionnaire for an answer user input text initial[x] : Type [0..1] boolean | decimal | integer | date | dateTime | time | string [0..1] | uri | Attachment | Coding | Quantity | Reference ( Any ); Allowed values to answer questions. (Strength=Example) Questionnaire Answer ?? EnableWhen The expected format of the answer, e.g. linkId for the type question whose answer (or lack of input (string, integer) or answer) governs whether a (multiple) choice this item is expected enabled type question : code string [0..1] « The expected format of an answer. (Strength=Required) AnswerFormat ! » [1..1] If true, indicates An indication that the question must this item should be answered and have required groups within it also present. If false, enabled only if the specified question and any contained groups may be skipped when answering the questionnaire is answered (hasAnswer=true) or not answered (hasAnswer=false) required hasAnswer : boolean [0..1] If true, An answer that the referenced question may have more than one answer must match in order for the item to be enabled repeats answer[x] : Type [0..1] boolean [0..1] | decimal | integer | date | dateTime | time | string | uri | Attachment | Coding | Quantity | Reference ( Any ); Reference Allowed values to a value set containing a list of codes representing permitted answers for the question answer questions. (Strength=Example) options : Reference [0..1] « ValueSet Questionnaire Answer » ?? Option For a "choice" question, identifies one of the permitted answers for A potential answer that's allowed as the answer to this question option value[x] : Type [1..1] integer | date | time | string | Coding [0..*] « ; Allowed values to answer questions. (Strength=Example) Questionnaire Answer ?? » A sub-group within a group. The ordering of groups within constraint indicating that this group item should only be enabled (displayed/allow answers to be captured) when the specified condition is relevant true (this element modifies the meaning of other elements) group enableWhen [0..*] Nested group, containing nested question for this question. The order One of groups within the permitted answers for a "choice" or "open-choice" question is relevant group option [0..*] Set of questions within this group. The order of Text, questions within the and other groups to be nested beneath a question or group is relevant question item [0..*] A collection of related questions (or further groupings particular question, question grouping or display text that is part of questions) the questionnaire group item [1..1] [0..*]

XML Template

<

<Questionnaire xmlns="http://hl7.org/fhir"> doco

 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <</identifier>
 <
 <
 <
 <
 <</telecom>
 <
 <
  <
  <
  <</concept>
  <
  <
  <
  <</group>
  <
   <
   <</concept>
   <
   <
   <
   <
   <</options>
   <</option>
   <</group>
  </question>
 </group>

 <url value="[uri]"/><!-- 0..1 Logical URI to reference this questionnaire (globally unique) -->
 <identifier><!-- 0..* Identifier Additional identifier for the questionnaire --></identifier>
 <version value="[string]"/><!-- 0..1 Business version of the questionnaire -->
 <name value="[string]"/><!-- 0..1 Name for this questionnaire (computer friendly) -->
 <title value="[string]"/><!-- 0..1 Name for this questionnaire (human friendly) -->
 <status value="[code]"/><!-- 1..1 draft | active | retired | unknown -->
 <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- 0..1 Date this was last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) -->
 <description value="[markdown]"/><!-- 0..1 Natural language description of the questionnaire -->
 <purpose value="[markdown]"/><!-- 0..1 Why this questionnaire is defined -->
 <approvalDate value="[date]"/><!-- 0..1 When the questionnaire was approved by publisher -->
 <lastReviewDate value="[date]"/><!-- 0..1 When the questionnaire was last reviewed -->
 <effectivePeriod><!-- 0..1 Period When the questionnaire is expected to be used --></effectivePeriod>
 <useContext><!-- 0..* UsageContext Context the content is intended to support --></useContext>
 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for questionnaire (if applicable) --></jurisdiction>
 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions -->
 <code><!-- 0..* Coding Concept that represents the overall questionnaire --></code>
 <subjectType value="[code]"/><!-- 0..* Resource that can be subject of QuestionnaireResponse -->
 <item>  <!-- ?? 0..* Questions and sections within the Questionnaire -->
  <linkId value="[string]"/><!-- 1..1 Unique id for item in questionnaire -->
  <definition value="[uri]"/><!-- 0..1 ElementDefinition - details for the item -->
  <code><!-- ?? 0..* Coding Corresponding concept for this item in a terminology --></code>
  <prefix value="[string]"/><!-- 0..1 E.g. "1(a)", "2.5.3" -->
  <text value="[string]"/><!-- 0..1 Primary text for the item -->
  <type value="[code]"/><!-- 1..1 group | display | boolean | decimal | integer | date | dateTime + -->
  <enableWhen>  <!-- 0..* Only allow data when -->
   <question value="[string]"/><!-- 1..1 Question that determines whether item is enabled -->
   <hasAnswer value="[boolean]"/><!-- ?? 0..1 Enable when answered or not -->
   <answer[x]><!-- ?? 0..1 boolean|decimal|integer|date|dateTime|time|string|uri|
     Attachment|Coding|Quantity|Reference(Any) Value question must have --></answer[x]>

  </enableWhen>
  <required value="[boolean]"/><!-- ?? 0..1 Whether the item must be included in data results -->
  <repeats value="[boolean]"/><!-- ?? 0..1 Whether the item may repeat -->
  <readOnly value="[boolean]"/><!-- ?? 0..1 Don't allow human editing -->
  <maxLength value="[integer]"/><!-- ?? 0..1 No more than this many characters -->
  <options><!-- ?? 0..1 Reference(ValueSet) Valueset containing permitted answers --></options>
  <option>  <!-- ?? 0..* Permitted answer -->
   <value[x]><!-- 1..1 integer|date|time|string|Coding Answer value --></value[x]>
  </option>
  <initial[x]><!-- ?? 0..1 boolean|decimal|integer|date|dateTime|time|string|uri|
    Attachment|Coding|Quantity|Reference(Any) Default value when item is first rendered --></initial[x]>

  <item><!-- ?? 0..* Content as for Questionnaire.item Nested questionnaire items --></item>
 </item>

</Questionnaire>

JSON Template

{
  "resourceType" : "",

{doco
  "resourceType" : "Questionnaire",

  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "
  "
  "
  "
  "
  "
  "
  "
    "
    "
    "
    "
    "
    "
    "
    "
      "
      "
      "
      "
      "
      "
      "
      "
      "
    }]
  }

  "url" : "<uri>", // Logical URI to reference this questionnaire (globally unique)
  "identifier" : [{ Identifier }], // Additional identifier for the questionnaire
  "version" : "<string>", // Business version of the questionnaire
  "name" : "<string>", // Name for this questionnaire (computer friendly)
  "title" : "<string>", // Name for this questionnaire (human friendly)
  "status" : "<code>", // R!  draft | active | retired | unknown
  "experimental" : <boolean>, // For testing purposes, not real usage
  "date" : "<dateTime>", // Date this was last changed
  "publisher" : "<string>", // Name of the publisher (organization or individual)
  "description" : "<markdown>", // Natural language description of the questionnaire
  "purpose" : "<markdown>", // Why this questionnaire is defined
  "approvalDate" : "<date>", // When the questionnaire was approved by publisher
  "lastReviewDate" : "<date>", // When the questionnaire was last reviewed
  "effectivePeriod" : { Period }, // When the questionnaire is expected to be used
  "useContext" : [{ UsageContext }], // Context the content is intended to support
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for questionnaire (if applicable)
  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "copyright" : "<markdown>", // Use and/or publishing restrictions
  "code" : [{ Coding }], // Concept that represents the overall questionnaire
  "subjectType" : ["<code>"], // Resource that can be subject of QuestionnaireResponse
  "item" : [{ // C? Questions and sections within the Questionnaire
    "linkId" : "<string>", // R!  Unique id for item in questionnaire
    "definition" : "<uri>", // ElementDefinition - details for the item
    "code" : [{ Coding }], // C? Corresponding concept for this item in a terminology
    "prefix" : "<string>", // E.g. "1(a)", "2.5.3"
    "text" : "<string>", // Primary text for the item
    "type" : "<code>", // R!  group | display | boolean | decimal | integer | date | dateTime +
    "enableWhen" : [{ // Only allow data when
      "question" : "<string>", // R!  Question that determines whether item is enabled
      "hasAnswer" : <boolean>, // C? Enable when answered or not
      // answer[x]: Value question must have. One of these 12:

      "answerBoolean" : <boolean>
      "answerDecimal" : <decimal>
      "answerInteger" : <integer>
      "answerDate" : "<date>"
      "answerDateTime" : "<dateTime>"
      "answerTime" : "<time>"
      "answerString" : "<string>"
      "answerUri" : "<uri>"
      "answerAttachment" : { Attachment }
      "answerCoding" : { Coding }
      "answerQuantity" : { Quantity }
      "answerReference" : { Reference(Any) }
    }],
    "required" : <boolean>, // C? Whether the item must be included in data results
    "repeats" : <boolean>, // C? Whether the item may repeat
    "readOnly" : <boolean>, // C? Don't allow human editing
    "maxLength" : <integer>, // C? No more than this many characters
    "options" : { Reference(ValueSet) }, // C? Valueset containing permitted answers
    "option" : [{ // C? Permitted answer
      // value[x]: Answer value. One of these 5:

      "valueInteger" : <integer>
      "valueDate" : "<date>"
      "valueTime" : "<time>"
      "valueString" : "<string>"
      "valueCoding" : { Coding }
    }],
    // initial[x]: Default value when item is first rendered. One of these 12:

    "initialBoolean" : <boolean>,
    "initialDecimal" : <decimal>,
    "initialInteger" : <integer>,
    "initialDate" : "<date>",
    "initialDateTime" : "<dateTime>",
    "initialTime" : "<time>",
    "initialString" : "<string>",
    "initialUri" : "<uri>",
    "initialAttachment" : { Attachment },
    "initialCoding" : { Coding },
    "initialQuantity" : { Quantity },
    "initialReference" : { Reference(Any) },
    "item" : [{ Content as for Questionnaire.item }] // C? Nested questionnaire items
  }]

}

Turtle Template


@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:Questionnaire;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:Questionnaire.url [ uri ]; # 0..1 Logical URI to reference this questionnaire (globally unique)
  fhir:Questionnaire.identifier [ Identifier ], ... ; # 0..* Additional identifier for the questionnaire
  fhir:Questionnaire.version [ string ]; # 0..1 Business version of the questionnaire
  fhir:Questionnaire.name [ string ]; # 0..1 Name for this questionnaire (computer friendly)
  fhir:Questionnaire.title [ string ]; # 0..1 Name for this questionnaire (human friendly)
  fhir:Questionnaire.status [ code ]; # 1..1 draft | active | retired | unknown
  fhir:Questionnaire.experimental [ boolean ]; # 0..1 For testing purposes, not real usage
  fhir:Questionnaire.date [ dateTime ]; # 0..1 Date this was last changed
  fhir:Questionnaire.publisher [ string ]; # 0..1 Name of the publisher (organization or individual)
  fhir:Questionnaire.description [ markdown ]; # 0..1 Natural language description of the questionnaire
  fhir:Questionnaire.purpose [ markdown ]; # 0..1 Why this questionnaire is defined
  fhir:Questionnaire.approvalDate [ date ]; # 0..1 When the questionnaire was approved by publisher
  fhir:Questionnaire.lastReviewDate [ date ]; # 0..1 When the questionnaire was last reviewed
  fhir:Questionnaire.effectivePeriod [ Period ]; # 0..1 When the questionnaire is expected to be used
  fhir:Questionnaire.useContext [ UsageContext ], ... ; # 0..* Context the content is intended to support
  fhir:Questionnaire.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for questionnaire (if applicable)
  fhir:Questionnaire.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher
  fhir:Questionnaire.copyright [ markdown ]; # 0..1 Use and/or publishing restrictions
  fhir:Questionnaire.code [ Coding ], ... ; # 0..* Concept that represents the overall questionnaire
  fhir:Questionnaire.subjectType [ code ], ... ; # 0..* Resource that can be subject of QuestionnaireResponse
  fhir:Questionnaire.item [ # 0..* Questions and sections within the Questionnaire
    fhir:Questionnaire.item.linkId [ string ]; # 1..1 Unique id for item in questionnaire
    fhir:Questionnaire.item.definition [ uri ]; # 0..1 ElementDefinition - details for the item
    fhir:Questionnaire.item.code [ Coding ], ... ; # 0..* Corresponding concept for this item in a terminology
    fhir:Questionnaire.item.prefix [ string ]; # 0..1 E.g. "1(a)", "2.5.3"
    fhir:Questionnaire.item.text [ string ]; # 0..1 Primary text for the item
    fhir:Questionnaire.item.type [ code ]; # 1..1 group | display | boolean | decimal | integer | date | dateTime +
    fhir:Questionnaire.item.enableWhen [ # 0..* Only allow data when
      fhir:Questionnaire.item.enableWhen.question [ string ]; # 1..1 Question that determines whether item is enabled
      fhir:Questionnaire.item.enableWhen.hasAnswer [ boolean ]; # 0..1 Enable when answered or not
      # Questionnaire.item.enableWhen.answer[x] : 0..1 Value question must have. One of these 12
        fhir:Questionnaire.item.enableWhen.answerBoolean [ boolean ]
        fhir:Questionnaire.item.enableWhen.answerDecimal [ decimal ]
        fhir:Questionnaire.item.enableWhen.answerInteger [ integer ]
        fhir:Questionnaire.item.enableWhen.answerDate [ date ]
        fhir:Questionnaire.item.enableWhen.answerDateTime [ dateTime ]
        fhir:Questionnaire.item.enableWhen.answerTime [ time ]
        fhir:Questionnaire.item.enableWhen.answerString [ string ]
        fhir:Questionnaire.item.enableWhen.answerUri [ uri ]
        fhir:Questionnaire.item.enableWhen.answerAttachment [ Attachment ]
        fhir:Questionnaire.item.enableWhen.answerCoding [ Coding ]
        fhir:Questionnaire.item.enableWhen.answerQuantity [ Quantity ]
        fhir:Questionnaire.item.enableWhen.answerReference [ Reference(Any) ]
    ], ...;
    fhir:Questionnaire.item.required [ boolean ]; # 0..1 Whether the item must be included in data results
    fhir:Questionnaire.item.repeats [ boolean ]; # 0..1 Whether the item may repeat
    fhir:Questionnaire.item.readOnly [ boolean ]; # 0..1 Don't allow human editing
    fhir:Questionnaire.item.maxLength [ integer ]; # 0..1 No more than this many characters
    fhir:Questionnaire.item.options [ Reference(ValueSet) ]; # 0..1 Valueset containing permitted answers
    fhir:Questionnaire.item.option [ # 0..* Permitted answer
      # Questionnaire.item.option.value[x] : 1..1 Answer value. One of these 5
        fhir:Questionnaire.item.option.valueInteger [ integer ]
        fhir:Questionnaire.item.option.valueDate [ date ]
        fhir:Questionnaire.item.option.valueTime [ time ]
        fhir:Questionnaire.item.option.valueString [ string ]
        fhir:Questionnaire.item.option.valueCoding [ Coding ]
    ], ...;
    # Questionnaire.item.initial[x] : 0..1 Default value when item is first rendered. One of these 12
      fhir:Questionnaire.item.initialBoolean [ boolean ]
      fhir:Questionnaire.item.initialDecimal [ decimal ]
      fhir:Questionnaire.item.initialInteger [ integer ]
      fhir:Questionnaire.item.initialDate [ date ]
      fhir:Questionnaire.item.initialDateTime [ dateTime ]
      fhir:Questionnaire.item.initialTime [ time ]
      fhir:Questionnaire.item.initialString [ string ]
      fhir:Questionnaire.item.initialUri [ uri ]
      fhir:Questionnaire.item.initialAttachment [ Attachment ]
      fhir:Questionnaire.item.initialCoding [ Coding ]
      fhir:Questionnaire.item.initialQuantity [ Quantity ]
      fhir:Questionnaire.item.initialReference [ Reference(Any) ]
    fhir:Questionnaire.item.item [ See Questionnaire.item ], ... ; # 0..* Nested questionnaire items
  ], ...;
]

Changes since DSTU2

Questionnaire
Questionnaire.url
  • Added Element
Questionnaire.name
  • Added Element
Questionnaire.title
  • Added Element
Questionnaire.status
  • Change value set from http://hl7.org/fhir/ValueSet/questionnaire-status to http://hl7.org/fhir/ValueSet/publication-status
Questionnaire.experimental
  • Added Element
Questionnaire.description
  • Added Element
Questionnaire.purpose
  • Added Element
Questionnaire.approvalDate
  • Added Element
Questionnaire.lastReviewDate
  • Added Element
Questionnaire.effectivePeriod
  • Added Element
Questionnaire.useContext
  • Added Element
Questionnaire.jurisdiction
  • Added Element
Questionnaire.contact
  • Added Element
Questionnaire.copyright
  • Added Element
Questionnaire.code
  • Added Element
Questionnaire.item
  • Renamed from group to item
  • Min Cardinality changed from 1 to 0
  • Max Cardinality changed from 1 to *
Questionnaire.item.linkId
  • Min Cardinality changed from 0 to 1
Questionnaire.item.definition
  • Added Element
Questionnaire.item.code
  • Added Element
Questionnaire.item.prefix
  • Added Element
Questionnaire.item.type
  • Added Element
Questionnaire.item.enableWhen
  • Added Element
Questionnaire.item.enableWhen.question
  • Added Element
Questionnaire.item.enableWhen.hasAnswer
  • Added Element
Questionnaire.item.enableWhen.answer[x]
  • Added Element
Questionnaire.item.readOnly
  • Added Element
Questionnaire.item.maxLength
  • Added Element
Questionnaire.item.options
  • Added Element
Questionnaire.item.option
  • Added Element
Questionnaire.item.option.value[x]
  • Added Element
Questionnaire.item.initial[x]
  • Added Element
Questionnaire.item.item
  • Added Element
Questionnaire.telecom
  • deleted
Questionnaire.group.title
  • deleted
Questionnaire.group.concept
  • deleted
Questionnaire.group.group
  • deleted
Questionnaire.group.question
  • deleted

See the Full Difference for further information

This analysis is available as XML or JSON .

See R2 <--> R3 Conversion Maps (status = 6 tests that all execute ok. 4 fail round-trip testing and 5 r3 resources are invalid (109 errors). ).

Structure

External identifiers Logical identifier for this Organization/individual who designed Σ 1..1 Grouped questions To link questionnaire with Σ Name to be displayed Concept that represents Additional text for the group Whether Whether the see group Nested questionnaire group 0..* Questions in this group A question must use either option To link questionnaire with questionnaire response Concept that represents this question on a questionnaire Text of the question as it is shown to the user boolean | decimal | integer | date | dateTime +
Name Flags Card. Type Description & Constraints doco
. . Questionnaire I DomainResource A structured set of questions
If root group must be "required" + The link ids for groups and questions must be unique within the questionnaire
Elements defined in Ancestors: id , meta , implicitRules , language , text , contained , extension , modifierExtension
. . . url Σ 0..1 uri Logical URI to reference this questionnaire (globally unique)
... identifier Σ 0..* Identifier Additional identifier for this the questionnaire
. . . version Σ 0..1 string Business version of Questionnaire the questionnaire
. . . name Σ 0..1 string Name for this questionnaire (computer friendly)
... title Σ 0..1 string Name for this questionnaire (human friendly)
... status ?! Σ 1..1 code draft | published active | retired | unknown
QuestionnaireStatus PublicationStatus ( Required )
. . . experimental ?! Σ 0..1 boolean For testing purposes, not real usage
... date Σ 0..1 dateTime Date this version was authored last changed
. . . publisher Σ 0..1 string Name of the publisher (organization or individual)
... description 0..1 markdown Natural language description of the questionnaire
. . telecom . purpose 0..1 markdown Why this questionnaire is defined
... approvalDate 0..1 date When the questionnaire was approved by publisher
... lastReviewDate 0..1 date When the questionnaire was last reviewed
... effectivePeriod Σ 0..1 Period When the questionnaire is expected to be used
... useContext Σ 0..* ContactPoint UsageContext Context the content is intended to support
... jurisdiction Σ 0..* CodeableConcept Intended jurisdiction for questionnaire (if applicable)
Jurisdiction ValueSet ( Extensible )
... contact Σ 0..* ContactDetail Contact information of details for the publisher
. . . copyright 0..1 markdown Use and/or publishing restrictions
... code Σ 0..* Coding Concept that represents the overall questionnaire
Questionnaire Question Codes ( Example )
... subjectType Σ 0..* code Resource that can be subject of QuestionnaireResponse
ResourceType ( Required )
. . group . item I 0..* BackboneElement Questions and sections within the Questionnaire
Groups may either contain questions or + Read-only can't be specified for "display" items
+ Default values can't be specified for groups but not or display items
+ Required and repeat aren't permitted for display items
+ Only 'choice' items can have options
+ A question cannot have both option and options
+ Display items cannot have a "code" asserted
+ Maximum length can only be declared for simple question types
+ Group items must have nested items, display items cannot have nested items
. . . . linkId 0..1 1..1 string Unique id for item in questionnaire response
. . . title . definition 0..1 string uri ElementDefinition - details for group the item
. . . concept . code Σ I 0..* Coding Corresponding concept for this section item in a questionnaire terminology
Questionnaire Question Codes ( Example )
. . . text . prefix 0..1 string E.g. "1(a)", "2.5.3"
. . . required . text Σ 0..1 boolean string Primary text for the group must be included in data results item
. . . repeats . type 0..1 1..1 boolean code group may repeat | display | boolean | decimal | integer | date | dateTime +
QuestionnaireItemType ( Required )
. . . group . enableWhen ?! Σ I 0..* BackboneElement Only allow data when
+ enableWhen must contain either a 'answer' or a 'hasAnswer' element
. . . . . question 1..1 string Question that determines whether item is enabled
..... hasAnswer I 0..1 BackboneElement boolean Enable when answered or options, not both
. . . . linkId . answer[x] I 0..1 string Value question must have
Questionnaire Answer Codes ( Example )
...... answerBoolean boolean
. . . . concept . . answerDecimal decimal
. . . . . . answerInteger 0..* Coding integer Questionnaire Question Codes ( Example
. . . . . . answerDate date )
. . . . text . . answerDateTime dateTime
. . . . . . answerTime time
. . . . . . answerString 0..1 string
. . . . . . answerUri uri
. . . . type . . answerAttachment Attachment
. . . . . . answerCoding Coding
. . . . . . answerQuantity 0..1 code Quantity AnswerFormat
. . . . . . answerReference Reference ( Required Any )
. . . . required I 0..1 boolean Whether the question item must be answered included in data results
. . . . repeats I 0..1 boolean Whether the question can have multiple answers item may repeat
. . . . readOnly I 0..1 boolean Don't allow human editing
.... maxLength I 0..1 integer No more than this many characters
.... options I 0..1 Reference ( ValueSet ) Valueset containing permitted answers
. . . . option I 0..* Coding BackboneElement Permitted answer
. . . . . value[x] 1..1 Answer value
Questionnaire Answer Codes ( Example )
. . . . group . . valueInteger integer
. . . . . . valueDate date
. . . . . . valueTime time
...... valueString string
...... valueCoding Coding
.... initial[x] I 0..1 Default value when item is first rendered
Questionnaire Answer Codes ( Example )
..... initialBoolean boolean
..... initialDecimal decimal
..... initialInteger integer
..... initialDate date
..... initialDateTime dateTime
..... initialTime time
..... initialString string
..... initialUri uri
..... initialAttachment Attachment
..... initialCoding Coding
..... initialQuantity Quantity
..... initialReference Reference ( Any )
.... item I 0..* see group item Nested questionnaire group items

doco Documentation for this format

UML Diagram ( Legend )

Questionnaire ( DomainResource ) This records identifiers associated with this question set An absolute URI that are defined by business processes and/or is used to refer to it identify this questionnaire when it is referenced in a direct specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this questionnaire is (or will be) published. The URL reference to SHOULD include the resource itself major version of the questionnaire. For more information see [Technical and Business Versions](resource.html#versions) url : uri [0..1] A formal identifier that is not appropriate (e.g. used to identify this questionnaire when it is represented in CDA documents, other formats, or referenced in written / printed documentation) a specification, model, design or an instance identifier : Identifier [0..*] The identifier that is used to identify this version number assigned by the publisher for business reasons. It may remain of the same questionnaire when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the resource questionnaire author and is updated not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence version : string [0..1] A natural language name identifying the questionnaire. This name should be usable as an identifier for the module by machine processing applications such as code generation name : string [0..1] A short, descriptive, user-friendly title for the questionnaire title : string [0..1] The lifecycle status of this questionnaire. Enables tracking the questionnaire as a whole life-cycle of the content (this element modifies the meaning of other elements) status : code [1..1] « Lifecycle The lifecycle status of the questionnaire. a Value Set or Concept Map. (Strength=Required) QuestionnaireStatus PublicationStatus ! » A boolean value to indicate that this questionnaire is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage (this element modifies the meaning of other elements) experimental : boolean [0..1] The date that this (and optionally time) when the questionnaire was last changed published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the questionnaire changes date : dateTime [0..1] Organization The name of the individual or person responsible for developing and maintaining organization that published the questionnaire publisher : string [0..1] A free text natural language description of the questionnaire from a consumer's perspective description : markdown [0..1] Explaination of why this questionnaire is needed and why it has been designed as it has purpose : markdown [0..1] The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage approvalDate : date [0..1] The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date lastReviewDate : date [0..1] The period during which the questionnaire content was or is planned to be in active use effectivePeriod : Period [0..1] The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate questionnaire instances useContext : UsageContext [0..*] A legal or geographic region in which the questionnaire is intended to be used jurisdiction : CodeableConcept [0..*] Countries and regions within which this artifact is targeted for use (Strength=Extensible) Jurisdiction ValueSet + Contact details to assist a user in finding and communicating with the publisher telecom contact : ContactPoint ContactDetail [0..*] Identifies A copyright statement relating to the questionnaire and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the questionnaire copyright : markdown [0..1] An identifier for this question or group of questions in a particular terminology such as LOINC code : Coding [0..*] Codes for questionnaires, groups and individual questions (Strength=Example) Questionnaire Question ?? The types of subjects that can be the subject of responses created for the questionnaire subjectType : code [0..*] « One of the resource types defined as part of FHIR. (Strength=Required) ResourceType ! » Group Item An identifier that is unique within the Questionnaire allowing linkage to the equivalent group item in a QuestionnaireResponse resource linkId : string [0..1] [1..1] The human-readable name A reference to an [[[ElementDefinition]]] that provides the details for this section of the questionnaire item. If a definition is provided, then the following element values can be inferred from the definition: * code (ElementDefinition.code) * type (ElementDefinition.type) * required (ElementDefinition.min) * repeats (ElementDefinition.max) * maxLength (ElementDefinition.maxLength) * options (ElementDefinition.binding) Any information provided in these elements on a Questionnaire Item overrides the information from the definition title definition : string uri [0..1] Identifies a how A terminology code that corresponds to this group of questions is known in or question (e.g. a particular terminology such as LOINC code from LOINC, which defines many questions and answers) concept code : Coding [0..*] « Codes for groupings of questionnaire questions. questionnaires, groups and individual questions (Strength=Example) Questionnaire Question ?? » Additional text A short label for the a particular group, question or set of display text within the questionnaire used for reference by the individual completing the questionnaire prefix : string [0..1] The name of a section, the text of a question or text content for a display purposes item text : string [0..1] If true, The type of questionnaire item this is - whether text for display, a grouping of other items or a particular type of data to be captured (string, integer, coded choice, etc.) type : code [1..1] Distinguishes groups from questions and display text and indicates data type for questions (Strength=Required) QuestionnaireItemType ! An indication, if true, that the group item must be present and have required questions within it answered. in a "completed" QuestionnaireResponse. If false, the group item may be skipped when answering the questionnaire required : boolean [0..1] Whether An indication, if true, that the group item may occur multiple times in the instance, containing response, collecting multiple answers answers for questions or multiple sets of answers for groups repeats : boolean [0..1] Question An identifier indication, when true, that is unique within the questionnaire allowing linkage value cannot be changed by a human respondent to the equivalent group in a [[[QuestionnaireResponse]]] resource Questionnaire linkId readOnly : string boolean [0..1] Identifies a how this question is known The maximum number of characters that are permitted in the answer to be considered a particular terminology such as LOINC "valid" QuestionnaireResponse concept maxLength : Coding integer [0..*] « [0..1] Codes corresponding A reference to individual questions. (Strength=Example) a value set containing a list of codes representing permitted answers for a "choice" or "open-choice" question Questionnaire Question options : Reference [0..1] ValueSet ?? » The actual question as shown to value that should be defaulted when initially rendering the user to prompt them questionnaire for an answer user input text initial[x] : Type [0..1] boolean | decimal | integer | date | dateTime | time | string [0..1] | uri | Attachment | Coding | Quantity | Reference ( Any ); Allowed values to answer questions. (Strength=Example) Questionnaire Answer ?? EnableWhen The expected format of the answer, e.g. linkId for the type question whose answer (or lack of input (string, integer) or answer) governs whether a (multiple) choice this item is expected enabled type question : code string [0..1] « The expected format of an answer. (Strength=Required) AnswerFormat ! » [1..1] If true, indicates An indication that the question must this item should be answered and have required groups within it also present. If false, enabled only if the specified question and any contained groups may be skipped when answering the questionnaire is answered (hasAnswer=true) or not answered (hasAnswer=false) required hasAnswer : boolean [0..1] If true, An answer that the referenced question may have more than one answer must match in order for the item to be enabled repeats answer[x] : Type [0..1] boolean [0..1] | decimal | integer | date | dateTime | time | string | uri | Attachment | Coding | Quantity | Reference ( Any ); Reference Allowed values to a value set containing a list of codes representing permitted answers for the question answer questions. (Strength=Example) options : Reference [0..1] « ValueSet Questionnaire Answer » ?? Option For a "choice" question, identifies one of the permitted answers for A potential answer that's allowed as the answer to this question option value[x] : Type [1..1] integer | date | time | string | Coding [0..*] « ; Allowed values to answer questions. (Strength=Example) Questionnaire Answer ?? » A sub-group within a group. The ordering of groups within constraint indicating that this group item should only be enabled (displayed/allow answers to be captured) when the specified condition is relevant true (this element modifies the meaning of other elements) group enableWhen [0..*] Nested group, containing nested question for this question. The order One of groups within the permitted answers for a "choice" or "open-choice" question is relevant group option [0..*] Set of questions within this group. The order of Text, questions within the and other groups to be nested beneath a question or group is relevant question item [0..*] A collection of related questions (or further groupings particular question, question grouping or display text that is part of questions) the questionnaire group item [1..1] [0..*]

XML Template

<

<Questionnaire xmlns="http://hl7.org/fhir"> doco

 <!-- from Resource: id, meta, implicitRules, and language -->
 <!-- from DomainResource: text, contained, extension, and modifierExtension -->
 <</identifier>
 <
 <
 <
 <
 <</telecom>
 <
 <
  <
  <
  <</concept>
  <
  <
  <
  <</group>
  <
   <
   <</concept>
   <
   <
   <
   <
   <</options>
   <</option>
   <</group>
  </question>
 </group>

 <url value="[uri]"/><!-- 0..1 Logical URI to reference this questionnaire (globally unique) -->
 <identifier><!-- 0..* Identifier Additional identifier for the questionnaire --></identifier>
 <version value="[string]"/><!-- 0..1 Business version of the questionnaire -->
 <name value="[string]"/><!-- 0..1 Name for this questionnaire (computer friendly) -->
 <title value="[string]"/><!-- 0..1 Name for this questionnaire (human friendly) -->
 <status value="[code]"/><!-- 1..1 draft | active | retired | unknown -->
 <experimental value="[boolean]"/><!-- 0..1 For testing purposes, not real usage -->
 <date value="[dateTime]"/><!-- 0..1 Date this was last changed -->
 <publisher value="[string]"/><!-- 0..1 Name of the publisher (organization or individual) -->
 <description value="[markdown]"/><!-- 0..1 Natural language description of the questionnaire -->
 <purpose value="[markdown]"/><!-- 0..1 Why this questionnaire is defined -->
 <approvalDate value="[date]"/><!-- 0..1 When the questionnaire was approved by publisher -->
 <lastReviewDate value="[date]"/><!-- 0..1 When the questionnaire was last reviewed -->
 <effectivePeriod><!-- 0..1 Period When the questionnaire is expected to be used --></effectivePeriod>
 <useContext><!-- 0..* UsageContext Context the content is intended to support --></useContext>
 <jurisdiction><!-- 0..* CodeableConcept Intended jurisdiction for questionnaire (if applicable) --></jurisdiction>
 <contact><!-- 0..* ContactDetail Contact details for the publisher --></contact>
 <copyright value="[markdown]"/><!-- 0..1 Use and/or publishing restrictions -->
 <code><!-- 0..* Coding Concept that represents the overall questionnaire --></code>
 <subjectType value="[code]"/><!-- 0..* Resource that can be subject of QuestionnaireResponse -->
 <item>  <!-- ?? 0..* Questions and sections within the Questionnaire -->
  <linkId value="[string]"/><!-- 1..1 Unique id for item in questionnaire -->
  <definition value="[uri]"/><!-- 0..1 ElementDefinition - details for the item -->
  <code><!-- ?? 0..* Coding Corresponding concept for this item in a terminology --></code>
  <prefix value="[string]"/><!-- 0..1 E.g. "1(a)", "2.5.3" -->
  <text value="[string]"/><!-- 0..1 Primary text for the item -->
  <type value="[code]"/><!-- 1..1 group | display | boolean | decimal | integer | date | dateTime + -->
  <enableWhen>  <!-- 0..* Only allow data when -->
   <question value="[string]"/><!-- 1..1 Question that determines whether item is enabled -->
   <hasAnswer value="[boolean]"/><!-- ?? 0..1 Enable when answered or not -->
   <answer[x]><!-- ?? 0..1 boolean|decimal|integer|date|dateTime|time|string|uri|
     Attachment|Coding|Quantity|Reference(Any) Value question must have --></answer[x]>

  </enableWhen>
  <required value="[boolean]"/><!-- ?? 0..1 Whether the item must be included in data results -->
  <repeats value="[boolean]"/><!-- ?? 0..1 Whether the item may repeat -->
  <readOnly value="[boolean]"/><!-- ?? 0..1 Don't allow human editing -->
  <maxLength value="[integer]"/><!-- ?? 0..1 No more than this many characters -->
  <options><!-- ?? 0..1 Reference(ValueSet) Valueset containing permitted answers --></options>
  <option>  <!-- ?? 0..* Permitted answer -->
   <value[x]><!-- 1..1 integer|date|time|string|Coding Answer value --></value[x]>
  </option>
  <initial[x]><!-- ?? 0..1 boolean|decimal|integer|date|dateTime|time|string|uri|
    Attachment|Coding|Quantity|Reference(Any) Default value when item is first rendered --></initial[x]>

  <item><!-- ?? 0..* Content as for Questionnaire.item Nested questionnaire items --></item>
 </item>

</Questionnaire>

JSON Template

{
  "resourceType" : "",

{doco
  "resourceType" : "Questionnaire",

  // from Resource: id, meta, implicitRules, and language
  // from DomainResource: text, contained, extension, and modifierExtension
  "
  "
  "
  "
  "
  "
  "
  "
    "
    "
    "
    "
    "
    "
    "
    "
      "
      "
      "
      "
      "
      "
      "
      "
      "
    }]
  }

  "url" : "<uri>", // Logical URI to reference this questionnaire (globally unique)
  "identifier" : [{ Identifier }], // Additional identifier for the questionnaire
  "version" : "<string>", // Business version of the questionnaire
  "name" : "<string>", // Name for this questionnaire (computer friendly)
  "title" : "<string>", // Name for this questionnaire (human friendly)
  "status" : "<code>", // R!  draft | active | retired | unknown
  "experimental" : <boolean>, // For testing purposes, not real usage
  "date" : "<dateTime>", // Date this was last changed
  "publisher" : "<string>", // Name of the publisher (organization or individual)
  "description" : "<markdown>", // Natural language description of the questionnaire
  "purpose" : "<markdown>", // Why this questionnaire is defined
  "approvalDate" : "<date>", // When the questionnaire was approved by publisher
  "lastReviewDate" : "<date>", // When the questionnaire was last reviewed
  "effectivePeriod" : { Period }, // When the questionnaire is expected to be used
  "useContext" : [{ UsageContext }], // Context the content is intended to support
  "jurisdiction" : [{ CodeableConcept }], // Intended jurisdiction for questionnaire (if applicable)
  "contact" : [{ ContactDetail }], // Contact details for the publisher
  "copyright" : "<markdown>", // Use and/or publishing restrictions
  "code" : [{ Coding }], // Concept that represents the overall questionnaire
  "subjectType" : ["<code>"], // Resource that can be subject of QuestionnaireResponse
  "item" : [{ // C? Questions and sections within the Questionnaire
    "linkId" : "<string>", // R!  Unique id for item in questionnaire
    "definition" : "<uri>", // ElementDefinition - details for the item
    "code" : [{ Coding }], // C? Corresponding concept for this item in a terminology
    "prefix" : "<string>", // E.g. "1(a)", "2.5.3"
    "text" : "<string>", // Primary text for the item
    "type" : "<code>", // R!  group | display | boolean | decimal | integer | date | dateTime +
    "enableWhen" : [{ // Only allow data when
      "question" : "<string>", // R!  Question that determines whether item is enabled
      "hasAnswer" : <boolean>, // C? Enable when answered or not
      // answer[x]: Value question must have. One of these 12:

      "answerBoolean" : <boolean>
      "answerDecimal" : <decimal>
      "answerInteger" : <integer>
      "answerDate" : "<date>"
      "answerDateTime" : "<dateTime>"
      "answerTime" : "<time>"
      "answerString" : "<string>"
      "answerUri" : "<uri>"
      "answerAttachment" : { Attachment }
      "answerCoding" : { Coding }
      "answerQuantity" : { Quantity }
      "answerReference" : { Reference(Any) }
    }],
    "required" : <boolean>, // C? Whether the item must be included in data results
    "repeats" : <boolean>, // C? Whether the item may repeat
    "readOnly" : <boolean>, // C? Don't allow human editing
    "maxLength" : <integer>, // C? No more than this many characters
    "options" : { Reference(ValueSet) }, // C? Valueset containing permitted answers
    "option" : [{ // C? Permitted answer
      // value[x]: Answer value. One of these 5:

      "valueInteger" : <integer>
      "valueDate" : "<date>"
      "valueTime" : "<time>"
      "valueString" : "<string>"
      "valueCoding" : { Coding }
    }],
    // initial[x]: Default value when item is first rendered. One of these 12:

    "initialBoolean" : <boolean>,
    "initialDecimal" : <decimal>,
    "initialInteger" : <integer>,
    "initialDate" : "<date>",
    "initialDateTime" : "<dateTime>",
    "initialTime" : "<time>",
    "initialString" : "<string>",
    "initialUri" : "<uri>",
    "initialAttachment" : { Attachment },
    "initialCoding" : { Coding },
    "initialQuantity" : { Quantity },
    "initialReference" : { Reference(Any) },
    "item" : [{ Content as for Questionnaire.item }] // C? Nested questionnaire items
  }]

}

Turtle Template


@prefix fhir: <http://hl7.org/fhir/> .doco


[ a fhir:Questionnaire;
  fhir:nodeRole fhir:treeRoot; # if this is the parser root

  # from Resource: .id, .meta, .implicitRules, and .language
  # from DomainResource: .text, .contained, .extension, and .modifierExtension
  fhir:Questionnaire.url [ uri ]; # 0..1 Logical URI to reference this questionnaire (globally unique)
  fhir:Questionnaire.identifier [ Identifier ], ... ; # 0..* Additional identifier for the questionnaire
  fhir:Questionnaire.version [ string ]; # 0..1 Business version of the questionnaire
  fhir:Questionnaire.name [ string ]; # 0..1 Name for this questionnaire (computer friendly)
  fhir:Questionnaire.title [ string ]; # 0..1 Name for this questionnaire (human friendly)
  fhir:Questionnaire.status [ code ]; # 1..1 draft | active | retired | unknown
  fhir:Questionnaire.experimental [ boolean ]; # 0..1 For testing purposes, not real usage
  fhir:Questionnaire.date [ dateTime ]; # 0..1 Date this was last changed
  fhir:Questionnaire.publisher [ string ]; # 0..1 Name of the publisher (organization or individual)
  fhir:Questionnaire.description [ markdown ]; # 0..1 Natural language description of the questionnaire
  fhir:Questionnaire.purpose [ markdown ]; # 0..1 Why this questionnaire is defined
  fhir:Questionnaire.approvalDate [ date ]; # 0..1 When the questionnaire was approved by publisher
  fhir:Questionnaire.lastReviewDate [ date ]; # 0..1 When the questionnaire was last reviewed
  fhir:Questionnaire.effectivePeriod [ Period ]; # 0..1 When the questionnaire is expected to be used
  fhir:Questionnaire.useContext [ UsageContext ], ... ; # 0..* Context the content is intended to support
  fhir:Questionnaire.jurisdiction [ CodeableConcept ], ... ; # 0..* Intended jurisdiction for questionnaire (if applicable)
  fhir:Questionnaire.contact [ ContactDetail ], ... ; # 0..* Contact details for the publisher
  fhir:Questionnaire.copyright [ markdown ]; # 0..1 Use and/or publishing restrictions
  fhir:Questionnaire.code [ Coding ], ... ; # 0..* Concept that represents the overall questionnaire
  fhir:Questionnaire.subjectType [ code ], ... ; # 0..* Resource that can be subject of QuestionnaireResponse
  fhir:Questionnaire.item [ # 0..* Questions and sections within the Questionnaire
    fhir:Questionnaire.item.linkId [ string ]; # 1..1 Unique id for item in questionnaire
    fhir:Questionnaire.item.definition [ uri ]; # 0..1 ElementDefinition - details for the item
    fhir:Questionnaire.item.code [ Coding ], ... ; # 0..* Corresponding concept for this item in a terminology
    fhir:Questionnaire.item.prefix [ string ]; # 0..1 E.g. "1(a)", "2.5.3"
    fhir:Questionnaire.item.text [ string ]; # 0..1 Primary text for the item
    fhir:Questionnaire.item.type [ code ]; # 1..1 group | display | boolean | decimal | integer | date | dateTime +
    fhir:Questionnaire.item.enableWhen [ # 0..* Only allow data when
      fhir:Questionnaire.item.enableWhen.question [ string ]; # 1..1 Question that determines whether item is enabled
      fhir:Questionnaire.item.enableWhen.hasAnswer [ boolean ]; # 0..1 Enable when answered or not
      # Questionnaire.item.enableWhen.answer[x] : 0..1 Value question must have. One of these 12
        fhir:Questionnaire.item.enableWhen.answerBoolean [ boolean ]
        fhir:Questionnaire.item.enableWhen.answerDecimal [ decimal ]
        fhir:Questionnaire.item.enableWhen.answerInteger [ integer ]
        fhir:Questionnaire.item.enableWhen.answerDate [ date ]
        fhir:Questionnaire.item.enableWhen.answerDateTime [ dateTime ]
        fhir:Questionnaire.item.enableWhen.answerTime [ time ]
        fhir:Questionnaire.item.enableWhen.answerString [ string ]
        fhir:Questionnaire.item.enableWhen.answerUri [ uri ]
        fhir:Questionnaire.item.enableWhen.answerAttachment [ Attachment ]
        fhir:Questionnaire.item.enableWhen.answerCoding [ Coding ]
        fhir:Questionnaire.item.enableWhen.answerQuantity [ Quantity ]
        fhir:Questionnaire.item.enableWhen.answerReference [ Reference(Any) ]
    ], ...;
    fhir:Questionnaire.item.required [ boolean ]; # 0..1 Whether the item must be included in data results
    fhir:Questionnaire.item.repeats [ boolean ]; # 0..1 Whether the item may repeat
    fhir:Questionnaire.item.readOnly [ boolean ]; # 0..1 Don't allow human editing
    fhir:Questionnaire.item.maxLength [ integer ]; # 0..1 No more than this many characters
    fhir:Questionnaire.item.options [ Reference(ValueSet) ]; # 0..1 Valueset containing permitted answers
    fhir:Questionnaire.item.option [ # 0..* Permitted answer
      # Questionnaire.item.option.value[x] : 1..1 Answer value. One of these 5
        fhir:Questionnaire.item.option.valueInteger [ integer ]
        fhir:Questionnaire.item.option.valueDate [ date ]
        fhir:Questionnaire.item.option.valueTime [ time ]
        fhir:Questionnaire.item.option.valueString [ string ]
        fhir:Questionnaire.item.option.valueCoding [ Coding ]
    ], ...;
    # Questionnaire.item.initial[x] : 0..1 Default value when item is first rendered. One of these 12
      fhir:Questionnaire.item.initialBoolean [ boolean ]
      fhir:Questionnaire.item.initialDecimal [ decimal ]
      fhir:Questionnaire.item.initialInteger [ integer ]
      fhir:Questionnaire.item.initialDate [ date ]
      fhir:Questionnaire.item.initialDateTime [ dateTime ]
      fhir:Questionnaire.item.initialTime [ time ]
      fhir:Questionnaire.item.initialString [ string ]
      fhir:Questionnaire.item.initialUri [ uri ]
      fhir:Questionnaire.item.initialAttachment [ Attachment ]
      fhir:Questionnaire.item.initialCoding [ Coding ]
      fhir:Questionnaire.item.initialQuantity [ Quantity ]
      fhir:Questionnaire.item.initialReference [ Reference(Any) ]
    fhir:Questionnaire.item.item [ See Questionnaire.item ], ... ; # 0..* Nested questionnaire items
  ], ...;
]

Changes since DSTU2

Questionnaire
Questionnaire.url
  • Added Element
Questionnaire.name
  • Added Element
Questionnaire.title
  • Added Element
Questionnaire.status
  • Change value set from http://hl7.org/fhir/ValueSet/questionnaire-status to http://hl7.org/fhir/ValueSet/publication-status
Questionnaire.experimental
  • Added Element
Questionnaire.description
  • Added Element
Questionnaire.purpose
  • Added Element
Questionnaire.approvalDate
  • Added Element
Questionnaire.lastReviewDate
  • Added Element
Questionnaire.effectivePeriod
  • Added Element
Questionnaire.useContext
  • Added Element
Questionnaire.jurisdiction
  • Added Element
Questionnaire.contact
  • Added Element
Questionnaire.copyright
  • Added Element
Questionnaire.code
  • Added Element
Questionnaire.item
  • Renamed from group to item
  • Min Cardinality changed from 1 to 0
  • Max Cardinality changed from 1 to *
Questionnaire.item.linkId
  • Min Cardinality changed from 0 to 1
Questionnaire.item.definition
  • Added Element
Questionnaire.item.code
  • Added Element
Questionnaire.item.prefix
  • Added Element
Questionnaire.item.type
  • Added Element
Questionnaire.item.enableWhen
  • Added Element
Questionnaire.item.enableWhen.question
  • Added Element
Questionnaire.item.enableWhen.hasAnswer
  • Added Element
Questionnaire.item.enableWhen.answer[x]
  • Added Element
Questionnaire.item.readOnly
  • Added Element
Questionnaire.item.maxLength
  • Added Element
Questionnaire.item.options
  • Added Element
Questionnaire.item.option
  • Added Element
Questionnaire.item.option.value[x]
  • Added Element
Questionnaire.item.initial[x]
  • Added Element
Questionnaire.item.item
  • Added Element
Questionnaire.telecom
  • deleted
Questionnaire.group.title
  • deleted
Questionnaire.group.concept
  • deleted
Questionnaire.group.group
  • deleted
Questionnaire.group.question
  • deleted

See the Full Difference for further information

This analysis is available as XML or JSON .

See R2 <--> R3 Conversion Maps (status = 6 tests that all execute ok. 4 fail round-trip testing and 5 r3 resources are invalid (109 errors). ).

   

Alternate definitions: Schema / Schematron , Resource Profile Master Definition ( XML , JSON ), Questionnaire XML Schema / Schematron (for ) + JSON Schema , ShEx (for Turtle )

Questionnaire.subjectType Questionnaire.group.concept Questionnaire.group.question.concept Questionnaire.group.question.type Questionnaire.group.question.option
Path Definition Type Reference
Questionnaire.status Lifecycle The lifecycle status of the questionnaire. a Value Set or Concept Map. Required QuestionnaireStatus PublicationStatus
Questionnaire.jurisdiction One of the resource types defined as part of FHIR. Countries and regions within which this artifact is targeted for use Required Extensible http://hl7.org/fhir/valueset/resource-types ResourceType Jurisdiction ValueSet
Questionnaire.code
Questionnaire.item.code
Codes for groupings of questionnaire questions. questionnaires, groups and individual questions Example Questionnaire Question Codes
Questionnaire.subjectType Codes corresponding to individual questions. One of the resource types defined as part of FHIR. Example Required Questionnaire Question Codes Resource Types
Questionnaire.item.type The expected format of an answer. Distinguishes groups from questions and display text and indicates data type for questions Required AnswerFormat QuestionnaireItemType
Questionnaire.item.enableWhen.answer[x]
Questionnaire.item.initial[x]
Allowed values to answer questions. Example Questionnaire Answer Codes
Questionnaire.item.option.value[x] Allowed values to answer questions. Example Questionnaire Answer Codes

  • que-1 : On Questionnaire.group: Groups may either contain questions or groups but not both (xpath Questionnaire.item: Group items must have nested items, display items cannot have nested items ( expression on f:Questionnaire/f:group: Questionnaire.item: not(exists(f:group) (type='group' implies item.empty().not()) and exists(f:question)) (type.trace('type')='display' implies item.trace('item').empty()) )
  • que-10 : On Questionnaire.item: Maximum length can only be declared for simple question types ( expression on Questionnaire.item: (type in ('boolean' | 'decimal' | 'integer' | 'string' | 'text' | 'url')) or maxLength.empty() )
  • que-2 : The link ids for groups and questions must be unique within the questionnaire (xpath: ( expression : count(descendant::f:linkId/@value)=count(distinct-values(descendant::f:linkId/@value)) descendants().linkId.isDistinct() )
  • que-3 : If root group must be "required" (xpath: On Questionnaire.item: Display items cannot have a "code" asserted ( expression on Questionnaire.item: f:group/f:required/@value=true() type!='display' or code.empty() )
  • que-4 : On Questionnaire.group.question: Questionnaire.item: A question cannot have both option and options ( expression on Questionnaire.item: option.empty() or options.empty() )
  • que-5 : On Questionnaire.item: Only 'choice' items can have options ( expression on Questionnaire.item: (type ='choice' or type = 'open-choice') or (options.empty() and option.empty()) )
  • que-6 : On Questionnaire.item: Required and repeat aren't permitted for display items ( expression on Questionnaire.item: type!='display' or (required.empty() and repeats.empty()) )
  • que-7 : On Questionnaire.item.enableWhen: enableWhen must use contain either option a 'answer' or options, not both (xpath a 'hasAnswer' element ( expression on f:Questionnaire/f:group/f:question: Questionnaire.item.enableWhen: not(f:options hasAnswer.exists() xor answer.exists() )
  • que-8 : On Questionnaire.item: Default values can't be specified for groups or display items ( expression on Questionnaire.item: (type!='group' and f:option) type!='display') or initial.empty() )
  • que-9 : On Questionnaire.item: Read-only can't be specified for "display" items ( expression on Questionnaire.item: type!='display' or readOnly.empty() )
  • Questionnaires may be used to represent predefined forms or panels, referenced using Questionnaire.group.concept. items of type "group"
  • A Questionnaire's contents are placed inside its single nested Group, which may contain Questions or subgroups with Questions. may be nested. The Questionnaire resource supports nested items beneath both items of type "group" (which doesn't capture an answer of its own) as well as beneath questions
  • Groups and Questions may have linkIds allowing groups and question answers captured in a QuestionnaireResponse to be associated with their corresponding group or question.
  • Questionnaire allows for flexible naming and structuring of its contents to reflect the flexible and varying nature of forms and questionnaires. It explicitly does not try to standardize or streamline exchange of its contents outside its context of use, although exchanging partners may further constrain its structure and flexibility using profiles to define standardized, reusable forms.
  • 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 use the Questionnaire Resource instead.
  • The order of questions within groups, groups within groups and groups within questions is relevant and must be retained for display and capture.
  • Display items allow the inclusion of instructions, background information and similar content within a questionnaire.

There is considerable overlap between the information covered by Questionnaires and other Resources (especially FamilyMemberHistory , MedicationStatement , Observation , Procedure , etc.): etc.). Questionnaire's flexible structure can easily be misused to capture any data, even data that should be captured as separate Resources. The choice between using Questionnaires or separate Resources may be dictated by the procedure of collection and recording; e.g. if the data is captured as a physician-agreed (electronic) form, it might be impossible or undesirable to distill separate resources from it and capturing the data in a Questionnaire would be most appropriate.

However, data captured only in Questionnaires can be difficult to query after-the-fact. Queries against other Resources will not return data captured only in Questionnaires , and querying against Questionnaires directly may not find all desired data, depending on how the questions may have been phrased or encoded over time or by different clinicians. Moreover, interoperability of such Questionnaires is limited limited, as interpretation of its contents is only known to the circle of parties that were involved in its definition: encoding data from such Questionnaires using other, more specific, Resources specific resources increases the ability and consistency with which it can be understood and queried. availability of the information they contain.

It is entirely possible for data to exist in both QuestionnaireResponse and in other resources. For example, data may be captured in QuestionnaireResponse as part of an intake questionnaire. That data may then be propagated into the Patient resource (demographics), FamilyMemberHistory , AllergyIntolerance , MedicationStatement and Observation resources to allow the data to be queried and analyzed. The original QuestionnaireResponse instance can be retained for traceability purposes. If desired, a Provenance resource can be used to identify the Questionnaire as the data source for the other resources. For example, if a questionnaire question asks "what is your weight", that can then result in the creation of an Observation with the appropriate Observation.code and the specified answer as the Observation.valueQuantity . can be created.

A Questionnaire is built out of three components: two components, Questionnaire and item:

  • The main component is Questionnaire, which holds information about the Questionnaire, like the identifier, publisher, date authored, title, etc. The Questionnaire contains one "root" Group, zero or more items which contains all define the content of the questionnaire. This "root" group contains elements that apply to the entire questionnaire - the title (zero items allows for the questionnaire, possibility of narrative-only questionnaires, though these provide little computable information).
  • Items have one of three sub-types, distinguished by the concept type that represents element:
    • display items convey text to be rendered on the meaning form that won't capture data and which won't contain nested items. This might include copyright or authorship information, instructions or other background information.
    • group items organize content of the overall questionnaire (e.g. into sections, sub-sections, etc. Groups don't have answers associated with them directly, but generally contain child 'question' items which do.
    • question items ask a code for "family history"), the specific question to which an answer may be given. There isn't a single text type to display at for question items. Instead, the top type conveys the data type of the questionnaire, etc. (In most cases, required would be 'true' and repeats would be false answer for the root group This Group can contain either nested Groups (to represent sections and subsections on question. If an item isn't a questionnaire form) or Questions. This way, any form containing sections 'display' or subsections can be represented, down a 'group', then it's a question which allows a particular type of answer to the actual questions. The Questions themselves may be simple questions with a prompt text and one expected answer, but they gathered. Questions may also contain nested groups, each containing sets of have nested content - groups and/or other questions. This way, one can model "panels" of questions which would only be relevant (and thus would only be displayed) depending on the answers of a parent question; e.g. a question "Did the patient receive treatment in the past six months?" would contain a nested group of questions asking for further details about the treatment. See an example from the Australian New South Wales blue book

Specific controls on dynamic display of groups, questions, etc. based on the answers to other questions is outside the scope of the base resource and are expected to be introduced as handled using extensions.

There are three different "identifying" elements within Questionnaire: identifier , id and linkId . Each serves very distinct purposes:

  • The identifier element is used to reference the overall questionnaire in business terms. It is the number printed across the top of the form or listed beside the form when making a choice between alternate forms.
  • The id attribute supported on each element is used for references within a resource, for example linking narrative to discrete elements elements. Ids are not generally displayed to end users
  • The linkId element on questions and groups establishes a link between elements in a QuestionnaireAnsers QuestionnaireResponse and their definition inside a Questionnaire. This is the only way to link between the groups and questions in a Questionnaire and QuestionnaireResponse QuestionnaireResponse. These are also not displayed to end users

Questionnaires can be crafted using any questions the author can conceive and can be phrased in whatever manner is appropriate or convenient. However, standardization of questions and the constraints enforced on the accompanying answers increases the ability to compare data gathered across questionnaires. There are two mechanisms defined in the specification for linking a Question (or Group) Items can be directly linked to an ElementDefinition using Questionnaire.item.definition which provides details for the item. If a standardized definition is provided, then the following element values can be derived from the definition:

  • The concept element on both Group and Question allows (from ElementDefinition.code)
  • type (from ElementDefinition.type)
  • required (from ElementDefinition.min)
  • repeats (from ElementDefinition.max)
  • maxLength (from ElementDefinition.maxLength)
  • options (from ElementDefinition.binding)

Any information provided in these elements overrides the information from the definition. The url refers to a an individual question, ElementDefinition in either a group of questions StructureDefinition or even the questionnaire as a whole to be associated DataElement , and always starts with the canonical URL for the target resource. When referring to a pre-defined terminology of questions and question groups such as LOINC The deReference extension allows StructureDefinition, a question or group fragment identifier is used to be associated with specify the DataElement (DE) resource that formally defines element definition by its id (Element.id). E.g. http://hl7.org/fhir/StructureDefinition/Observation#Observation.value[x]. In the data element. Linking to formal definitions absence of a question allows data captured by distinct questionnaires to be compared. If systems have fragment identifier, the necessary mappings to first/root element definition in the formal definition, linkages to formal target is the matching element definition.

Note that LOINC codes implicitly define DataElement resources.

The definitions may also be used to automatically pre-populate answers, or extract data from a corresponding QuestionnaireResponse resource.

NOTE: Even if a standard question definitions are referenced using concept or the deReference extension, definition is provided , information such as the question text, data type and value set SHOULD still be declared for the question. Systems processing the questionnaire may not have access to or support the ability to look up the question definitions from external sources. If the information is not included in-line within the questionnaire, other systems may not be able to to render or use the Questionnaire.

If an external reference ( concept or deReference extension) definition is included along with question information such as question text, data type or value set, it is expected that the content for the question and the referenced definition would be in alignment. However, FHIR does not dictate what degree of alignment is required; e.g. Does the question text need to match exactly? Is it legitimate for a question to constrain the allowed value set of possible answers? These rules will need to be established within implementation environments.

The codes for the data type for each question are slightly different than the data types allowed in the QuestionnaireResponse resource. Where the names are the same (ignoring case), the "answer" must use the specified type. Where the names are different, the mappings are as follows:

Questionnaire AnswerFormat code QuestionnaireResponse data type
text string
url uri
choice Coding
open-choice Coding (if choosing from one of the listed choices) or string (if a different value is provided)

Many questionnaires place constraints on the allowed list of values for a given question. FHIR supports this notion through the ...question.choices item.options or the item.option element. However, rather

The "option" mechanism is simplest - all options are listed in-line with the question using the item.option element. Maintenance of the set of permitted question answers involves maintenance of the questionnaire itself.

The "options" mechanism is more sophisticated. Rather than listing the choices options directly, the choices item.options element points to a ValueSet resource. This approach adds complexity for questionnaires having a simple list of strings as choices for a question, but provides several benefits: benefits, including:

  • Questionnaires that reference codes from externally defined code systems have a means of doing so
  • Answer sets can be shared across questions (and there are many questionnaires where this capability is useful)
  • The full capability of value sets can be brought into play, including the ability to use ConceptMap to link and translate from questionnaire-specific codes to other codes, the use of multiple display names (e.g. different languages), the ability to use coded ordinals, and the ability to allow choices from larger value sets (e.g. "all SNOMED CT procedure codes")
  • etc.

In many cases, the set of code choices will be specific to a given questionnaire and should be maintained as part of the questionnaire. In this case, the referenced ValueSet can be included as a contained resource. All contained ValueSets are listed together and then are referenced by the individual questions as necessary. Alternatively, the item.options element can reference the value set in a version-specific manner. This ensures that the Questionnaire will not adopt a new version of the referenced value set without revising the Questionnaire to point to that new version - putting the author of the Questionnaire in control of any changes.

Many questions have a common set of possible codes for their answer. These value sets may be useful to help, and when referenced by full URL, do not need to be provided as part of the questionnaire:

In some questionnaires, it may be possible to respond to a question with multiple types of answers. For example, capturing a coded answer plus free text, capturing a coded value plus a numeric priority, etc. In FHIR, this is handled through nested questions. Each question has a single data type. However, each question can have nested child questions. These nested child questions can have text (e.g. "Please specify") or can have no text at all if the appropriate guidance is provided by the parent question or group.

While not defined (yet) at the international level, extensions may be defined to perform mathematical functions Many questionnaires involve computations on questionnaire responses. For example, answers, e.g. tabulating scores. One extension that is defined that may be useful in this process is the Ordinal extension. This allows a To help with associating numeric value values to be associated with a coded data element. There answers, there are two extensions defined - one for defining the numeric weighting of a code defined in a value set - valueset-ordinalValue and the other is for defining a code that can appear within a Coding itself - iso21090-CO-value .

4.26.5.10 Extensions for Additional capabilities

The core elements defined in the questionnaire resource In addition, there are sufficient extensions for simple questionnaires. defining the dynamic value of an element usings expressions. For more sophisticated capabilities, a number of "common" extensions are defined in information, see the Questionnaire Core extensions Using Expressions and the Element extensions Documentation Template profiles. For example, strict control over allowed number of conditions, conditional display of questionnaire content, etc. The conditional display extension [enable-when] can be used to enable groups nested beneath a question based on the selection of a specific answer, giving topics in the behavior of "questions under answers" where this sort of more sophisticated behavior is needed. Clinical Reasoning module.

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

Name Type Description Paths Expression In Common
code token A code that corresponds to the questionnaire or one of its groups items in the questionnaire Questionnaire.group.concept Questionnaire.item.code
date date When the The questionnaire was last changed publication date Questionnaire.date
description string The description of the questionnaire Questionnaire.description
effective date The time during which the questionnaire is intended to be in use Questionnaire.effectivePeriod
identifier token An External identifier for the questionnaire Questionnaire.identifier
jurisdiction token Intended jurisdiction for the questionnaire Questionnaire.jurisdiction
name string Computationally friendly name of the questionnaire Questionnaire.name
publisher string The author Name of the publisher of the questionnaire Questionnaire.publisher
status token The current status of the questionnaire Questionnaire.status
title string All or part of the The human-friendly name of the questionnaire (title for the root group of Questionnaire.title
url uri The uri that identifies the questionnaire) questionnaire Questionnaire.group.title Questionnaire.url
version string token The business version of the questionnaire Questionnaire.version