{
  "resourceType": "StructureDefinition",
  "id": "mitz-Subscription",
  "url": "http://vzvz.nl/fhir/otv/StructureDefinition/mitz-Subscription",
  "version": "4.0.0-beta.1",
  "name": "MitzSubscription",
  "status": "draft",
  "date": "2025-03-04T11:00:00+00:00",
  "publisher": "VZVZ",
  "contact": [
    {
      "name": "VZVZ",
      "telecom": [
        {
          "system": "email",
          "value": "standaardisatie@vzvz.nl",
          "use": "work"
        }
      ]
    }
  ],
  "description": "Profile to define the subscription that can be taken on consent information",
  "jurisdiction": [
    {
      "coding": [
        {
          "code": "NL",
          "system": "urn:iso:std:iso:3166",
          "display": "Netherlands"
        }
      ]
    }
  ],
  "copyright": "VZVZ",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Subscription",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Subscription",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Subscription",
        "path": "Subscription",
        "comment": "Used to share the consent subscription\r\n\r\nSee also [this example](https://simplifier.net/vzvz/examples-mitz-nl-vzvz-mitz-subscription)."
      },
      {
        "id": "Subscription.id",
        "path": "Subscription.id",
        "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes. This is the unique ID of the subscription.",
        "comment": "The id is absent when the resource is posted by a Mitz Connector (MC). The response contains a uuid generated by Mitz. Mitz checks if a subscription for the combination MC, patient and source system. If so, that id is returned with HTTP code 202 (accepted).\r\n\r\nWhen the MC wants to update the Subscription, the id should be added in the updated instance."
      },
      {
        "id": "Subscription.extension",
        "path": "Subscription.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "min": 2
      },
      {
        "id": "Subscription.extension:PatientBirthdate",
        "path": "Subscription.extension",
        "sliceName": "PatientBirthdate",
        "definition": "Date of birth of the patient to allow for the determination of the age category.",
        "comment": "This element is required under condition: if the healthcare provider has a verified date of birth of the patient, it MUST be provided as a full and valid date. I.e. a partial date like '1970-00-00' which could be provided by SBV-Z is not allowed.",
        "requirements": "Specific extension for Mitz to exchange the patient's date of birth, to allow the determination of the age category in Mitz.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://vzvz.nl/fhir/otv/StructureDefinition/Patient.birthDate"
            ]
          }
        ]
      },
      {
        "id": "Subscription.extension:sourceSystem",
        "path": "Subscription.extension",
        "sliceName": "sourceSystem",
        "short": "Source System",
        "definition": "Extension to specify the system where the subscription originates from",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://vzvz.nl/fhir/StructureDefinition/SourceSystem"
            ]
          }
        ]
      },
      {
        "id": "Subscription.extension:gatewaySystem",
        "path": "Subscription.extension",
        "sliceName": "gatewaySystem",
        "short": "Gateway system",
        "definition": "Extension to provide a base URL for the localisation of the data",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://vzvz.nl/fhir/StructureDefinition/GatewaySystem"
            ]
          }
        ]
      },
      {
        "id": "Subscription.status",
        "path": "Subscription.status",
        "fixedCode": "requested"
      },
      {
        "id": "Subscription.reason",
        "path": "Subscription.reason",
        "short": "Reason for subscription",
        "definition": "Fixed value OTV",
        "comment": "Reason for subscription for now fixed value 'OTV'.",
        "fixedString": "OTV"
      },
      {
        "id": "Subscription.criteria",
        "path": "Subscription.criteria",
        "short": "Criteria for notification trigger",
        "definition": "Criteria to trigger the notification. BSN, URA of the source healthcare provider and category of the healthcare provider must be provided. No other criteria are allowed.",
        "example": [
          {
            "label": "Consent example",
            "valueString": "Consent?_query=otv&amp;patientid=123456789&amp;providerid=01234567&amp;providertype=Z3"
          }
        ]
      },
      {
        "id": "Subscription.channel.type",
        "path": "Subscription.channel.type",
        "definition": "Fixed value rest-hook",
        "fixedCode": "rest-hook"
      },
      {
        "id": "Subscription.channel.endpoint",
        "path": "Subscription.channel.endpoint",
        "definition": "Specific URL to notify the source system (via MC).",
        "comment": "Note: this must be a valid HTTPS address. The application ID of the dossierhoudend system is added within AORTA to be able to address systems using the LSP.",
        "min": 1,
        "example": [
          {
            "label": "LSP systeem met applicatie-id",
            "valueUrl": "https://zim.prf001.lsp.aorta-zorg.nl/otv/Subscription/123456789"
          }
        ]
      },
      {
        "id": "Subscription.channel.payload",
        "path": "Subscription.channel.payload",
        "definition": "The mime type to send the payload in - either application/fhir+xml, or application/fhir+json.",
        "min": 1,
        "example": [
          {
            "label": "XML",
            "valueCode": "application/fhir+xml"
          }
        ]
      }
    ]
  }
}