<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="medication-listId" />
  <url value="http://hl7.org/fhir/StructureDefinition/medication-listId" />
  <version value="4.0" />
  <name value="medication-listId" />
  <title value="Medication Statement List ID" />
  <status value="draft" />
  <publisher value="Orion Health" />
  <description value="Indicates the ID of the list from where this MedicationStatement was sourced" />
  <purpose value="This extension allows for the ID of the list from where this MedicationStatement was sourced to be specified. This is used in conjunction with the medication-listDescription and medication-listPublishedDate extensions" />
  <fhirVersion value="4.0" />
  <kind value="complex-type" />
  <abstract value="false" />
  <type value="Extension" />
  <snapshot>
    <element id="Extension">
      <path value="Extension" />
      <max value="1" />
      <base>
        <path value="Extension" />
        <max value="1" />
      </base>
    </element>
    <element id="Extension.url">
      <path value="Extension.url" />
      <base>
        <path value="Extension.url" />
      </base>
      <fixedUri value="http://hl7.org/fhir/StructureDefinition/medication-listId" />
    </element>
    <element id="Extension.value[x]">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="Extension.value[x]" />
      <short value="Indicates the ID of the list from where this MedicationStatement was sourced" />
      <definition value="Set the ID of the list" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="Extension.value[x]" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="Identifier" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]" />
      </mapping>
      <mapping>
        <identity value="servd" />
        <map value="Identifier" />
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="Extension">
      <path value="Extension" />
      <max value="1" />
    </element>
    <element id="Extension.url">
      <path value="Extension.url" />
      <fixedUri value="http://hl7.org/fhir/StructureDefinition/medication-listId" />
    </element>
    <element id="Extension.value[x]">
      <path value="Extension.value[x]" />
      <short value="Indicates the ID of the list from where this MedicationStatement was sourced" />
      <definition value="Set the ID of the list" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Identifier" />
      </type>
    </element>
  </differential>
</StructureDefinition>