{
  "resourceType": "StructureDefinition",
  "id": "GEM-ERP-PR-Bundle",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
      "valueString": "Foundation.Other"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
      "valueCode": "not-classified"
    }
  ],
  "url": "https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_Bundle",
  "version": "1.2",
  "name": "GEM_ERP_PR_Bundle",
  "title": "Document Bundle for Receipt",
  "status": "draft",
  "description": "A document style representation of the receipt (complete, self-contained, signed)",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "cda",
      "uri": "http://hl7.org/v3/cda",
      "name": "CDA (R2)"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle.id",
        "path": "Bundle.id",
        "min": 1
      },
      {
        "id": "Bundle.meta.profile",
        "path": "Bundle.meta.profile",
        "fixedCanonical": "https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_Bundle|1.2"
      },
      {
        "id": "Bundle.identifier",
        "path": "Bundle.identifier",
        "short": "identifier of ePrescription",
        "min": 1,
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_PrescriptionId"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "fixedCode": "document",
        "mustSupport": true
      },
      {
        "id": "Bundle.timestamp",
        "path": "Bundle.timestamp",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "profile",
              "path": "resource"
            }
          ],
          "rules": "closed"
        },
        "min": 3
      },
      {
        "id": "Bundle.entry:DocumentInformation",
        "path": "Bundle.entry",
        "sliceName": "DocumentInformation",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:DocumentInformation.link",
        "path": "Bundle.entry.link",
        "max": "0"
      },
      {
        "id": "Bundle.entry:DocumentInformation.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1
      },
      {
        "id": "Bundle.entry:DocumentInformation.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Composition",
            "profile": [
              "https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_Composition"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:DocumentInformation.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:DocumentInformation.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry:DocumentInformation.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:SigningDevice",
        "path": "Bundle.entry",
        "sliceName": "SigningDevice",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:SigningDevice.link",
        "path": "Bundle.entry.link",
        "max": "0"
      },
      {
        "id": "Bundle.entry:SigningDevice.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1
      },
      {
        "id": "Bundle.entry:SigningDevice.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Device",
            "profile": [
              "https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_Device"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:SigningDevice.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:SigningDevice.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry:SigningDevice.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:PrescriptionDigest",
        "path": "Bundle.entry",
        "sliceName": "PrescriptionDigest",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:PrescriptionDigest.link",
        "path": "Bundle.entry.link",
        "max": "0"
      },
      {
        "id": "Bundle.entry:PrescriptionDigest.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "min": 1
      },
      {
        "id": "Bundle.entry:PrescriptionDigest.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "Binary"
          }
        ]
      },
      {
        "id": "Bundle.entry:PrescriptionDigest.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:PrescriptionDigest.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry:PrescriptionDigest.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.signature",
        "path": "Bundle.signature",
        "type": [
          {
            "code": "Signature",
            "profile": [
              "https://gematik.de/fhir/erp/StructureDefinition/GEM_ERP_PR_Signature"
            ]
          }
        ],
        "mustSupport": true
      }
    ]
  }
}