{
  "resourceType": "StructureDefinition",
  "id": "medication-groupIdentifier",
  "url": "http://hl7.org/fhir/StructureDefinition/medication-groupIdentifier",
  "version": "4.0",
  "name": "medication-groupIdentifier",
  "title": "Group Identifier",
  "status": "draft",
  "publisher": "Orion Health",
  "description": "A common identifier across a set of medications that were authored or dispensed simultaneously and can be used to group those medications together",
  "purpose": "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": "4.0",
  "kind": "complex-type",
  "abstract": false,
  "type": "Extension",
  "snapshot": {
    "element": [
      {
        "id": "Extension",
        "path": "Extension",
        "max": "1",
        "base": {
          "path": "Extension",
          "max": "1"
        }
      },
      {
        "id": "Extension.url",
        "path": "Extension.url",
        "base": {
          "path": "Extension.url"
        },
        "fixedUri": "http://hl7.org/fhir/StructureDefinition/medication-groupIdentifier"
      },
      {
        "id": "Extension.value[x]",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
            "valueCode": "normative"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
            "valueCode": "4.0.0"
          }
        ],
        "path": "Extension.value[x]",
        "short": "A common identifier across a set of medications that were authored or dispensed simultaneously and can be used to group those medications together",
        "definition": "Set the identifier of the medication group",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Extension.value[x]",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "condition": [
          "ele-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "v2",
            "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)"
          },
          {
            "identity": "rim",
            "map": "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]"
          },
          {
            "identity": "servd",
            "map": "Identifier"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "Extension",
        "path": "Extension",
        "max": "1"
      },
      {
        "id": "Extension.url",
        "path": "Extension.url",
        "fixedUri": "http://hl7.org/fhir/StructureDefinition/medication-groupIdentifier"
      },
      {
        "id": "Extension.value[x]",
        "path": "Extension.value[x]",
        "short": "A common identifier across a set of medications that were authored or dispensed simultaneously and can be used to group those medications together",
        "definition": "Set the identifier of the medication group",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ]
      }
    ]
  }
}