{
  "resourceType": "StructureDefinition",
  "id": "rdc-Subscription",
  "url": "https://roche.com/fhir/iop/StructureDefinition/rdc-Subscription",
  "name": "RdcSubscription",
  "title": "RDC Subscription",
  "status": "active",
  "publisher": "F. Hoffmann-La Roche AG",
  "description": "RDC Subscription profile describes custom rules how to create a valid Subscription resource to be able to subscribe to receive notifications about created/updated resources from Roche.",
  "copyright": "Copyright and related rights waived via CC0, https://creativecommons.org/publicdomain/zero/1.0/. This does not apply to information from third parties, for example a medical terminology system. The implementer alone is responsible for identifying and obtaining any necessary licenses or authorizations to utilize third party IP in connection with the specification or otherwise.",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Subscription",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Subscription",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Subscription.name",
        "path": "Subscription.name",
        "comment": "Cannot exceed 255 characters in size"
      },
      {
        "id": "Subscription.contact",
        "path": "Subscription.contact",
        "max": "0"
      },
      {
        "id": "Subscription.end",
        "path": "Subscription.end",
        "max": "0"
      },
      {
        "id": "Subscription.managingEntity",
        "path": "Subscription.managingEntity",
        "max": "0"
      },
      {
        "id": "Subscription.reason",
        "path": "Subscription.reason",
        "comment": "Cannot exceed 2048 characters in size"
      },
      {
        "id": "Subscription.filterBy",
        "path": "Subscription.filterBy",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Subscription.filterBy.filterParameter",
        "path": "Subscription.filterBy.filterParameter",
        "binding": {
          "strength": "required",
          "description": "Can be either \"patient\" or \"organization\""
        }
      },
      {
        "id": "Subscription.filterBy.value",
        "path": "Subscription.filterBy.value",
        "short": "ID of the resource",
        "definition": "For filterParameter having value \"organization\", the value must correspond to the ID of the managing organization. For filterParameter having value \"patient\", the value must correspond to ID of a patient within the managing organization."
      },
      {
        "id": "Subscription.channelType",
        "path": "Subscription.channelType",
        "definition": "The type of channel to send notifications on. Only rest-hook is allowed.",
        "fixedCoding": {
          "code": "rest-hook"
        }
      },
      {
        "id": "Subscription.channelType.system",
        "path": "Subscription.channelType.system",
        "max": "0"
      },
      {
        "id": "Subscription.channelType.version",
        "path": "Subscription.channelType.version",
        "max": "0"
      },
      {
        "id": "Subscription.channelType.display",
        "path": "Subscription.channelType.display",
        "max": "0"
      },
      {
        "id": "Subscription.channelType.userSelected",
        "path": "Subscription.channelType.userSelected",
        "max": "0"
      },
      {
        "id": "Subscription.endpoint",
        "path": "Subscription.endpoint",
        "comment": "Absolute URL to the endpoint to receive notifications. Must start with https://",
        "min": 1
      },
      {
        "id": "Subscription.heartbeatPeriod",
        "path": "Subscription.heartbeatPeriod",
        "max": "0"
      },
      {
        "id": "Subscription.timeout",
        "path": "Subscription.timeout",
        "comment": "Number between 10 and 20. Default is 10."
      },
      {
        "id": "Subscription.contentType",
        "path": "Subscription.contentType",
        "definition": "The MIME type to send the payload in . Only values `application/json` and `application/fhir+json` are allowed.",
        "min": 1
      },
      {
        "id": "Subscription.content",
        "path": "Subscription.content",
        "definition": "How much of the resource content to deliver in the notification payload. Only id-only and empty are supported",
        "min": 1,
        "constraint": [
          {
            "key": "valueCodeConstraint",
            "severity": "error",
            "human": "The value for content must be either 'id-only' or 'empty'.",
            "expression": "$this = 'id-only' or $this = 'empty'"
          }
        ]
      },
      {
        "id": "Subscription.maxCount",
        "path": "Subscription.maxCount",
        "comment": "By default this value is set to 100. You can change the value to a number higher than 100."
      }
    ]
  }
}