Connectathon 11 Snapshot

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

Extension: Only allow data when:

URL for this extension:

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

Status: draft. Extension maintained by: HL7

If present, indicates that the item containing the extension should only be enabled (displayed/allow answers to be captured) when the specified condition is true.

Context of Use: Use on element: Questionnaire.item, Questionnaire.item.item

usage info: insert a list of places where this extension is used

Extension Content

Summary

NameFlagsCard.TypeDescription & Constraintsdoco
.. extension0..*ExtensionURL = http://hl7.org/fhir/StructureDefinition/questionnaire-enableWhen
Only allow data when:: If present, indicates that the item containing the extension should only be enabled (displayed/allow answers to be captured) when the specified condition is true.
Use on element: Questionnaire.item, Questionnaire.item.item
... question1..1stringThe linkId for the question whose answer (or lack of answer) governs whether the question is enabled.
... answered0..1booleanIf present, allows the assertion to control whether the item is enabled when the question is answered or is unanswered.
... answer0..1boolean, integer, decimal, base64Binary, instant, string, uri, date, dateTime, time, code, oid, id, unsignedInt, positiveInt, markdown, Annotation, Attachment, Identifier, CodeableConcept, Coding, Quantity, Range, Period, Ratio, SampledData, Signature, HumanName, Address, ContactPoint, Timing, Reference(Reference), MetaIf present, then the specified question must match the specified answer for all components present in the enableWhen.answer.

doco Documentation for this format

Fulle Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. extension0..*ExtensionURL = http://hl7.org/fhir/StructureDefinition/questionnaire-enableWhen
Only allow data when:: If present, indicates that the item containing the extension should only be enabled (displayed/allow answers to be captured) when the specified condition is true.
Use on element: Questionnaire.item, Questionnaire.item.item
... extension 1..1ExtensionQuestion that must be answered
.... extension 0..0
.... url 1..1uri"question"
.... valueString 1..1stringValue of extension
... extension 0..1Extensionwhen answered or not
.... extension 0..0
.... url 1..1uri"answered"
.... valueBoolean 1..1booleanValue of extension
... extension 0..1ExtensionValue question must have
.... extension 0..0
.... url 1..1uri"answer"
.... value[x] 1..1boolean, integer, decimal, base64Binary, instant, string, uri, date, dateTime, time, code, oid, id, unsignedInt, positiveInt, markdown, Annotation, Attachment, Identifier, CodeableConcept, Coding, Quantity, Range, Period, Ratio, SampledData, Signature, HumanName, Address, ContactPoint, Timing, Reference(Reference), MetaValue of extension
... url 1..1uri"http://hl7.org/fhir/StructureDefinition/questionnaire-enableWhen"
... value[x] 0..0

doco Documentation for this format

XML Template

<!-- Only allow data when: -->doco

<extension xmlns="http://hl7.org/fhir"
     url="http://hl7.org/fhir/StructureDefinition/questionnaire-enableWhen" >
 <-- extension sliced by url  in the specified orderOpen-->
 <extension url="question"> 1..1 Extension  <!-- 1..1 Question that must be answered -->
  <valueString value="[string]"/><!-- 1..1 Value of extension -->
 </extension>
 <extension url="answered"> 0..1 Extension  <!-- 0..1 when answered or not -->
  <valueBoolean value="[boolean]"/><!-- 1..1 Value of extension -->
 </extension>
 <extension url="answer"> 0..1 Extension  <!-- 0..1 Value question must have -->
  <value[x]><!-- 1..1 boolean|integer|decimal|base64Binary|
    instant|string|uri|date|dateTime|time|code|oid|id|unsignedInt|positiveInt|
    markdown|Annotation|Attachment|Identifier|CodeableConcept|Coding|Quantity|
    Range|Period|Ratio|SampledData|Signature|HumanName|Address|ContactPoint|
    Timing|Reference|Meta Value of extension --></value[x]>
 </extension>
</extension>

JSON Template

{ // Only allow data when:
    "extension" : [ //  sliced by url  in the specified orderOpen
      { // Question that must be answered // R! 
        // from Element: extension
        "url" : "question", // R! 
        "valueString" : "<string>" // R! Value of extension
      },
      { // when answered or not //
        // from Element: extension
        "url" : "answered", // R! 
        "valueBoolean" : <boolean> // R! Value of extension
      },
      { // Value question must have //
        // from Element: extension
        "url" : "answer", // R! 
// value[x]: Value of extension. One of these 33:
        "valueBoolean" : <boolean> // R! Value of extension
        "valueInteger" : <integer>, // R! Value of extension
        "valueDecimal" : <decimal>, // R! Value of extension
        "valueBase64Binary" : "<base64Binary>", // R! Value of extension
        "valueInstant" : "<instant>", // R! Value of extension
        "valueString" : "<string>", // R! Value of extension
        "valueUri" : "<uri>", // R! Value of extension
        "valueDate" : "<date>", // R! Value of extension
        "valueDateTime" : "<dateTime>", // R! Value of extension
        "valueTime" : "<time>", // R! Value of extension
        "valueCode" : "<code>", // R! Value of extension
        "valueOid" : "<oid>", // R! Value of extension
        "valueId" : "<id>", // R! Value of extension
        "valueUnsignedInt" : "<unsignedInt>", // R! Value of extension
        "valuePositiveInt" : "<positiveInt>", // R! Value of extension
        "valueMarkdown" : "<markdown>", // R! Value of extension
        "valueAnnotation" : { Annotation }, // R! Value of extension
        "valueAttachment" : { Attachment }, // R! Value of extension
        "valueIdentifier" : { Identifier }, // R! Value of extension
        "valueCodeableConcept" : { CodeableConcept }, // R! Value of extension
        "valueCoding" : { Coding }, // R! Value of extension
        "valueQuantity" : { Quantity }, // R! Value of extension
        "valueRange" : { Range }, // R! Value of extension
        "valuePeriod" : { Period }, // R! Value of extension
        "valueRatio" : { Ratio }, // R! Value of extension
        "valueSampledData" : { SampledData }, // R! Value of extension
        "valueSignature" : { Signature }, // R! Value of extension
        "valueHumanName" : { HumanName }, // R! Value of extension
        "valueAddress" : { Address }, // R! Value of extension
        "valueContactPoint" : { ContactPoint }, // R! Value of extension
        "valueTiming" : { Timing }, // R! Value of extension
        "valueReference" : { Reference }, // R! Value of extension
        "valueMeta" : { Meta }, // R! Value of extension
      }
    ],
    "url" : "http://hl7.org/fhir/StructureDefinition/questionnaire-enableWhen", // R! 
// value[x]: Value of extension. One of these 33:
  }

Summary

NameFlagsCard.TypeDescription & Constraintsdoco
.. extension0..*ExtensionURL = http://hl7.org/fhir/StructureDefinition/questionnaire-enableWhen
Only allow data when:: If present, indicates that the item containing the extension should only be enabled (displayed/allow answers to be captured) when the specified condition is true.
Use on element: Questionnaire.item, Questionnaire.item.item
... question1..1stringThe linkId for the question whose answer (or lack of answer) governs whether the question is enabled.
... answered0..1booleanIf present, allows the assertion to control whether the item is enabled when the question is answered or is unanswered.
... answer0..1boolean, integer, decimal, base64Binary, instant, string, uri, date, dateTime, time, code, oid, id, unsignedInt, positiveInt, markdown, Annotation, Attachment, Identifier, CodeableConcept, Coding, Quantity, Range, Period, Ratio, SampledData, Signature, HumanName, Address, ContactPoint, Timing, Reference(Reference), MetaIf present, then the specified question must match the specified answer for all components present in the enableWhen.answer.

doco Documentation for this format

Full Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. extension0..*ExtensionURL = http://hl7.org/fhir/StructureDefinition/questionnaire-enableWhen
Only allow data when:: If present, indicates that the item containing the extension should only be enabled (displayed/allow answers to be captured) when the specified condition is true.
Use on element: Questionnaire.item, Questionnaire.item.item
... extension 1..1ExtensionQuestion that must be answered
.... extension 0..0
.... url 1..1uri"question"
.... valueString 1..1stringValue of extension
... extension 0..1Extensionwhen answered or not
.... extension 0..0
.... url 1..1uri"answered"
.... valueBoolean 1..1booleanValue of extension
... extension 0..1ExtensionValue question must have
.... extension 0..0
.... url 1..1uri"answer"
.... value[x] 1..1boolean, integer, decimal, base64Binary, instant, string, uri, date, dateTime, time, code, oid, id, unsignedInt, positiveInt, markdown, Annotation, Attachment, Identifier, CodeableConcept, Coding, Quantity, Range, Period, Ratio, SampledData, Signature, HumanName, Address, ContactPoint, Timing, Reference(Reference), MetaValue of extension
... url 1..1uri"http://hl7.org/fhir/StructureDefinition/questionnaire-enableWhen"
... value[x] 0..0

doco Documentation for this format

XML Template

<!-- Only allow data when: -->doco

<extension xmlns="http://hl7.org/fhir"
     url="http://hl7.org/fhir/StructureDefinition/questionnaire-enableWhen" >
 <-- extension sliced by url  in the specified orderOpen-->
 <extension url="question"> 1..1 Extension  <!-- 1..1 Question that must be answered -->
  <valueString value="[string]"/><!-- 1..1 Value of extension -->
 </extension>
 <extension url="answered"> 0..1 Extension  <!-- 0..1 when answered or not -->
  <valueBoolean value="[boolean]"/><!-- 1..1 Value of extension -->
 </extension>
 <extension url="answer"> 0..1 Extension  <!-- 0..1 Value question must have -->
  <value[x]><!-- 1..1 boolean|integer|decimal|base64Binary|
    instant|string|uri|date|dateTime|time|code|oid|id|unsignedInt|positiveInt|
    markdown|Annotation|Attachment|Identifier|CodeableConcept|Coding|Quantity|
    Range|Period|Ratio|SampledData|Signature|HumanName|Address|ContactPoint|
    Timing|Reference|Meta Value of extension --></value[x]>
 </extension>
</extension>

JSON Template

{ // Only allow data when:
    "extension" : [ //  sliced by url  in the specified orderOpen
      { // Question that must be answered // R! 
        // from Element: extension
        "url" : "question", // R! 
        "valueString" : "<string>" // R! Value of extension
      },
      { // when answered or not //
        // from Element: extension
        "url" : "answered", // R! 
        "valueBoolean" : <boolean> // R! Value of extension
      },
      { // Value question must have //
        // from Element: extension
        "url" : "answer", // R! 
// value[x]: Value of extension. One of these 33:
        "valueBoolean" : <boolean> // R! Value of extension
        "valueInteger" : <integer>, // R! Value of extension
        "valueDecimal" : <decimal>, // R! Value of extension
        "valueBase64Binary" : "<base64Binary>", // R! Value of extension
        "valueInstant" : "<instant>", // R! Value of extension
        "valueString" : "<string>", // R! Value of extension
        "valueUri" : "<uri>", // R! Value of extension
        "valueDate" : "<date>", // R! Value of extension
        "valueDateTime" : "<dateTime>", // R! Value of extension
        "valueTime" : "<time>", // R! Value of extension
        "valueCode" : "<code>", // R! Value of extension
        "valueOid" : "<oid>", // R! Value of extension
        "valueId" : "<id>", // R! Value of extension
        "valueUnsignedInt" : "<unsignedInt>", // R! Value of extension
        "valuePositiveInt" : "<positiveInt>", // R! Value of extension
        "valueMarkdown" : "<markdown>", // R! Value of extension
        "valueAnnotation" : { Annotation }, // R! Value of extension
        "valueAttachment" : { Attachment }, // R! Value of extension
        "valueIdentifier" : { Identifier }, // R! Value of extension
        "valueCodeableConcept" : { CodeableConcept }, // R! Value of extension
        "valueCoding" : { Coding }, // R! Value of extension
        "valueQuantity" : { Quantity }, // R! Value of extension
        "valueRange" : { Range }, // R! Value of extension
        "valuePeriod" : { Period }, // R! Value of extension
        "valueRatio" : { Ratio }, // R! Value of extension
        "valueSampledData" : { SampledData }, // R! Value of extension
        "valueSignature" : { Signature }, // R! Value of extension
        "valueHumanName" : { HumanName }, // R! Value of extension
        "valueAddress" : { Address }, // R! Value of extension
        "valueContactPoint" : { ContactPoint }, // R! Value of extension
        "valueTiming" : { Timing }, // R! Value of extension
        "valueReference" : { Reference }, // R! Value of extension
        "valueMeta" : { Meta }, // R! Value of extension
      }
    ],
    "url" : "http://hl7.org/fhir/StructureDefinition/questionnaire-enableWhen", // R! 
// value[x]: Value of extension. One of these 33:
  }

 

Constraints

  • inv-5: enableWhen must contain either an 'answer' or an 'answered' element (xpath: f:extension[@url=('answered', 'answer')])