{
  "resourceType": "StructureDefinition",
  "id": "apprequesttriggeredcommunicationtemplate-profile",
  "url": "http://fhir.xt.dev/StructureDefinition/AppointmentRequestTriggeredCommunicationTemplate",
  "version": "1.1.1",
  "name": "AppointmentRequestTriggeredCommunicationTemplate",
  "status": "active",
  "date": "2026-07-02T14:03:55.216881+00:00",
  "publisher": "x-tention Informationstechnologie GmbH",
  "contact": [
    {
      "telecom": [
        {
          "system": "email",
          "value": "fhir.profiling@x-tention.com",
          "use": "work"
        }
      ]
    }
  ],
  "description": "The template for a planned communication, automatically triggered by changes in data. The communication is usually a structured interaction modeled as a Task, but might also be a more conventional message. This type of communication template is triggered by an AppointmentRequest.",
  "copyright": "x-tention Informationstechnologie GmbH",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "CommunicationRequest",
  "baseDefinition": "http://fhir.xt.dev/StructureDefinition/BaseCommunicationTemplate",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "CommunicationRequest.basedOn",
        "path": "CommunicationRequest.basedOn",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type"
            }
          ],
          "rules": "closed"
        }
      },
      {
        "id": "CommunicationRequest.basedOn:targetOrganization",
        "path": "CommunicationRequest.basedOn",
        "sliceName": "targetOrganization",
        "definition": "Target Organization that the user selected and that is linked to the Appointment through the participant Location",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ]
      },
      {
        "id": "CommunicationRequest.basedOn:targetOrganization.type",
        "path": "CommunicationRequest.basedOn.type",
        "min": 1,
        "fixedUri": "Organization"
      },
      {
        "id": "CommunicationRequest.basedOn:targetOrganization.identifier",
        "path": "CommunicationRequest.basedOn.identifier",
        "short": "primary-org-id",
        "min": 1
      },
      {
        "id": "CommunicationRequest.basedOn:targetOrganization.identifier.system",
        "path": "CommunicationRequest.basedOn.identifier.system",
        "min": 1,
        "fixedUri": "urn:ietf:rfc:3986"
      },
      {
        "id": "CommunicationRequest.basedOn:targetOrganization.identifier.value",
        "path": "CommunicationRequest.basedOn.identifier.value",
        "min": 1
      },
      {
        "id": "CommunicationRequest.basedOn:targetOrganization.identifier.period",
        "path": "CommunicationRequest.basedOn.identifier.period",
        "max": "0"
      },
      {
        "id": "CommunicationRequest.basedOn:targetOrganization.identifier.assigner",
        "path": "CommunicationRequest.basedOn.identifier.assigner",
        "max": "0"
      },
      {
        "id": "CommunicationRequest.category.coding.system",
        "path": "CommunicationRequest.category.coding.system",
        "fixedUri": "http://fhir.xt.dev/CodeSystem/CommunicationTemplateCategory"
      },
      {
        "id": "CommunicationRequest.category.coding.code",
        "path": "CommunicationRequest.category.coding.code",
        "fixedCode": "AppointmentRequestCreated"
      },
      {
        "id": "CommunicationRequest.medium.coding:subtaskOfAppointmentRequestTask",
        "path": "CommunicationRequest.medium.coding",
        "sliceName": "subtaskOfAppointmentRequestTask",
        "max": "1"
      },
      {
        "id": "CommunicationRequest.medium.coding:subtaskOfAppointmentRequestTask.system",
        "path": "CommunicationRequest.medium.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.xt.dev/CodeSystem/TaskRelatedResource"
      },
      {
        "id": "CommunicationRequest.medium.coding:subtaskOfAppointmentRequestTask.code",
        "path": "CommunicationRequest.medium.coding.code",
        "min": 1,
        "fixedCode": "subtask-of-app-request-task"
      },
      {
        "id": "CommunicationRequest.reasonCode",
        "path": "CommunicationRequest.reasonCode",
        "short": "Code Filter for the AppointmentRequest",
        "definition": "Filter to limit the intended communication to appointment requests with a a specific keyword, payor type or referral order type. Different reasonCodes are considered alternative filter criteria and logically combined using OR. Different codings in one reasonCode are considered multiple aspects of the same filter criterium and logically combined using AND."
      },
      {
        "id": "CommunicationRequest.reasonCode.coding",
        "path": "CommunicationRequest.reasonCode.coding",
        "short": "Code Filter",
        "definition": "Filter to limit the intended communication to appointment requests with a a specific keyword, payor type or referral order type. Different reasonCodes are considered alternative filter criteria and logically combined using OR. Different codings in one reasonCode are considered multiple aspects of the same filter criterium and logically combined using AND.",
        "min": 1
      },
      {
        "id": "CommunicationRequest.reasonCode.coding.userSelected",
        "path": "CommunicationRequest.reasonCode.coding.userSelected",
        "max": "0"
      },
      {
        "id": "CommunicationRequest.reasonCode.text",
        "path": "CommunicationRequest.reasonCode.text",
        "max": "0"
      }
    ]
  }
}