{
  "resourceType": "StructureDefinition",
  "id": "gem-erp-sr-log-message-copy",
  "url": "https://gematik.de/fhir/erp-servicerequest/StructureDefinition/gem-erp-sr-log-message-copy",
  "version": "1.2.0",
  "name": "GEM_ERP_SR_LOG_MessageCopy",
  "title": "ServiceRequest_Nachricht_Kopie",
  "status": "active",
  "experimental": false,
  "date": "2025-07-31",
  "publisher": "gematik GmbH",
  "description": "Fachliches Modell zur Beschreibung einer Kopie für die Pflegeeinrichtung.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "Nachrichten-Kopie-Fachliches-Mapping",
      "uri": "ERPServiceRequestRequestHeader",
      "name": "Nachrichten Kopie Fachliches Mapping",
      "comment": "Mapping des Fachmodells aus GEM_ERP_SR_LOG_MessageCopy auf das FHIR-Modell ERPServiceRequestRequestHeader"
    },
    {
      "identity": "Quelle-Message-Copy-Mapping",
      "name": "Quelle der Informationen für die Nachrichtenkopie",
      "comment": "Beschreibt die Quelle der Informationen für die Nachrichtenkopie. Diese werden immer versendet, wenn die Rezeptanforderung und deren Bestätigung zwischen Arzt und Apotheke ausgetauscht werden."
    }
  ],
  "kind": "logical",
  "abstract": false,
  "type": "https://gematik.de/fhir/erp-servicerequest/StructureDefinition/gem-erp-sr-log-message-copy",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Element",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "id": "gem-erp-sr-log-message-copy",
        "path": "gem-erp-sr-log-message-copy",
        "short": "ServiceRequest_Nachricht_Kopie",
        "definition": "Fachliches Modell zur Beschreibung einer Kopie für die Pflegeeinrichtung.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "gem-erp-sr-log-message-copy",
          "min": 0,
          "max": "*"
        },
        "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"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.id",
        "path": "gem-erp-sr-log-message-copy.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.extension",
        "path": "gem-erp-sr-log-message-copy.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "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"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten",
        "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": "gem-erp-sr-log-message-copy.MetaDaten",
        "short": "Metadaten im MessageHeader",
        "definition": "Metadaten im MessageHeader",
        "min": 1,
        "max": "1",
        "base": {
          "path": "gem-erp-sr-log-message-copy.MetaDaten",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "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": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.id",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.extension",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "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"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.modifierExtension",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.modifierExtension",
        "short": "Extensions that cannot be ignored even if unrecognized",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "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"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": true,
        "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger",
        "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": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger",
        "short": "Empfänger der Nachricht",
        "definition": "Empfänger der Nachricht",
        "min": 1,
        "max": "*",
        "base": {
          "path": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger",
          "min": 1,
          "max": "*"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "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": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.destination"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "VZD oder Rezeptanforderung",
            "comment": "Wenn die Nachricht initial erstellt wird kann die Apotheke die Informationen aus dem System oder VZD beziehen. Der Verordnende kann die Informationen aus der Rezeptanforderung beziehen."
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.id",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.extension",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "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"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.modifierExtension",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.modifierExtension",
        "short": "Extensions that cannot be ignored even if unrecognized",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "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"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": true,
        "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.KIMAdresse",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.KIMAdresse",
        "short": "KIM-Adresse des Empfängers",
        "definition": "KIM-Adresse des Empfängers",
        "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier",
        "min": 1,
        "max": "1",
        "base": {
          "path": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.KIMAdresse",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "url"
          }
        ],
        "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": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.destination.endpoint"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "VZD oder Rezeptanforderung",
            "comment": "Wenn die Nachricht initial erstellt wird kann die Apotheke die Informationen aus dem System oder VZD beziehen. Der Verordnende kann die Informationen aus der Rezeptanforderung beziehen."
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.TelematikID",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.TelematikID",
        "short": "Telematik-ID des Absenders",
        "definition": "Telematik-ID des Absenders",
        "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier",
        "min": 0,
        "max": "1",
        "base": {
          "path": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.TelematikID",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "url"
          }
        ],
        "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": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.destination.receiver.identifier.value"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "VZD oder Rezeptanforderung",
            "comment": "Wenn die Nachricht initial erstellt wird kann die Apotheke die Informationen aus dem System oder VZD beziehen. Der Verordnende kann die Informationen aus der Rezeptanforderung beziehen."
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Absender",
        "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": "gem-erp-sr-log-message-copy.MetaDaten.Absender",
        "short": "Absender der Nachricht",
        "definition": "Absender der Nachricht",
        "min": 1,
        "max": "1",
        "base": {
          "path": "gem-erp-sr-log-message-copy.MetaDaten.Absender",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "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": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.sender"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Absender.id",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Absender.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Absender.extension",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Absender.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "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"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Absender.modifierExtension",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Absender.modifierExtension",
        "short": "Extensions that cannot be ignored even if unrecognized",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "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"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": true,
        "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Absender.TelematikID",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Absender.TelematikID",
        "short": "Telematik-ID des Absenders",
        "definition": "Telematik-ID des Absenders",
        "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier",
        "min": 0,
        "max": "1",
        "base": {
          "path": "gem-erp-sr-log-message-copy.MetaDaten.Absender.TelematikID",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "url"
          }
        ],
        "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": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.sender.identifier.value"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS, SMC-B oder HBA Zertifikat"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Absender.Name",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Absender.Name",
        "short": "Name des Absenders",
        "definition": "Name des Absenders",
        "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "gem-erp-sr-log-message-copy.MetaDaten.Absender.Name",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "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": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.sender.display"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem",
        "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": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem",
        "short": "Absendendes System",
        "definition": "Absendendes System",
        "min": 1,
        "max": "1",
        "base": {
          "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "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": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.source"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS",
            "comment": "Automatisiert durch Software gesetzt"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.id",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.extension",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "description": "Extensions are always sliced by (at least) url",
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "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"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.modifierExtension",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.modifierExtension",
        "short": "Extensions that cannot be ignored even if unrecognized",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "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"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": true,
        "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Name",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Name",
        "short": "Name des Herstellers des absendenden Systems",
        "definition": "Name des Herstellers des absendenden Systems",
        "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Name",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "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": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.source.name"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS",
            "comment": "Automatisiert durch Software gesetzt"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Software",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Software",
        "short": "Name der Software des absendenden Systems",
        "definition": "Name der Software des absendenden Systems",
        "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Software",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "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": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.source.software"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS",
            "comment": "Automatisiert durch Software gesetzt"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Version",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Version",
        "short": "Version des absendenden Systems",
        "definition": "Version des absendenden Systems",
        "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Version",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "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": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.source.version"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS",
            "comment": "Automatisiert durch Software gesetzt"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.EMailKontakt",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.EMailKontakt",
        "short": "E-Mail-Kontakt des absendenden Systems",
        "definition": "E-Mail-Kontakt des absendenden Systems",
        "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
        "min": 1,
        "max": "1",
        "base": {
          "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.EMailKontakt",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "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": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.source.contact.value"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS",
            "comment": "Automatisiert durch Software gesetzt"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Website",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Website",
        "short": "Website des absendenden Systems",
        "definition": "Website des absendenden Systems",
        "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier",
        "min": 1,
        "max": "1",
        "base": {
          "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Website",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "url"
          }
        ],
        "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": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.source.endpoint"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS",
            "comment": "Automatisiert durch Software gesetzt"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.IndikatorKopie",
        "path": "gem-erp-sr-log-message-copy.IndikatorKopie",
        "short": "Indikator Kopie",
        "definition": "Indikator, ob es sich um eine Kopie handelt.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "gem-erp-sr-log-message-copy.IndikatorKopie",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "boolean"
          }
        ],
        "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": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestRequestHeader.eventCoding.code = 'eRezept_Rezeptanforderung;message-copy'"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.Anforderungsinformationen",
        "path": "gem-erp-sr-log-message-copy.Anforderungsinformationen",
        "short": "Anforderungsinformationen",
        "definition": "Kopie der Informationen, die dem Empfänger des Originals übertragen wurden. Dabei wird der komplette Datensatz versendet. Siehe\n- [Logical Model Rezeptanforderung](https://simplifier.net/erezept-servicerequest/gem-erp-sr-log-prescription-request)\n- [Logical Model Rezeptanforderung_Storno](https://simplifier.net/erezept-servicerequest/gem-erp-sr-log-prescription-request-cancellation)\n- [Logical Model Rezeptanforderung_Bestätigung](https://simplifier.net/erezept-servicerequest/gem-erp-sr-log-prescription-request-confirmation)",
        "min": 1,
        "max": "1",
        "base": {
          "path": "gem-erp-sr-log-message-copy.Anforderungsinformationen",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "Bundle"
          }
        ],
        "constraint": [
          {
            "key": "bdl-7",
            "severity": "error",
            "human": "FullUrl must be unique in a bundle, or else entries with the same fullUrl must have different meta.versionId (except in history bundles)",
            "expression": "(type = 'history') or entry.where(fullUrl.exists()).select(fullUrl&resource.meta.versionId).isDistinct()",
            "xpath": "(f:type/@value = 'history') or (count(for $entry in f:entry[f:resource] return $entry[count(parent::f:Bundle/f:entry[f:fullUrl/@value=$entry/f:fullUrl/@value and ((not(f:resource/*/f:meta/f:versionId/@value) and not($entry/f:resource/*/f:meta/f:versionId/@value)) or f:resource/*/f:meta/f:versionId/@value=$entry/f:resource/*/f:meta/f:versionId/@value)])!=1])=0)",
            "source": "http://hl7.org/fhir/StructureDefinition/Bundle"
          },
          {
            "key": "bdl-9",
            "severity": "error",
            "human": "A document must have an identifier with a system and a value",
            "expression": "type = 'document' implies (identifier.system.exists() and identifier.value.exists())",
            "xpath": "not(f:type/@value = 'document') or exists(f:identifier/f:system) or exists(f:identifier/f:value)",
            "source": "http://hl7.org/fhir/StructureDefinition/Bundle"
          },
          {
            "key": "bdl-3",
            "severity": "error",
            "human": "entry.request mandatory for batch/transaction/history, otherwise prohibited",
            "expression": "entry.all(request.exists() = (%resource.type = 'batch' or %resource.type = 'transaction' or %resource.type = 'history'))",
            "xpath": "not(f:entry/f:request) or (f:type/@value = 'batch') or (f:type/@value = 'transaction') or (f:type/@value = 'history')",
            "source": "http://hl7.org/fhir/StructureDefinition/Bundle"
          },
          {
            "key": "bdl-4",
            "severity": "error",
            "human": "entry.response mandatory for batch-response/transaction-response/history, otherwise prohibited",
            "expression": "entry.all(response.exists() = (%resource.type = 'batch-response' or %resource.type = 'transaction-response' or %resource.type = 'history'))",
            "xpath": "not(f:entry/f:response) or (f:type/@value = 'batch-response') or (f:type/@value = 'transaction-response') or (f:type/@value = 'history')",
            "source": "http://hl7.org/fhir/StructureDefinition/Bundle"
          },
          {
            "key": "bdl-12",
            "severity": "error",
            "human": "A message must have a MessageHeader as the first resource",
            "expression": "type = 'message' implies entry.first().resource.is(MessageHeader)",
            "xpath": "not(f:type/@value='message') or f:entry[1]/f:resource/f:MessageHeader",
            "source": "http://hl7.org/fhir/StructureDefinition/Bundle"
          },
          {
            "key": "bdl-1",
            "severity": "error",
            "human": "total only when a search or history",
            "expression": "total.empty() or (type = 'searchset') or (type = 'history')",
            "xpath": "not(f:total) or (f:type/@value = 'searchset') or (f:type/@value = 'history')",
            "source": "http://hl7.org/fhir/StructureDefinition/Bundle"
          },
          {
            "key": "bdl-2",
            "severity": "error",
            "human": "entry.search only when a search",
            "expression": "entry.search.empty() or (type = 'searchset')",
            "xpath": "not(f:entry/f:search) or (f:type/@value = 'searchset')",
            "source": "http://hl7.org/fhir/StructureDefinition/Bundle"
          },
          {
            "key": "bdl-11",
            "severity": "error",
            "human": "A document must have a Composition as the first resource",
            "expression": "type = 'document' implies entry.first().resource.is(Composition)",
            "xpath": "not(f:type/@value='document') or f:entry[1]/f:resource/f:Composition",
            "source": "http://hl7.org/fhir/StructureDefinition/Bundle"
          },
          {
            "key": "bdl-10",
            "severity": "error",
            "human": "A document must have a date",
            "expression": "type = 'document' implies (timestamp.hasValue())",
            "xpath": "not(f:type/@value = 'document') or exists(f:timestamp/@value)",
            "source": "http://hl7.org/fhir/StructureDefinition/Bundle"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "Entity. Role, or Act"
          },
          {
            "identity": "v2",
            "map": "N/A"
          },
          {
            "identity": "rim",
            "map": "N/A"
          },
          {
            "identity": "cda",
            "map": "ClinicalDocument, if bundle.type = document"
          },
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestRequestHeader.focus(ERPServiceRequestMessageContainer)"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "FHIR-Datensatz der zum Empfänger des Originals geschickt wird"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "gem-erp-sr-log-message-copy",
        "path": "gem-erp-sr-log-message-copy",
        "short": "ServiceRequest_Nachricht_Kopie",
        "definition": "Fachliches Modell zur Beschreibung einer Kopie für die Pflegeeinrichtung."
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten",
        "path": "gem-erp-sr-log-message-copy.MetaDaten",
        "short": "Metadaten im MessageHeader",
        "definition": "Metadaten im MessageHeader",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger",
        "short": "Empfänger der Nachricht",
        "definition": "Empfänger der Nachricht",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.destination"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "VZD oder Rezeptanforderung",
            "comment": "Wenn die Nachricht initial erstellt wird kann die Apotheke die Informationen aus dem System oder VZD beziehen. Der Verordnende kann die Informationen aus der Rezeptanforderung beziehen."
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.KIMAdresse",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.KIMAdresse",
        "short": "KIM-Adresse des Empfängers",
        "definition": "KIM-Adresse des Empfängers",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "url"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.destination.endpoint"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "VZD oder Rezeptanforderung",
            "comment": "Wenn die Nachricht initial erstellt wird kann die Apotheke die Informationen aus dem System oder VZD beziehen. Der Verordnende kann die Informationen aus der Rezeptanforderung beziehen."
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.TelematikID",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Empfaenger.TelematikID",
        "short": "Telematik-ID des Absenders",
        "definition": "Telematik-ID des Absenders",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "url"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.destination.receiver.identifier.value"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "VZD oder Rezeptanforderung",
            "comment": "Wenn die Nachricht initial erstellt wird kann die Apotheke die Informationen aus dem System oder VZD beziehen. Der Verordnende kann die Informationen aus der Rezeptanforderung beziehen."
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Absender",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Absender",
        "short": "Absender der Nachricht",
        "definition": "Absender der Nachricht",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.sender"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Absender.TelematikID",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Absender.TelematikID",
        "short": "Telematik-ID des Absenders",
        "definition": "Telematik-ID des Absenders",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "url"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.sender.identifier.value"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS, SMC-B oder HBA Zertifikat"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.Absender.Name",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.Absender.Name",
        "short": "Name des Absenders",
        "definition": "Name des Absenders",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.sender.display"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem",
        "short": "Absendendes System",
        "definition": "Absendendes System",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.source"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS",
            "comment": "Automatisiert durch Software gesetzt"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Name",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Name",
        "short": "Name des Herstellers des absendenden Systems",
        "definition": "Name des Herstellers des absendenden Systems",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.source.name"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS",
            "comment": "Automatisiert durch Software gesetzt"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Software",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Software",
        "short": "Name der Software des absendenden Systems",
        "definition": "Name der Software des absendenden Systems",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.source.software"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS",
            "comment": "Automatisiert durch Software gesetzt"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Version",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Version",
        "short": "Version des absendenden Systems",
        "definition": "Version des absendenden Systems",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.source.version"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS",
            "comment": "Automatisiert durch Software gesetzt"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.EMailKontakt",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.EMailKontakt",
        "short": "E-Mail-Kontakt des absendenden Systems",
        "definition": "E-Mail-Kontakt des absendenden Systems",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.source.contact.value"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS",
            "comment": "Automatisiert durch Software gesetzt"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Website",
        "path": "gem-erp-sr-log-message-copy.MetaDaten.AbsendendesSystem.Website",
        "short": "Website des absendenden Systems",
        "definition": "Website des absendenden Systems",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "url"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestDispenseRequestHeader.source.endpoint"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS",
            "comment": "Automatisiert durch Software gesetzt"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.IndikatorKopie",
        "path": "gem-erp-sr-log-message-copy.IndikatorKopie",
        "short": "Indikator Kopie",
        "definition": "Indikator, ob es sich um eine Kopie handelt.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "boolean"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestRequestHeader.eventCoding.code = 'eRezept_Rezeptanforderung;message-copy'"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "Erstellendes PS"
          }
        ]
      },
      {
        "id": "gem-erp-sr-log-message-copy.Anforderungsinformationen",
        "path": "gem-erp-sr-log-message-copy.Anforderungsinformationen",
        "short": "Anforderungsinformationen",
        "definition": "Kopie der Informationen, die dem Empfänger des Originals übertragen wurden. Dabei wird der komplette Datensatz versendet. Siehe\n- [Logical Model Rezeptanforderung](https://simplifier.net/erezept-servicerequest/gem-erp-sr-log-prescription-request)\n- [Logical Model Rezeptanforderung_Storno](https://simplifier.net/erezept-servicerequest/gem-erp-sr-log-prescription-request-cancellation)\n- [Logical Model Rezeptanforderung_Bestätigung](https://simplifier.net/erezept-servicerequest/gem-erp-sr-log-prescription-request-confirmation)",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Bundle"
          }
        ],
        "mapping": [
          {
            "identity": "Nachrichten-Kopie-Fachliches-Mapping",
            "map": "ERPServiceRequestRequestHeader.focus(ERPServiceRequestMessageContainer)"
          },
          {
            "identity": "Quelle-Message-Copy-Mapping",
            "map": "FHIR-Datensatz der zum Empfänger des Originals geschickt wird"
          }
        ]
      }
    ]
  }
}