<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="medication-groupIdentifier" />
  <url value="http://hl7.org/fhir/StructureDefinition/medication-groupIdentifier" />
  <version value="4.0" />
  <name value="medication-groupIdentifier" />
  <title value="Group Identifier" />
  <status value="draft" />
  <publisher value="Orion Health" />
  <description value="A common identifier across a set of medications that were authored or dispensed simultaneously and can be used to group those medications together" />
  <purpose value="This extension is a common indentifier across a set of medications that were authored or dispensed simultaneously, for example a set of medications on the same prescription document, and can be used to group those medications together" />
  <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-groupIdentifier" />
    </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="A common identifier across a set of medications that were authored or dispensed simultaneously and can be used to group those medications together" />
      <definition value="Set the identifier of the medication group" />
      <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-groupIdentifier" />
    </element>
    <element id="Extension.value[x]">
      <path value="Extension.value[x]" />
      <short value="A common identifier across a set of medications that were authored or dispensed simultaneously and can be used to group those medications together" />
      <definition value="Set the identifier of the medication group" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Identifier" />
      </type>
    </element>
  </differential>
</StructureDefinition>