<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="spark393" />
  <meta>
    <versionId value="spark393" />
    <lastUpdated value="2015-10-02T12:26:57.227+00:00" />
  </meta>
  <url value="http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs" />
  <name value="Maximum repetitions" />
  <status value="draft" />
  <date value="2013-07-04" />
  <publisher value="HL7" />
  <contact>
    <telecom>
      <system value="other" />
      <value value="http://www.hl7.org" />
    </telecom>
  </contact>
  <description value="The maximum number of times the group must appear or the minimum number of answers for a question - when greater than 1 and not unlimited." />
  <fhirVersion value="1.0.1" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM" />
  </mapping>
  <kind value="datatype" />
  <abstract value="false" />
  <contextType value="resource" />
  <context value="Questionnaire.group" />
  <context value="Questionnaire.group.group" />
  <context value="Questionnaire.group.question" />
  <snapshot>
    <element id="Extension">
      <path value="Extension" />
      <short value="Maximum repetitions" />
      <definition value="The maximum number of times the group must appear or the minimum number of answers for a question - when greater than 1 and not unlimited." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
      </type>
      <constraint>
        <key value="inv-2" />
        <severity value="error" />
        <human value="maxOccurs can't be more than one if repeats is false" />
        <xpath value="f:valueInteger/@value&lt;=1 or parent::*/f:repeats/@value=true()" />
        <source value="http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="N/A - MIF rather than RIM level" />
      </mapping>
      <comments value="Only relevant if the element has repeats=true and there's a need to constrain the number of allowed repetitions." />
    </element>
  </snapshot>
  <differential>
    <element>
      <path value="Extension" />
      <short value="Maximum repetitions" />
      <definition value="The maximum number of times the group must appear or the minimum number of answers for a question - when greater than 1 and not unlimited." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
      </type>
      <constraint>
        <key value="inv-2" />
        <severity value="error" />
        <human value="maxOccurs can't be more than one if repeats is false" />
        <xpath value="f:valueInteger/@value&lt;=1 or parent::*/f:repeats/@value=true()" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="N/A - MIF rather than RIM level" />
      </mapping>
      <comments value="Only relevant if the element has repeats=true and there's a need to constrain the number of allowed repetitions." />
    </element>
    <element>
      <path value="Extension.extension" />
      <max value="0" />
      <name value="extension" />
    </element>
    <element>
      <path value="Extension.url" />
      <type>
        <code value="uri" />
      </type>
      <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-maxOccurs" />
    </element>
    <element>
      <path value="Extension.value[x]" />
      <min value="1" />
      <type>
        <code value="integer" />
      </type>
    </element>
  </differential>
  <constrainedType value="Extension" />
  <base value="http://hl7.org/fhir/StructureDefinition/Extension" />
</StructureDefinition>