{
  "resourceType": "StructureDefinition",
  "id": "aorta-subscriptionNotification-bundle",
  "language": "nl-NL",
  "url": "http://vzvz.nl/fhir/StructureDefinition/aorta-subscriptionNotification-bundle",
  "version": "2.0.0-beta.2",
  "name": "NLVZVZAortaSubscriptionNotificationBundle",
  "status": "active",
  "publisher": "VZVZ",
  "contact": [
    {
      "name": "VZVZ",
      "telecom": [
        {
          "system": "email",
          "value": "standaardisatie@vzvz.nl",
          "use": "work"
        }
      ]
    }
  ],
  "description": "A notification bundle is a collection of a notification (SubscriptionStatus) and \nthe resource instance that triggered the notification.\nSince the resource instance that triggered the notification is always an AORTA DataReference resource,\nwhich contains no medical information, there is no privacy issue when the resource is included in\nthe notification.",
  "jurisdiction": [
    {
      "coding": [
        {
          "code": "NL",
          "system": "urn:iso:std:iso:3166",
          "display": "Netherlands"
        }
      ]
    }
  ],
  "copyright": "VZVZ",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle",
        "path": "Bundle",
        "constraint": [
          {
            "key": "sn-1",
            "severity": "error",
            "human": "A notication bundle should have at least 1 entry",
            "source": "http://vzvz.nl/fhir/StructureDefinition/aorta-subscriptionNotification-bundle",
            "expression": "Bundle.entry.count() >= 1"
          },
          {
            "key": "sn-2",
            "severity": "error",
            "human": "A notification bundle should have at least a SubscriptionStatus as backported Parameters",
            "source": "http://vzvz.nl/fhir/StructureDefinition/aorta-subscriptionNotification-bundle",
            "expression": "Bundle.entry.resource.ofType(Parameters).exists()"
          }
        ]
      },
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "definition": "A notification bundle is a collection of a notification (SubscriptionStatus) and the resource instance that triggered the notification.",
        "comment": "Although FHIR R4B proposes to use the type `history` we at VZVZ believe that `collection` better fits the meaning of this bundle and it removes the necessity to add fake request elements in each entry, which makes generation and parsing easier.",
        "fixedCode": "collection"
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "resource"
            }
          ],
          "rules": "open"
        },
        "comment": "__NOTE__: if this bundle is used to notify about the expiration of a Subscription, then it contains only a SubscriptionStatus Resource, nothing else.",
        "min": 1
      },
      {
        "id": "Bundle.entry:subscriptionStatus",
        "path": "Bundle.entry",
        "sliceName": "subscriptionStatus",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:subscriptionStatus.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Parameters",
            "profile": [
              "http://vzvz.nl/fhir/StructureDefinition/aorta-subscription-notification"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:dataReference",
        "path": "Bundle.entry",
        "sliceName": "dataReference",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:dataReference.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "List",
            "profile": [
              "http://vzvz.nl/fhir/StructureDefinition/aorta-DataReference"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:auditevent",
        "path": "Bundle.entry",
        "sliceName": "auditevent",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:auditevent.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "AuditEvent",
            "profile": [
              "http://vzvz.nl/fhir/StructureDefinition/aorta-AuditEvent"
            ]
          }
        ]
      }
    ]
  }
}