<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="questionnaire-allowedResource" />
  <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-allowedResource" />
  <name value="allowedResource" />
  <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="Where the type for a question is &quot;Reference&quot;, indicates a type of resource that is permitted." />
  <fhirVersion value="3.0.1" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <kind value="complex-type" />
  <abstract value="false" />
  <contextType value="resource" />
  <context value="Questionnaire.item" />
  <context value="Questionnaire.item.item" />
  <contextInvariant value="type='reference'" />
  <type value="Extension" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
  <derivation value="constraint" />
  <differential>
    <element id="Extension">
      <path value="Extension" />
      <short value="Allowed resource for reference" />
      <definition value="Where the type for a question is &quot;Reference&quot;, indicates a type of resource that is permitted." />
      <comment value="This extension only has meaning if the question.type = Reference.  If no allowedResource extensions are present, the presumption is that any type of resource is permitted.  If multiple are present, then any of the specified types are permitted." />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="rim" />
        <map value="N/A - MIF rather than RIM level" />
      </mapping>
    </element>
    <element id="Extension.extension">
      <path value="Extension.extension" />
      <max value="0" />
    </element>
    <element id="Extension.url">
      <path value="Extension.url" />
      <type>
        <code value="uri" />
      </type>
      <fixedUri value="http://hl7.org/fhir/StructureDefinition/questionnaire-allowedResource" />
    </element>
    <element id="Extension.valueCode">
      <path value="Extension.valueCode" />
      <type>
        <code value="code" />
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="ResourceType" />
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true" />
        </extension>
        <strength value="required" />
        <description value="One of the resource types defined as part of FHIR." />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/resource-types" />
        </valueSetReference>
      </binding>
    </element>
  </differential>
</StructureDefinition>