<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="Routing-Options-EXT" />
  <url value="http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/Routing-Options-EXT" />
  <name value="RoutingOptions" />
  <title value="RoutingOptions" />
  <status value="draft" />
  <description value="Some referral processes may ask the referrer to provide some data that impacts the performer's automated referral processing rules. The rules for how a performer processes their referrals can be unique to the performer. Some examples include routing based on:  &#xA; - The type of referrer (from the hospital, primary care, out of province, etc...) &#xA; - The patient's Postal Code FSA (e.g., K8N, L0L, etc...)  &#xA; - The first letter of the patient's last name (e.g., A-J, K-Z)  To handle this, use this extension, which is included in both the ServiceRequest AND MessageHeader (for add-service-request event) resources. By also including the extension in the MessageHeader, it makes it easier for implementers to find the key routing-related data fields without needing to dig further into the referral payload. &#xA;&#xA;  **Note**: When the eReferral process is combined with a service directory, the directory should be able to publish the valueSet of referral options that are available for a selected service." />
  <fhirVersion value="4.0.1" />
  <kind value="complex-type" />
  <abstract value="false" />
  <context>
    <type value="element" />
    <expression value="ServiceRequest" />
  </context>
  <context>
    <type value="element" />
    <expression value="MessageHeader" />
  </context>
  <type value="Extension" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
  <derivation value="constraint" />
  <differential>
    <element id="Extension">
      <path value="Extension" />
      <definition value="For Referral Source Type identification. Only one referral routing object is expected." />
    </element>
    <element id="Extension.extension">
      <path value="Extension.extension" />
      <max value="0" />
    </element>
    <element id="Extension.url">
      <path value="Extension.url" />
      <fixedUri value="http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/Routing-Options-EXT" />
    </element>
    <element id="Extension.value[x]">
      <path value="Extension.value[x]" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="http://fhir.infoway-inforoute.ca/io/CA-eReC/ValueSet/referral-source-types" />
      </binding>
    </element>
  </differential>
</StructureDefinition>