{
  "resourceType": "StructureDefinition",
  "id": "argo-sub-notif",
  "url": "http://fhir.org/guides/argonaut-scheduling/StructureDefinition/argo-sub-notif",
  "version": "0.0.0",
  "name": "Argonaut_Scheduling_Subscription_Profile",
  "title": "Argonaut Scheduling Subscription Profile",
  "status": "active",
  "date": "2018-02-13",
  "publisher": "Argonaut Project",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://argonautwiki.hl7.org"
        }
      ]
    }
  ],
  "description": "The Argonaut Scheduling Subscription Profile is defined for sending  notifications to a subscriber as described in the updating slots step in [Use Case 3 Prefetching Open Slots](patient-scheduling.html#use-case-3-prefetching-open-slots).",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "urn:iso:std:iso:3166",
          "code": "US",
          "display": "United States of America"
        }
      ]
    }
  ],
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Subscription",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Subscription",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Subscription",
        "path": "Subscription",
        "mustSupport": false
      },
      {
        "id": "Subscription.criteria",
        "path": "Subscription.criteria",
        "mustSupport": true
      },
      {
        "id": "Subscription.criteria.extension",
        "path": "Subscription.criteria.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Subscription.criteria.extension:trigger-description",
        "path": "Subscription.criteria.extension",
        "sliceName": "trigger-description",
        "short": "Subscription Trigger Event Description Extension",
        "comment": "A formal expression, or a reference to a named expression may also be inlined. If the expression is a [FHIRPath](http://hl7.org/fhirpath/) expression, use the [Subscription Trigger Event FHIRPath Extension](StructureDefinition-extension-trigger-fhirpath.html)",
        "min": 1,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.org/guides/argonaut-scheduling/StructureDefinition/extension-subscription-triggerevent"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Subscription.criteria.extension:trigger-fhirpath",
        "path": "Subscription.criteria.extension",
        "sliceName": "trigger-fhirpath",
        "short": "Subscription Trigger Event FHIRPath Extension",
        "definition": "If the expression is a [FHIRPath](http://hl7.org/fhirpath/) expression, it evaluates in the context of a resource of one of the types identified in the [Subscription Event Focus Extension](StructureDefinition-extension-subscription-eventfocus.html), and may also refer to the variable `%previous`  for delta comparisons.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/cqif-fhirPathExpression"
            ]
          }
        ]
      },
      {
        "id": "Subscription.criteria.extension:event-focus",
        "path": "Subscription.criteria.extension",
        "sliceName": "event-focus",
        "short": "Subscription Event Focus Extension",
        "definition": "The type of the required data, specified as the type name of a resource.",
        "min": 1,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.org/guides/argonaut-scheduling/StructureDefinition/extension-subscription-eventfocus"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Subscription.criteria.extension:event-focus.value[x]",
        "path": "Subscription.criteria.extension.valueCode",
        "sliceName": "valueCode",
        "min": 1,
        "fixedCode": "Slot",
        "mustSupport": true
      },
      {
        "id": "Subscription.channel",
        "path": "Subscription.channel",
        "mustSupport": true
      },
      {
        "id": "Subscription.channel.extension",
        "path": "Subscription.channel.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Subscription.channel.extension:payload-profile",
        "path": "Subscription.channel.extension",
        "sliceName": "payload-profile",
        "definition": "The profile of the required data to be sent in the payload.",
        "min": 1,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.org/guides/argonaut-scheduling/StructureDefinition/extension-subscription-payloadprofile"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Subscription.channel.extension:payload-profile.valueUri",
        "path": "Subscription.channel.extension.valueUri",
        "sliceName": "valueUri",
        "short": "Payload profile URI",
        "definition": "The uri of payload when sending notifications to a subscriber.",
        "comment": "The Argonaut Scheduling Schedule Notification Profile defines the payload when sending notifications to a subscriber described in Use Case 3 Prefetching Open Slots.   The actual notification is triggered by a Slot instance defined in  `criteria` .  The Slot's `schedule' element identifies the Schedule resource instance that populates the payload.",
        "min": 1,
        "fixedUri": "http://fhir.org/guides/argonaut-scheduling/StructureDefinition/argo-sched-notif",
        "mustSupport": true
      },
      {
        "id": "Subscription.channel.endpoint",
        "path": "Subscription.channel.endpoint",
        "min": 1,
        "mustSupport": true
      }
    ]
  }
}