<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="schedulednotification-profile" />
  <url value="https://fhir.xt.dev/fhir/StructureDefinition/ScheduledNotification" />
  <version value="1.0.0" />
  <name value="ScheduledNotification" />
  <status value="active" />
  <publisher value="x-tention Informationstechnologie GmbH" />
  <contact>
    <telecom>
      <system value="email" />
      <value value="fhir.profiling@x-tention.com" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="A scheduled notification for patients or professionals to act upon at a specific time. For example, fill out a questionnaire, read specific information, or perform an action related to an appointment or care process." />
  <copyright value="x-tention Informationstechnologie GmbH" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="CommunicationRequest" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/CommunicationRequest" />
  <derivation value="constraint" />
  <differential>
    <element id="CommunicationRequest.basedOn">
      <path value="CommunicationRequest.basedOn" />
      <short value="The task this communication request is based on" />
      <definition value="References the task that this communication request is based on" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Task" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="CommunicationRequest.basedOn.reference">
      <path value="CommunicationRequest.basedOn.reference" />
      <min value="1" />
    </element>
    <element id="CommunicationRequest.category">
      <path value="CommunicationRequest.category" />
      <short value="Message category like &quot;taskAssigned&quot; or &quot;dueDateExceeded&quot;" />
      <definition value="The kind of message like &quot;taskAssigned&quot; or &quot;dueDateExceeded&quot; this communication request is created for" />
      <min value="1" />
      <max value="1" />
      <binding>
        <strength value="required" />
        <valueSet value="http://fhir.xt.dev/ValueSet/CommunicationCategory" />
      </binding>
    </element>
    <element id="CommunicationRequest.category.coding">
      <path value="CommunicationRequest.category.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="CommunicationRequest.category.coding.system">
      <path value="CommunicationRequest.category.coding.system" />
      <short value="The context or reason for communication" />
      <min value="1" />
    </element>
    <element id="CommunicationRequest.category.coding.version">
      <path value="CommunicationRequest.category.coding.version" />
      <max value="0" />
    </element>
    <element id="CommunicationRequest.category.coding.code">
      <path value="CommunicationRequest.category.coding.code" />
      <min value="1" />
    </element>
    <element id="CommunicationRequest.category.coding.userSelected">
      <path value="CommunicationRequest.category.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="CommunicationRequest.category.text">
      <path value="CommunicationRequest.category.text" />
      <min value="1" />
    </element>
    <element id="CommunicationRequest.doNotPerform">
      <path value="CommunicationRequest.doNotPerform" />
      <max value="0" />
    </element>
    <element id="CommunicationRequest.medium">
      <path value="CommunicationRequest.medium" />
      <definition value="A channel that is used for this communication (e.g. email, In-App notification)." />
      <min value="1" />
      <max value="1" />
      <binding>
        <strength value="required" />
        <valueSet value="http://fhir.xt.dev/ValueSet/CommunicationMedium" />
      </binding>
    </element>
    <element id="CommunicationRequest.medium.coding">
      <path value="CommunicationRequest.medium.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="CommunicationRequest.medium.coding.system">
      <path value="CommunicationRequest.medium.coding.system" />
      <min value="1" />
    </element>
    <element id="CommunicationRequest.medium.coding.version">
      <path value="CommunicationRequest.medium.coding.version" />
      <max value="0" />
    </element>
    <element id="CommunicationRequest.medium.coding.code">
      <path value="CommunicationRequest.medium.coding.code" />
      <min value="1" />
    </element>
    <element id="CommunicationRequest.medium.coding.userSelected">
      <path value="CommunicationRequest.medium.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="CommunicationRequest.subject">
      <path value="CommunicationRequest.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="CommunicationRequest.subject.reference">
      <path value="CommunicationRequest.subject.reference" />
      <min value="1" />
    </element>
    <element id="CommunicationRequest.payload">
      <path value="CommunicationRequest.payload" />
      <short value="Template name or notification content" />
      <definition value="Contains the Mail-Sender template name or In-App notification content" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="CommunicationRequest.payload.content[x]">
      <path value="CommunicationRequest.payload.content[x]" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="CommunicationRequest.occurrence[x]">
      <path value="CommunicationRequest.occurrence[x]" />
      <definition value="The time when this communication shall take place, shall at least have minute granularity." />
      <min value="1" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="CommunicationRequest.requester">
      <path value="CommunicationRequest.requester" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="CommunicationRequest.requester.reference">
      <path value="CommunicationRequest.requester.reference" />
      <min value="1" />
    </element>
    <element id="CommunicationRequest.recipient">
      <path value="CommunicationRequest.recipient" />
      <definition value="The entity (e.g. patient, practitioner, or relatedPerson) which is the intended target of the communication." />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <aggregation value="referenced" />
      </type>
    </element>
    <element id="CommunicationRequest.recipient.reference">
      <path value="CommunicationRequest.recipient.reference" />
      <min value="1" />
    </element>
    <element id="CommunicationRequest.sender">
      <path value="CommunicationRequest.sender" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>