Release 5 Draft Ballot

This page is part of the FHIR Specification (v4.6.0: R5 Draft Ballot). 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: QuestionnaireOptionRestriction

FHIR Infrastructure Work Group Maturity Level: 1InformativeUse Context: Any

URL for this extension:

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

Status: draft. Extension maintained by: HL7

Allows disabling certain questionnaire options for the containing item based on evaluating expressions.

Context of Use: Use on Element ID Questionnaire.item, with Context Invariant = answerValueset or answerOption

Extension Content

Summary

NameFlagsCard.TypeDescription & Constraintsdoco
.. QuestionnaireOptionRestriction0..*ExtensionURL = http://hl7.org/fhir/StructureDefinition/questionnaire-optionRestriction
QuestionnaireOptionRestriction: Allows disabling certain questionnaire options for the containing item based on evaluating expressions.


Use on Element ID Questionnaire.item, with <a href="structuredefinition-definitions.html#StructureDefinition.contextInvariant">Context Invariant</a> = <code>answerValueset or answerOption</code>
... option1..*integer, date, time, string, Coding, Reference()Indicates one or more options that should be disabled if the specified expression evaluates to true

... requirements1..1ExpressionThe expression to evaluate. If the evaluation results in true, then the specified options will be suppressed.


doco Documentation for this format

Full Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. extension0..*ExtensionURL = http://hl7.org/fhir/StructureDefinition/questionnaire-optionRestriction
QuestionnaireOptionRestriction: Allows disabling certain questionnaire options for the containing item based on evaluating expressions.


Use on Element ID Questionnaire.item, with <a href="structuredefinition-definitions.html#StructureDefinition.contextInvariant">Context Invariant</a> = <code>answerValueset or answerOption</code>
... extension 0..*ExtensionAdditional content defined by implementations
Slice: Unordered, Open by value:url
... extension:option 1..*ExtensionOption to exclude
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..0
.... url 1..1uri"option"
.... value[x] 1..1Value of extension
..... valueIntegerinteger
..... valueDatedate
..... valueTimetime
..... valueStringstring
..... valueCodingCoding
..... valueReferenceReference(Any)
... extension:expression 1..1ExtensionExpression to trigger exclusion
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..0
.... url 1..1uri"requirements"
.... value[x] 1..1ExpressionValue of extension
... value[x] 0..1Value of extension
.... valueBase64Binarybase64Binary
.... valueBooleanboolean
.... valueCanonicalcanonical(Any)
.... valueCodecode
.... valueDatedate
.... valueDateTimedateTime
.... valueDecimaldecimal
.... valueIdid
.... valueInstantinstant
.... valueIntegerinteger
.... valueInteger64integer64
.... valueMarkdownmarkdown
.... valueOidoid
.... valuePositiveIntpositiveInt
.... valueStringstring
.... valueTimetime
.... valueUnsignedIntunsignedInt
.... valueUriuri
.... valueUrlurl
.... valueUuiduuid
.... valueAddressAddress
.... valueAgeAge
.... valueAnnotationAnnotation
.... valueAttachmentAttachment
.... valueCodeableConceptCodeableConcept
.... valueCodingCoding
.... valueContactPointContactPoint
.... valueCountCount
.... valueDistanceDistance
.... valueDurationDuration
.... valueHumanNameHumanName
.... valueIdentifierIdentifier
.... valueMoneyMoney
.... valuePeriodPeriod
.... valueQuantityQuantity
.... valueRangeRange
.... valueRatioRatio
.... valueReferenceReference(Any)
.... valueSampledDataSampledData
.... valueSignatureSignature
.... valueTimingTiming
.... valueContactDetailContactDetail
.... valueContributorContributor
.... valueDataRequirementDataRequirement
.... valueExpressionExpression
.... valueParameterDefinitionParameterDefinition
.... valueRelatedArtifactRelatedArtifact
.... valueTriggerDefinitionTriggerDefinition
.... valueUsageContextUsageContext
.... valueDosageDosage
.... valueMetaMeta

doco Documentation for this format

XML Template

<!-- QuestionnaireOptionRestriction -->doco

<extension xmlns="http://hl7.org/fhir"
     url="http://hl7.org/fhir/StructureDefinition/questionnaire-optionRestriction" >
 <-- extension sliced by value:url  in the specified orderOpen-->
 <extension url="option"> ?? 1..* Extension  <!-- ?? 1..* Option to exclude -->
  <value[x]><!-- ?? 1..1 integer|date|time|string|Coding|
    Reference Value of extension --></value[x]>
 </extension>
 <extension url="requirements"> ?? 1..1 Extension  <!-- ?? 1..1 Expression to trigger exclusion -->
  <valueExpression><!-- ?? 1..1 Expression 
      Value of extension --></valueExpression>
 </extension>
 <value[x]><!-- ?? 0..1 base64Binary|boolean|canonical|code|date|dateTime|
   decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|
   unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|
   Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|
   Quantity|Range|Ratio|Reference|SampledData|Signature|Timing|ContactDetail|
   Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|
   TriggerDefinition|UsageContext|Dosage|Meta Value of extension --></value[x]>
</extension>

JSON Template

{ // QuestionnaireOptionRestriction
    "extension" : [ //  sliced by value:url  in the specified order, Open 
      { // Option to exclude // C? R! 
        // from Element: extension
        "extension" : [ //  sliced by value:url  in the specified order, Open ]
        "url" : "option", // R! 
// value[x]: Value of extension. One of these 6:
        "valueInteger" : <integer> // C? R! Value of extension
        "valueDate" : "<date>", // C? R! Value of extension
        "valueTime" : "<time>", // C? R! Value of extension
        "valueString" : "<string>", // C? R! Value of extension
        "valueCoding" : { Coding }, // C? R! Value of extension
        "valueReference" : { Reference }, // C? R! Value of extension
      },
      { // Expression to trigger exclusion // C? R! 
        // from Element: extension
        "extension" : [ //  sliced by value:url  in the specified order, Open ]
        "url" : "requirements", // R! 
        "valueExpression" : { Expression } // C? R! Value of extension
      }
    ],
    "url" : "http://hl7.org/fhir/StructureDefinition/questionnaire-optionRestriction", // R! 
// value[x]: Value of extension. One of these 51:
    "valueBase64Binary" : "<base64Binary>", // C?Value of extension
    "valueBoolean" : <boolean>, // C?Value of extension
    "valueCanonical" : "<canonical>" // C?Value of extension
    "valueCode" : "<code>", // C?Value of extension
    "valueDate" : "<date>", // C?Value of extension
    "valueDateTime" : "<dateTime>", // C?Value of extension
    "valueDecimal" : <decimal>, // C?Value of extension
    "valueId" : "<id>", // C?Value of extension
    "valueInstant" : "<instant>", // C?Value of extension
    "valueInteger" : <integer>, // C?Value of extension
    "valueInteger64" : "<integer64>", // C?Value of extension
    "valueMarkdown" : "<markdown>", // C?Value of extension
    "valueOid" : "<oid>", // C?Value of extension
    "valuePositiveInt" : "<positiveInt>", // C?Value of extension
    "valueString" : "<string>", // C?Value of extension
    "valueTime" : "<time>", // C?Value of extension
    "valueUnsignedInt" : "<unsignedInt>", // C?Value of extension
    "valueUri" : "<uri>", // C?Value of extension
    "valueUrl" : "<url>", // C?Value of extension
    "valueUuid" : "<uuid>", // C?Value of extension
    "valueAddress" : { Address }, // C?Value of extension
    "valueAge" : { Age }, // C?Value of extension
    "valueAnnotation" : { Annotation }, // C?Value of extension
    "valueAttachment" : { Attachment }, // C?Value of extension
    "valueCodeableConcept" : { CodeableConcept }, // C?Value of extension
    "valueCoding" : { Coding }, // C?Value of extension
    "valueContactPoint" : { ContactPoint }, // C?Value of extension
    "valueCount" : { Count }, // C?Value of extension
    "valueDistance" : { Distance }, // C?Value of extension
    "valueDuration" : { Duration }, // C?Value of extension
    "valueHumanName" : { HumanName }, // C?Value of extension
    "valueIdentifier" : { Identifier }, // C?Value of extension
    "valueMoney" : { Money }, // C?Value of extension
    "valuePeriod" : { Period }, // C?Value of extension
    "valueQuantity" : { Quantity }, // C?Value of extension
    "valueRange" : { Range }, // C?Value of extension
    "valueRatio" : { Ratio }, // C?Value of extension
    "valueReference" : { Reference }, // C?Value of extension
    "valueSampledData" : { SampledData }, // C?Value of extension
    "valueSignature" : { Signature }, // C?Value of extension
    "valueTiming" : { Timing }, // C?Value of extension
    "valueContactDetail" : { ContactDetail }, // C?Value of extension
    "valueContributor" : { Contributor }, // C?Value of extension
    "valueDataRequirement" : { DataRequirement }, // C?Value of extension
    "valueExpression" : { Expression }, // C?Value of extension
    "valueParameterDefinition" : { ParameterDefinition }, // C?Value of extension
    "valueRelatedArtifact" : { RelatedArtifact }, // C?Value of extension
    "valueTriggerDefinition" : { TriggerDefinition }, // C?Value of extension
    "valueUsageContext" : { UsageContext }, // C?Value of extension
    "valueDosage" : { Dosage }, // C?Value of extension
    "valueMeta" : { Meta }, // C?Value of extension
  }

Summary

NameFlagsCard.TypeDescription & Constraintsdoco
.. QuestionnaireOptionRestriction0..*ExtensionURL = http://hl7.org/fhir/StructureDefinition/questionnaire-optionRestriction
QuestionnaireOptionRestriction: Allows disabling certain questionnaire options for the containing item based on evaluating expressions.


Use on Element ID Questionnaire.item, with <a href="structuredefinition-definitions.html#StructureDefinition.contextInvariant">Context Invariant</a> = <code>answerValueset or answerOption</code>
... option1..*integer, date, time, string, Coding, Reference()Indicates one or more options that should be disabled if the specified expression evaluates to true

... requirements1..1ExpressionThe expression to evaluate. If the evaluation results in true, then the specified options will be suppressed.


doco Documentation for this format

Full Structure

NameFlagsCard.TypeDescription & Constraintsdoco
.. extension0..*ExtensionURL = http://hl7.org/fhir/StructureDefinition/questionnaire-optionRestriction
QuestionnaireOptionRestriction: Allows disabling certain questionnaire options for the containing item based on evaluating expressions.


Use on Element ID Questionnaire.item, with <a href="structuredefinition-definitions.html#StructureDefinition.contextInvariant">Context Invariant</a> = <code>answerValueset or answerOption</code>
... extension 0..*ExtensionAdditional content defined by implementations
Slice: Unordered, Open by value:url
... extension:option 1..*ExtensionOption to exclude
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..0
.... url 1..1uri"option"
.... value[x] 1..1Value of extension
..... valueIntegerinteger
..... valueDatedate
..... valueTimetime
..... valueStringstring
..... valueCodingCoding
..... valueReferenceReference(Any)
... extension:expression 1..1ExtensionExpression to trigger exclusion
.... id 0..1stringUnique id for inter-element referencing
.... extension 0..0
.... url 1..1uri"requirements"
.... value[x] 1..1ExpressionValue of extension
... value[x] 0..1Value of extension
.... valueBase64Binarybase64Binary
.... valueBooleanboolean
.... valueCanonicalcanonical(Any)
.... valueCodecode
.... valueDatedate
.... valueDateTimedateTime
.... valueDecimaldecimal
.... valueIdid
.... valueInstantinstant
.... valueIntegerinteger
.... valueInteger64integer64
.... valueMarkdownmarkdown
.... valueOidoid
.... valuePositiveIntpositiveInt
.... valueStringstring
.... valueTimetime
.... valueUnsignedIntunsignedInt
.... valueUriuri
.... valueUrlurl
.... valueUuiduuid
.... valueAddressAddress
.... valueAgeAge
.... valueAnnotationAnnotation
.... valueAttachmentAttachment
.... valueCodeableConceptCodeableConcept
.... valueCodingCoding
.... valueContactPointContactPoint
.... valueCountCount
.... valueDistanceDistance
.... valueDurationDuration
.... valueHumanNameHumanName
.... valueIdentifierIdentifier
.... valueMoneyMoney
.... valuePeriodPeriod
.... valueQuantityQuantity
.... valueRangeRange
.... valueRatioRatio
.... valueReferenceReference(Any)
.... valueSampledDataSampledData
.... valueSignatureSignature
.... valueTimingTiming
.... valueContactDetailContactDetail
.... valueContributorContributor
.... valueDataRequirementDataRequirement
.... valueExpressionExpression
.... valueParameterDefinitionParameterDefinition
.... valueRelatedArtifactRelatedArtifact
.... valueTriggerDefinitionTriggerDefinition
.... valueUsageContextUsageContext
.... valueDosageDosage
.... valueMetaMeta

doco Documentation for this format

XML Template

<!-- QuestionnaireOptionRestriction -->doco

<extension xmlns="http://hl7.org/fhir"
     url="http://hl7.org/fhir/StructureDefinition/questionnaire-optionRestriction" >
 <-- extension sliced by value:url  in the specified orderOpen-->
 <extension url="option"> ?? 1..* Extension  <!-- ?? 1..* Option to exclude -->
  <value[x]><!-- ?? 1..1 integer|date|time|string|Coding|
    Reference Value of extension --></value[x]>
 </extension>
 <extension url="requirements"> ?? 1..1 Extension  <!-- ?? 1..1 Expression to trigger exclusion -->
  <valueExpression><!-- ?? 1..1 Expression 
      Value of extension --></valueExpression>
 </extension>
 <value[x]><!-- ?? 0..1 base64Binary|boolean|canonical|code|date|dateTime|
   decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|
   unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|
   Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|
   Quantity|Range|Ratio|Reference|SampledData|Signature|Timing|ContactDetail|
   Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|
   TriggerDefinition|UsageContext|Dosage|Meta Value of extension --></value[x]>
</extension>

JSON Template

{ // QuestionnaireOptionRestriction
    "extension" : [ //  sliced by value:url  in the specified order, Open 
      { // Option to exclude // C? R! 
        // from Element: extension
        "extension" : [ //  sliced by value:url  in the specified order, Open ]
        "url" : "option", // R! 
// value[x]: Value of extension. One of these 6:
        "valueInteger" : <integer> // C? R! Value of extension
        "valueDate" : "<date>", // C? R! Value of extension
        "valueTime" : "<time>", // C? R! Value of extension
        "valueString" : "<string>", // C? R! Value of extension
        "valueCoding" : { Coding }, // C? R! Value of extension
        "valueReference" : { Reference }, // C? R! Value of extension
      },
      { // Expression to trigger exclusion // C? R! 
        // from Element: extension
        "extension" : [ //  sliced by value:url  in the specified order, Open ]
        "url" : "requirements", // R! 
        "valueExpression" : { Expression } // C? R! Value of extension
      }
    ],
    "url" : "http://hl7.org/fhir/StructureDefinition/questionnaire-optionRestriction", // R! 
// value[x]: Value of extension. One of these 51:
    "valueBase64Binary" : "<base64Binary>", // C?Value of extension
    "valueBoolean" : <boolean>, // C?Value of extension
    "valueCanonical" : "<canonical>" // C?Value of extension
    "valueCode" : "<code>", // C?Value of extension
    "valueDate" : "<date>", // C?Value of extension
    "valueDateTime" : "<dateTime>", // C?Value of extension
    "valueDecimal" : <decimal>, // C?Value of extension
    "valueId" : "<id>", // C?Value of extension
    "valueInstant" : "<instant>", // C?Value of extension
    "valueInteger" : <integer>, // C?Value of extension
    "valueInteger64" : "<integer64>", // C?Value of extension
    "valueMarkdown" : "<markdown>", // C?Value of extension
    "valueOid" : "<oid>", // C?Value of extension
    "valuePositiveInt" : "<positiveInt>", // C?Value of extension
    "valueString" : "<string>", // C?Value of extension
    "valueTime" : "<time>", // C?Value of extension
    "valueUnsignedInt" : "<unsignedInt>", // C?Value of extension
    "valueUri" : "<uri>", // C?Value of extension
    "valueUrl" : "<url>", // C?Value of extension
    "valueUuid" : "<uuid>", // C?Value of extension
    "valueAddress" : { Address }, // C?Value of extension
    "valueAge" : { Age }, // C?Value of extension
    "valueAnnotation" : { Annotation }, // C?Value of extension
    "valueAttachment" : { Attachment }, // C?Value of extension
    "valueCodeableConcept" : { CodeableConcept }, // C?Value of extension
    "valueCoding" : { Coding }, // C?Value of extension
    "valueContactPoint" : { ContactPoint }, // C?Value of extension
    "valueCount" : { Count }, // C?Value of extension
    "valueDistance" : { Distance }, // C?Value of extension
    "valueDuration" : { Duration }, // C?Value of extension
    "valueHumanName" : { HumanName }, // C?Value of extension
    "valueIdentifier" : { Identifier }, // C?Value of extension
    "valueMoney" : { Money }, // C?Value of extension
    "valuePeriod" : { Period }, // C?Value of extension
    "valueQuantity" : { Quantity }, // C?Value of extension
    "valueRange" : { Range }, // C?Value of extension
    "valueRatio" : { Ratio }, // C?Value of extension
    "valueReference" : { Reference }, // C?Value of extension
    "valueSampledData" : { SampledData }, // C?Value of extension
    "valueSignature" : { Signature }, // C?Value of extension
    "valueTiming" : { Timing }, // C?Value of extension
    "valueContactDetail" : { ContactDetail }, // C?Value of extension
    "valueContributor" : { Contributor }, // C?Value of extension
    "valueDataRequirement" : { DataRequirement }, // C?Value of extension
    "valueExpression" : { Expression }, // C?Value of extension
    "valueParameterDefinition" : { ParameterDefinition }, // C?Value of extension
    "valueRelatedArtifact" : { RelatedArtifact }, // C?Value of extension
    "valueTriggerDefinition" : { TriggerDefinition }, // C?Value of extension
    "valueUsageContext" : { UsageContext }, // C?Value of extension
    "valueDosage" : { Dosage }, // C?Value of extension
    "valueMeta" : { Meta }, // C?Value of extension
  }

 

Constraints

  • ele-1: All FHIR elements must have a @value or children (xpath: @value|f:*|h:div)
  • ext-1: Must have either extensions or value[x], not both (xpath: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')]))
  • ele-1: On Extension.extension: All FHIR elements must have a @value or children (xpath on Extension.extension: @value|f:*|h:div)
  • ext-1: On Extension.extension: Must have either extensions or value[x], not both (xpath on Extension.extension: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")]))
  • ele-1: On Extension.extension: All FHIR elements must have a @value or children (xpath on Extension.extension: @value|f:*|h:div)
  • ext-1: On Extension.extension: Must have either extensions or value[x], not both (xpath on Extension.extension: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")]))
  • ele-1: On Extension.extension.extension: All FHIR elements must have a @value or children (xpath on Extension.extension.extension: @value|f:*|h:div)
  • ext-1: On Extension.extension.extension: Must have either extensions or value[x], not both (xpath on Extension.extension.extension: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")]))
  • ele-1: On Extension.extension.value[x]: All FHIR elements must have a @value or children (xpath on Extension.extension.value[x]: @value|f:*|h:div)
  • ele-1: On Extension.extension: All FHIR elements must have a @value or children (xpath on Extension.extension: @value|f:*|h:div)
  • ext-1: On Extension.extension: Must have either extensions or value[x], not both (xpath on Extension.extension: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")]))
  • ele-1: On Extension.extension.extension: All FHIR elements must have a @value or children (xpath on Extension.extension.extension: @value|f:*|h:div)
  • ext-1: On Extension.extension.extension: Must have either extensions or value[x], not both (xpath on Extension.extension.extension: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")]))
  • ele-1: On Extension.extension.value[x]: All FHIR elements must have a @value or children (xpath on Extension.extension.value[x]: @value|f:*|h:div)
  • ele-1: On Extension.value[x]: All FHIR elements must have a @value or children (xpath on Extension.value[x]: @value|f:*|h:div)