<StructureDefinition xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir file:///C:/Users/lloyd/Documents/SVN/fhir/publish/fhir-single.xsd">
  <id value="questionnaire-optionRestriction" />
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="fhir" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="1" />
  </extension>
  <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-optionRestriction" />
  <version value="4.6.0" />
  <name value="QuestionnaireOptionRestriction" />
  <title value="Questionnaire option restriction" />
  <status value="draft" />
  <date value="2013-07-04" />
  <publisher value="HL7" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://www.hl7.org" />
    </telecom>
  </contact>
  <description value="Allows disabling certain questionnaire options for the containing item based on evaluating expressions." />
  <fhirVersion value="4.6.0" />
  <kind value="complex-type" />
  <abstract value="false" />
  <context>
    <type value="element" />
    <expression value="Questionnaire.item" />
  </context>
  <contextInvariant value="answerValueset or answerOption" />
  <type value="Extension" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
  <derivation value="constraint" />
  <differential>
    <element id="Extension">
      <path value="Extension" />
      <short value="Constraint" />
      <definition value="Allows disabling certain questionnaire options for the containing item based on evaluating expressions." />
      <min value="0" />
      <max value="*" />
    </element>
    <element id="Extension.extension:option">
      <path value="Extension.extension" />
      <sliceName value="option" />
      <short value="Option to exclude" />
      <definition value="Indicates one or more options that should be disabled if the specified expression evaluates to true" />
      <comment value="Options listed are expected to correspond to either answerOption values or Codings found in the answerValueset expansion.  Systems SHOULD treat non-matching answerOptions and MAY treat non-matching answerValueset Codings as an error." />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="Extension" />
      </type>
    </element>
    <element id="Extension.extension:option.extension">
      <path value="Extension.extension.extension" />
      <max value="0" />
    </element>
    <element id="Extension.extension:option.url">
      <path value="Extension.extension.url" />
      <type>
        <code value="uri" />
      </type>
      <fixedUri value="option" />
    </element>
    <element id="Extension.extension:option.value[x]">
      <path value="Extension.extension.value[x]" />
      <min value="1" />
      <type>
        <code value="integer" />
      </type>
      <type>
        <code value="date" />
      </type>
      <type>
        <code value="time" />
      </type>
      <type>
        <code value="string" />
      </type>
      <type>
        <code value="Coding" />
      </type>
      <type>
        <code value="Reference" />
      </type>
    </element>
    <element id="Extension.extension:expression">
      <path value="Extension.extension" />
      <sliceName value="expression" />
      <short value="Expression to trigger exclusion" />
      <definition value="The expression to evaluate.  If the evaluation results in true, then the specified options will be suppressed." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
      </type>
    </element>
    <element id="Extension.extension:expression.extension">
      <path value="Extension.extension.extension" />
      <max value="0" />
    </element>
    <element id="Extension.extension:requirements.url">
      <path value="Extension.extension.url" />
      <type>
        <code value="uri" />
      </type>
      <fixedUri value="requirements" />
    </element>
    <element id="Extension.extension:expression.value[x]">
      <path value="Extension.extension.value[x]" />
      <min value="1" />
      <type>
        <code value="Expression" />
      </type>
    </element>
    <element id="Extension.url">
      <path value="Extension.url" />
      <type>
        <code value="uri" />
      </type>
      <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-optionRestriction" />
    </element>
  </differential>
</StructureDefinition>