Release 4
FHIR Infrastructure Work Group Maturity Level: 1Trial Use Use Context: Any

The official URL for this profile is:

http://hl7.org/fhir/StructureDefinition/cqf-questionnaire

A questionnaire with the ability to specify behavior associated with questions or groups of questions

This profile was published on Sat, May 30, 2015 00:00+0000 as a draft by Health Level Seven, Inc. - CDS WG.

Description of Profiles, Differentials, Snapshots, and how the XML and JSON presentations work.

This structure is derived from Questionnaire.

Summary

Extensions

This structure refers to these extensions:

This structure is derived from Questionnaire.

NameFlagsCard.TypeDescription & Constraintsdoco
.. Questionnaire 0..*QuestionnaireA questionnaire with the ability to specify behavior associated with questions or groups of questions
... cqf-library 0..*canonical(Library)A library containing logic referenced by the questionnaire
URL: http://hl7.org/fhir/StructureDefinition/cqf-library

doco Documentation for this format
NameFlagsCard.TypeDescription & Constraintsdoco
.. Questionnaire I0..*QuestionnaireA questionnaire with the ability to specify behavior associated with questions or groups of questions
... id Σ0..1stringLogical id of this artifact
... meta ΣI0..1MetaMetadata about the resource
... implicitRules ?!ΣI0..1uriA set of rules under which this content was created
... language I0..1codeLanguage of the resource content
Binding: Common Languages (preferred)
Max Binding: All Languages
... text I0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... extension I0..*ExtensionExtension
Slice: Unordered, Open by value:url
... cqf-library I0..*canonical(Library)A library containing logic referenced by the questionnaire
URL: http://hl7.org/fhir/StructureDefinition/cqf-library
... modifierExtension ?!I0..*ExtensionExtensions that cannot be ignored
... url ΣI0..1uriCanonical identifier for this questionnaire, represented as a URI (globally unique)
... identifier ΣI0..*IdentifierAdditional identifier for the questionnaire
... version ΣI0..1stringBusiness version of the questionnaire
... name ΣI0..1stringName for this questionnaire (computer friendly)
... title ΣI0..1stringName for this questionnaire (human friendly)
... derivedFrom I0..*canonical(Questionnaire)Instantiates protocol or definition
... status ?!ΣI1..1codedraft | active | retired | unknown
Binding: PublicationStatus (required)
... experimental ΣI0..1booleanFor testing purposes, not real usage
... subjectType ΣI0..*codeResource that can be subject of QuestionnaireResponse
Binding: ResourceType (required)
... date ΣI0..1dateTimeDate last changed
... publisher ΣI0..1stringName of the publisher (organization or individual)
... contact ΣI0..*ContactDetailContact details for the publisher
... description I0..1markdownNatural language description of the questionnaire
... useContext ΣI0..*UsageContextThe context that the content is intended to support
... jurisdiction ΣI0..*CodeableConceptIntended jurisdiction for questionnaire (if applicable)
Binding: Jurisdiction (extensible)
... purpose I0..1markdownWhy this questionnaire is defined
... copyright I0..1markdownUse and/or publishing restrictions
... approvalDate I0..1dateWhen the questionnaire was approved by publisher
... lastReviewDate I0..1dateWhen the questionnaire was last reviewed
... effectivePeriod ΣI0..1PeriodWhen the questionnaire is expected to be used
... code ΣI0..*CodingConcept that represents the overall questionnaire
Binding: Questionnaire Question Codes (example)
... item I0..*BackboneElementQuestions and sections within the Questionnaire
que-1: Group items must have nested items, display items cannot have nested items
que-3: Display items cannot have a "code" asserted
que-4: A question cannot have both answerOption and answerValueSet
que-5: Only 'choice' and 'open-choice' items can have answerValueSet
que-6: Required and repeat aren't permitted for display items
que-8: Initial values can't be specified for groups or display items
que-9: Read-only can't be specified for "display" items
que-10: Maximum length can only be declared for simple question types
que-11: If one or more answerOption is present, initial[x] must be missing
que-12: If there are more than one enableWhen, enableBehavior must be specified
que-13: Can only have multiple initial values for repeating items
.... id 0..1stringUnique id for inter-element referencing
.... extension I0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!ΣI0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... linkId I1..1stringUnique id for item in questionnaire
.... definition I0..1uriElementDefinition - details for the item
.... code I0..*CodingCorresponding concept for this item in a terminology
Binding: Questionnaire Question Codes (example)
.... prefix I0..1stringE.g. "1(a)", "2.5.3"
.... text I0..1stringPrimary text for the item
.... type I1..1codegroup | display | boolean | decimal | integer | date | dateTime +
Binding: QuestionnaireItemType (required)
.... enableWhen ?!I0..*BackboneElementOnly allow data when
que-7: If the operator is 'exists', the value must be a boolean
..... id 0..1stringUnique id for inter-element referencing
..... extension I0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!ΣI0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... question I1..1stringQuestion that determines whether item is enabled
..... operator I1..1codeexists | = | != | > | < | >= | <=
Binding: QuestionnaireItemOperator (required)
..... answer[x] I1..1Value for question comparison based on operator
Binding: Questionnaire Answer Codes (example)
...... answerBooleanboolean
...... answerDecimaldecimal
...... answerIntegerinteger
...... answerDatedate
...... answerDateTimedateTime
...... answerTimetime
...... answerStringstring
...... answerCodingCoding
...... answerQuantityQuantity
...... answerReferenceReference(Resource)
.... enableBehavior I0..1codeall | any
Binding: EnableWhenBehavior (required)
.... required I0..1booleanWhether the item must be included in data results
.... repeats I0..1booleanWhether the item may repeat
.... readOnly I0..1booleanDon't allow human editing
.... maxLength I0..1integerNo more than this many characters
.... answerValueSet I0..1canonical(ValueSet)Valueset containing permitted answers
.... answerOption I0..*BackboneElementPermitted answer
..... id 0..1stringUnique id for inter-element referencing
..... extension I0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!ΣI0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... value[x] I1..1Answer value
Binding: Questionnaire Answer Codes (example)
...... valueIntegerinteger
...... valueDatedate
...... valueTimetime
...... valueStringstring
...... valueCodingCoding
...... valueReferenceReference(Resource)
..... initialSelected I0..1booleanWhether option is selected by default
.... initial I0..*BackboneElementInitial value(s) when item is first rendered
..... id 0..1stringUnique id for inter-element referencing
..... extension I0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!ΣI0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... value[x] I1..1Actual value for initializing the question
Binding: Questionnaire Answer Codes (example)
...... valueBooleanboolean
...... valueDecimaldecimal
...... valueIntegerinteger
...... valueDatedate
...... valueDateTimedateTime
...... valueTimetime
...... valueStringstring
...... valueUriuri
...... valueAttachmentAttachment
...... valueCodingCoding
...... valueQuantityQuantity
...... valueReferenceReference(Resource)
.... item I0..*Unknown reference to #Questionnaire.item
Nested questionnaire items

doco Documentation for this format
<!-- CQF-Questionnaire -->doco

<Questionnaire xmlns="http://hl7.org/fhir"
>
  <!-- from Element: extension -->
 <id value="[string]"/><!-- 0..1 Logical id of this artifact -->
 <meta><!-- ?? 0..1 Meta Metadata about the resource --></meta>
 <implicitRules value="[uri]"/><!-- ?? 0..1 A set of rules under which this content was created -->
 <language value="[code]"/><!-- ?? 0..1 Language of the resource content   -->
 <text><!-- ?? 0..1 Narrative 
     Text summary of the resource, for human interpretation --></text>
 <contained><!-- 0..* Resource Contained, inline Resources --></contained>
 <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored  --></modifierExtension>
 <url value="[uri]"/><!-- ?? 0..1 
     Canonical identifier for this questionnaire, represented as a URI (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) -->
 <derivedFrom value="[canonical]"/><!-- ?? 0..* Instantiates protocol or definition -->
 <status value="[code]"/><!-- ?? 1..1 draft | active | retired | unknown   -->
 <experimental value="[boolean]"/><!-- ?? 0..1 For testing purposes, not real usage -->
 <subjectType value="[code]"/><!-- ?? 0..* Resource that can be subject of QuestionnaireResponse   -->
 <date value="[dateTime]"/><!-- ?? 0..1 Date last changed -->
 <publisher value="[string]"/><!-- ?? 0..1 Name of the publisher (organization or individual) -->
 <contact><!-- ?? 0..* ContactDetail 
     Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- ?? 0..1 Natural language description of the questionnaire -->
 <useContext><!-- ?? 0..* UsageContext 
     The context that the content is intended to support --></useContext>
 <jurisdiction><!-- ?? 0..* CodeableConcept Intended jurisdiction for questionnaire (if applicable)   --></jurisdiction>
 <purpose value="[markdown]"/><!-- ?? 0..1 Why this questionnaire is defined -->
 <copyright value="[markdown]"/><!-- ?? 0..1 Use and/or publishing restrictions -->
 <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>
 <code><!-- ?? 0..* Coding Concept that represents the overall questionnaire   --></code>
 <item> ?? 0..* BackboneElement  <!-- ?? 0..* Questions and sections within the Questionnaire -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <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..* BackboneElement  <!-- ?? 0..* Only allow data when -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <question value="[string]"/><!-- ?? 1..1 Question that determines whether item is enabled -->
   <operator value="[code]"/><!-- ?? 1..1 exists | = | != | > | < | >= | <=   -->
   <answer[x]><!-- ?? 1..1 boolean|decimal|integer|
     date|dateTime|time|string|Coding|Quantity|Reference(Resource) Value for question comparison based on operator   --></answer[x]>
  </enableWhen>
  <enableBehavior value="[code]"/><!-- ?? 0..1 all | any   -->
  <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 -->
  <answerValueSet value="[canonical]"/><!-- ?? 0..1 Valueset containing permitted answers -->
  <answerOption> ?? 0..* BackboneElement  <!-- ?? 0..* Permitted answer -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <value[x]><!-- ?? 1..1 integer|date|time|string|
     Coding|Reference(Resource) Answer value   --></value[x]>
   <initialSelected value="[boolean]"/><!-- ?? 0..1 Whether option is selected by default -->
  </answerOption>
  <initial> ?? 0..* BackboneElement  <!-- ?? 0..* Initial value(s) when item is first rendered -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <value[x]><!-- ?? 1..1 boolean|decimal|integer|date|
     dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Resource) Actual value for initializing the question   --></value[x]>
  </initial>
  <item><!-- See #Questionnaire.item  Nested questionnaire items --></item>
 </item>
</Questionnaire>
{ // CQF-Questionnaire
  // from Element: extension
    "meta" : { Meta }, // C?Metadata about the resource
    "implicitRules" : "<uri>", // C?A set of rules under which this content was created
    "language" : "<code>", // C?Language of the resource content
    "text" : { Narrative }, // C?Text summary of the resource, for human interpretation
    "contained" : [{ Resource }], //Contained, inline Resources
    "extension" : [ //  sliced by value:url  in the specified order, Open 
      { // A library containing logic referenced by the questionnaire // C?
        // from Element: extension
      }
    ],
    "modifierExtension" : [{ Extension }], // C?Extensions that cannot be ignored
    "url" : "<uri>", // C?Canonical identifier for this questionnaire, represented as a URI (globally unique)
    "identifier" : [{ Identifier }], // C?Additional identifier for the questionnaire
    "version" : "<string>", // C?Business version of the questionnaire
    "name" : "<string>", // C?Name for this questionnaire (computer friendly)
    "title" : "<string>", // C?Name for this questionnaire (human friendly)
    "derivedFrom" : ["<canonical>"], // C?Instantiates protocol or definition
    "status" : "<code>", // C? R! draft | active | retired | unknown
    "experimental" : <boolean>, // C?For testing purposes, not real usage
    "subjectType" : ["<code>"], // C?Resource that can be subject of QuestionnaireResponse
    "date" : "<dateTime>", // C?Date last changed
    "publisher" : "<string>", // C?Name of the publisher (organization or individual)
    "contact" : [{ ContactDetail }], // C?Contact details for the publisher
    "description" : "<markdown>", // C?Natural language description of the questionnaire
    "useContext" : [{ UsageContext }], // C?The context that the content is intended to support
    "jurisdiction" : [{ CodeableConcept }], // C?Intended jurisdiction for questionnaire (if applicable)
    "purpose" : "<markdown>", // C?Why this questionnaire is defined
    "copyright" : "<markdown>", // C?Use and/or publishing restrictions
    "approvalDate" : "<date>", // C?When the questionnaire was approved by publisher
    "lastReviewDate" : "<date>", // C?When the questionnaire was last reviewed
    "effectivePeriod" : { Period }, // C?When the questionnaire is expected to be used
    "code" : [{ Coding }], // C?Concept that represents the overall questionnaire
    "item" : [{ BackboneElement }], // C?Questions and sections within the Questionnaire
  }

This structure is derived from Questionnaire.

Summary

Extensions

This structure refers to these extensions:

Differential View

This structure is derived from Questionnaire.

NameFlagsCard.TypeDescription & Constraintsdoco
.. Questionnaire 0..*QuestionnaireA questionnaire with the ability to specify behavior associated with questions or groups of questions
... cqf-library 0..*canonical(Library)A library containing logic referenced by the questionnaire
URL: http://hl7.org/fhir/StructureDefinition/cqf-library

doco Documentation for this format

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. Questionnaire I0..*QuestionnaireA questionnaire with the ability to specify behavior associated with questions or groups of questions
... id Σ0..1stringLogical id of this artifact
... meta ΣI0..1MetaMetadata about the resource
... implicitRules ?!ΣI0..1uriA set of rules under which this content was created
... language I0..1codeLanguage of the resource content
Binding: Common Languages (preferred)
Max Binding: All Languages
... text I0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... extension I0..*ExtensionExtension
Slice: Unordered, Open by value:url
... cqf-library I0..*canonical(Library)A library containing logic referenced by the questionnaire
URL: http://hl7.org/fhir/StructureDefinition/cqf-library
... modifierExtension ?!I0..*ExtensionExtensions that cannot be ignored
... url ΣI0..1uriCanonical identifier for this questionnaire, represented as a URI (globally unique)
... identifier ΣI0..*IdentifierAdditional identifier for the questionnaire
... version ΣI0..1stringBusiness version of the questionnaire
... name ΣI0..1stringName for this questionnaire (computer friendly)
... title ΣI0..1stringName for this questionnaire (human friendly)
... derivedFrom I0..*canonical(Questionnaire)Instantiates protocol or definition
... status ?!ΣI1..1codedraft | active | retired | unknown
Binding: PublicationStatus (required)
... experimental ΣI0..1booleanFor testing purposes, not real usage
... subjectType ΣI0..*codeResource that can be subject of QuestionnaireResponse
Binding: ResourceType (required)
... date ΣI0..1dateTimeDate last changed
... publisher ΣI0..1stringName of the publisher (organization or individual)
... contact ΣI0..*ContactDetailContact details for the publisher
... description I0..1markdownNatural language description of the questionnaire
... useContext ΣI0..*UsageContextThe context that the content is intended to support
... jurisdiction ΣI0..*CodeableConceptIntended jurisdiction for questionnaire (if applicable)
Binding: Jurisdiction (extensible)
... purpose I0..1markdownWhy this questionnaire is defined
... copyright I0..1markdownUse and/or publishing restrictions
... approvalDate I0..1dateWhen the questionnaire was approved by publisher
... lastReviewDate I0..1dateWhen the questionnaire was last reviewed
... effectivePeriod ΣI0..1PeriodWhen the questionnaire is expected to be used
... code ΣI0..*CodingConcept that represents the overall questionnaire
Binding: Questionnaire Question Codes (example)
... item I0..*BackboneElementQuestions and sections within the Questionnaire
que-1: Group items must have nested items, display items cannot have nested items
que-3: Display items cannot have a "code" asserted
que-4: A question cannot have both answerOption and answerValueSet
que-5: Only 'choice' and 'open-choice' items can have answerValueSet
que-6: Required and repeat aren't permitted for display items
que-8: Initial values can't be specified for groups or display items
que-9: Read-only can't be specified for "display" items
que-10: Maximum length can only be declared for simple question types
que-11: If one or more answerOption is present, initial[x] must be missing
que-12: If there are more than one enableWhen, enableBehavior must be specified
que-13: Can only have multiple initial values for repeating items
.... id 0..1stringUnique id for inter-element referencing
.... extension I0..*ExtensionAdditional content defined by implementations
.... modifierExtension ?!ΣI0..*ExtensionExtensions that cannot be ignored even if unrecognized
.... linkId I1..1stringUnique id for item in questionnaire
.... definition I0..1uriElementDefinition - details for the item
.... code I0..*CodingCorresponding concept for this item in a terminology
Binding: Questionnaire Question Codes (example)
.... prefix I0..1stringE.g. "1(a)", "2.5.3"
.... text I0..1stringPrimary text for the item
.... type I1..1codegroup | display | boolean | decimal | integer | date | dateTime +
Binding: QuestionnaireItemType (required)
.... enableWhen ?!I0..*BackboneElementOnly allow data when
que-7: If the operator is 'exists', the value must be a boolean
..... id 0..1stringUnique id for inter-element referencing
..... extension I0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!ΣI0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... question I1..1stringQuestion that determines whether item is enabled
..... operator I1..1codeexists | = | != | > | < | >= | <=
Binding: QuestionnaireItemOperator (required)
..... answer[x] I1..1Value for question comparison based on operator
Binding: Questionnaire Answer Codes (example)
...... answerBooleanboolean
...... answerDecimaldecimal
...... answerIntegerinteger
...... answerDatedate
...... answerDateTimedateTime
...... answerTimetime
...... answerStringstring
...... answerCodingCoding
...... answerQuantityQuantity
...... answerReferenceReference(Resource)
.... enableBehavior I0..1codeall | any
Binding: EnableWhenBehavior (required)
.... required I0..1booleanWhether the item must be included in data results
.... repeats I0..1booleanWhether the item may repeat
.... readOnly I0..1booleanDon't allow human editing
.... maxLength I0..1integerNo more than this many characters
.... answerValueSet I0..1canonical(ValueSet)Valueset containing permitted answers
.... answerOption I0..*BackboneElementPermitted answer
..... id 0..1stringUnique id for inter-element referencing
..... extension I0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!ΣI0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... value[x] I1..1Answer value
Binding: Questionnaire Answer Codes (example)
...... valueIntegerinteger
...... valueDatedate
...... valueTimetime
...... valueStringstring
...... valueCodingCoding
...... valueReferenceReference(Resource)
..... initialSelected I0..1booleanWhether option is selected by default
.... initial I0..*BackboneElementInitial value(s) when item is first rendered
..... id 0..1stringUnique id for inter-element referencing
..... extension I0..*ExtensionAdditional content defined by implementations
..... modifierExtension ?!ΣI0..*ExtensionExtensions that cannot be ignored even if unrecognized
..... value[x] I1..1Actual value for initializing the question
Binding: Questionnaire Answer Codes (example)
...... valueBooleanboolean
...... valueDecimaldecimal
...... valueIntegerinteger
...... valueDatedate
...... valueDateTimedateTime
...... valueTimetime
...... valueStringstring
...... valueUriuri
...... valueAttachmentAttachment
...... valueCodingCoding
...... valueQuantityQuantity
...... valueReferenceReference(Resource)
.... item I0..*Unknown reference to #Questionnaire.item
Nested questionnaire items

doco Documentation for this format

XML Template

<!-- CQF-Questionnaire -->doco

<Questionnaire xmlns="http://hl7.org/fhir"
>
  <!-- from Element: extension -->
 <id value="[string]"/><!-- 0..1 Logical id of this artifact -->
 <meta><!-- ?? 0..1 Meta Metadata about the resource --></meta>
 <implicitRules value="[uri]"/><!-- ?? 0..1 A set of rules under which this content was created -->
 <language value="[code]"/><!-- ?? 0..1 Language of the resource content   -->
 <text><!-- ?? 0..1 Narrative 
     Text summary of the resource, for human interpretation --></text>
 <contained><!-- 0..* Resource Contained, inline Resources --></contained>
 <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored  --></modifierExtension>
 <url value="[uri]"/><!-- ?? 0..1 
     Canonical identifier for this questionnaire, represented as a URI (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) -->
 <derivedFrom value="[canonical]"/><!-- ?? 0..* Instantiates protocol or definition -->
 <status value="[code]"/><!-- ?? 1..1 draft | active | retired | unknown   -->
 <experimental value="[boolean]"/><!-- ?? 0..1 For testing purposes, not real usage -->
 <subjectType value="[code]"/><!-- ?? 0..* Resource that can be subject of QuestionnaireResponse   -->
 <date value="[dateTime]"/><!-- ?? 0..1 Date last changed -->
 <publisher value="[string]"/><!-- ?? 0..1 Name of the publisher (organization or individual) -->
 <contact><!-- ?? 0..* ContactDetail 
     Contact details for the publisher --></contact>
 <description value="[markdown]"/><!-- ?? 0..1 Natural language description of the questionnaire -->
 <useContext><!-- ?? 0..* UsageContext 
     The context that the content is intended to support --></useContext>
 <jurisdiction><!-- ?? 0..* CodeableConcept Intended jurisdiction for questionnaire (if applicable)   --></jurisdiction>
 <purpose value="[markdown]"/><!-- ?? 0..1 Why this questionnaire is defined -->
 <copyright value="[markdown]"/><!-- ?? 0..1 Use and/or publishing restrictions -->
 <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>
 <code><!-- ?? 0..* Coding Concept that represents the overall questionnaire   --></code>
 <item> ?? 0..* BackboneElement  <!-- ?? 0..* Questions and sections within the Questionnaire -->
  <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
  <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..* BackboneElement  <!-- ?? 0..* Only allow data when -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <question value="[string]"/><!-- ?? 1..1 Question that determines whether item is enabled -->
   <operator value="[code]"/><!-- ?? 1..1 exists | = | != | > | < | >= | <=   -->
   <answer[x]><!-- ?? 1..1 boolean|decimal|integer|
     date|dateTime|time|string|Coding|Quantity|Reference(Resource) Value for question comparison based on operator   --></answer[x]>
  </enableWhen>
  <enableBehavior value="[code]"/><!-- ?? 0..1 all | any   -->
  <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 -->
  <answerValueSet value="[canonical]"/><!-- ?? 0..1 Valueset containing permitted answers -->
  <answerOption> ?? 0..* BackboneElement  <!-- ?? 0..* Permitted answer -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <value[x]><!-- ?? 1..1 integer|date|time|string|
     Coding|Reference(Resource) Answer value   --></value[x]>
   <initialSelected value="[boolean]"/><!-- ?? 0..1 Whether option is selected by default -->
  </answerOption>
  <initial> ?? 0..* BackboneElement  <!-- ?? 0..* Initial value(s) when item is first rendered -->
   <modifierExtension><!-- ?? 0..* Extension  Extensions that cannot be ignored even if unrecognized  --></modifierExtension>
   <value[x]><!-- ?? 1..1 boolean|decimal|integer|date|
     dateTime|time|string|uri|Attachment|Coding|Quantity|Reference(Resource) Actual value for initializing the question   --></value[x]>
  </initial>
  <item><!-- See #Questionnaire.item  Nested questionnaire items --></item>
 </item>
</Questionnaire>

JSON Template

{ // CQF-Questionnaire
  // from Element: extension
    "meta" : { Meta }, // C?Metadata about the resource
    "implicitRules" : "<uri>", // C?A set of rules under which this content was created
    "language" : "<code>", // C?Language of the resource content
    "text" : { Narrative }, // C?Text summary of the resource, for human interpretation
    "contained" : [{ Resource }], //Contained, inline Resources
    "extension" : [ //  sliced by value:url  in the specified order, Open 
      { // A library containing logic referenced by the questionnaire // C?
        // from Element: extension
      }
    ],
    "modifierExtension" : [{ Extension }], // C?Extensions that cannot be ignored
    "url" : "<uri>", // C?Canonical identifier for this questionnaire, represented as a URI (globally unique)
    "identifier" : [{ Identifier }], // C?Additional identifier for the questionnaire
    "version" : "<string>", // C?Business version of the questionnaire
    "name" : "<string>", // C?Name for this questionnaire (computer friendly)
    "title" : "<string>", // C?Name for this questionnaire (human friendly)
    "derivedFrom" : ["<canonical>"], // C?Instantiates protocol or definition
    "status" : "<code>", // C? R! draft | active | retired | unknown
    "experimental" : <boolean>, // C?For testing purposes, not real usage
    "subjectType" : ["<code>"], // C?Resource that can be subject of QuestionnaireResponse
    "date" : "<dateTime>", // C?Date last changed
    "publisher" : "<string>", // C?Name of the publisher (organization or individual)
    "contact" : [{ ContactDetail }], // C?Contact details for the publisher
    "description" : "<markdown>", // C?Natural language description of the questionnaire
    "useContext" : [{ UsageContext }], // C?The context that the content is intended to support
    "jurisdiction" : [{ CodeableConcept }], // C?Intended jurisdiction for questionnaire (if applicable)
    "purpose" : "<markdown>", // C?Why this questionnaire is defined
    "copyright" : "<markdown>", // C?Use and/or publishing restrictions
    "approvalDate" : "<date>", // C?When the questionnaire was approved by publisher
    "lastReviewDate" : "<date>", // C?When the questionnaire was last reviewed
    "effectivePeriod" : { Period }, // C?When the questionnaire is expected to be used
    "code" : [{ Coding }], // C?Concept that represents the overall questionnaire
    "item" : [{ BackboneElement }], // C?Questions and sections within the Questionnaire
  }

 

Alternate definitions: Master Definition (XML, JSON), Schematron

PathNameConformanceValueSet
Questionnaire.languageCommon LanguagespreferredCommon Languages
Questionnaire.statusPublicationStatusrequiredPublicationStatus
Questionnaire.subjectTypeResourceTyperequiredResourceType
Questionnaire.jurisdictionJurisdictionextensibleJurisdiction
Questionnaire.codeQuestionnaire Question CodesexampleQuestionnaire Question Codes
Questionnaire.item.codeQuestionnaire Question CodesexampleQuestionnaire Question Codes
Questionnaire.item.typeQuestionnaireItemTyperequiredQuestionnaireItemType
Questionnaire.item.enableWhen.operatorQuestionnaireItemOperatorrequiredQuestionnaireItemOperator
Questionnaire.item.enableWhen.answer[x]Questionnaire Answer CodesexampleQuestionnaire Answer Codes
Questionnaire.item.enableBehaviorEnableWhenBehaviorrequiredEnableWhenBehavior
Questionnaire.item.answerOption.value[x]Questionnaire Answer CodesexampleQuestionnaire Answer Codes
Questionnaire.item.initial.value[x]Questionnaire Answer CodesexampleQuestionnaire Answer Codes
RuleRuleRuleRuleRuleRuleRuleRuleRuleRuleRuleRule
IdPathDetailsRequirements
que-1Questionnaire.itemGroup items must have nested items, display items cannot have nested items
Expression : (type='group' implies item.empty().not()) and (type.trace('type')='display' implies item.trace('item').empty())
que-3Questionnaire.itemDisplay items cannot have a "code" asserted
Expression : type!='display' or code.empty()
que-4Questionnaire.itemA question cannot have both answerOption and answerValueSet
Expression : answerOption.empty() or answerValueSet.empty()
que-5Questionnaire.itemOnly 'choice' and 'open-choice' items can have answerValueSet
Expression : (type ='choice' or type = 'open-choice' or type = 'decimal' or type = 'integer' or type = 'date' or type = 'dateTime' or type = 'time' or type = 'string' or type = 'quantity') or (answerValueSet.empty() and answerOption.empty())
que-6Questionnaire.itemRequired and repeat aren't permitted for display items
Expression : type!='display' or (required.empty() and repeats.empty())
que-8Questionnaire.itemInitial values can't be specified for groups or display items
Expression : (type!='group' and type!='display') or initial.empty()
que-9Questionnaire.itemRead-only can't be specified for "display" items
Expression : type!='display' or readOnly.empty()
que-10Questionnaire.itemMaximum length can only be declared for simple question types
Expression : (type in ('boolean' | 'decimal' | 'integer' | 'string' | 'text' | 'url' | 'open-choice')) or maxLength.empty()
que-11Questionnaire.itemIf one or more answerOption is present, initial[x] must be missing
Expression : answerOption.empty() or initial.empty()
que-12Questionnaire.itemIf there are more than one enableWhen, enableBehavior must be specified
Expression : enableWhen.count() > 2 implies enableBehavior.exists()
que-13Questionnaire.itemCan only have multiple initial values for repeating items
Expression : repeats=true or initial.count() <= 1
que-7Questionnaire.item.enableWhenIf the operator is 'exists', the value must be a boolean
Expression : operator = 'exists' implies (answer is Boolean)
.