<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://oda.fi/fhir/StructureDefinition/stu3/Notification" />
  <name value="ODA notification" />
  <title value="ODA notification" />
  <status value="draft" />
  <date value="2019-07-26" />
  <publisher value="SoteDigi Oy" />
  <description value="A record of information transmitted about an event in Omaolo." />
  <purpose value="The data model for Omaolo notifications." />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Communication" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Communication" />
  <derivation value="constraint" />
  <differential>
    <element id="Communication.meta.profile">
      <path value="Communication.meta.profile" />
      <fixedUri value="http://oda.fi/fhir/StructureDefinition/stu3/Notification" />
    </element>
    <element id="Communication.implicitRules">
      <path value="Communication.implicitRules" />
      <max value="0" />
    </element>
    <element id="Communication.contained">
      <path value="Communication.contained" />
      <max value="0" />
    </element>
    <element id="Communication.extension">
      <path value="Communication.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Communication.extension:validAfter">
      <path value="Communication.extension" />
      <sliceName value="validAfter" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://oda.fi/fhir/StructureDefinition/ValidAfter" />
      </type>
    </element>
    <element id="Communication.identifier">
      <path value="Communication.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.definition">
      <path value="Communication.definition" />
      <max value="0" />
    </element>
    <element id="Communication.basedOn">
      <path value="Communication.basedOn" />
      <max value="0" />
    </element>
    <element id="Communication.partOf">
      <path value="Communication.partOf" />
      <max value="0" />
    </element>
    <element id="Communication.notDone">
      <path value="Communication.notDone" />
      <max value="0" />
    </element>
    <element id="Communication.notDoneReason">
      <path value="Communication.notDoneReason" />
      <max value="0" />
    </element>
    <element id="Communication.category">
      <path value="Communication.category" />
      <min value="1" />
      <max value="1" />
      <binding>
        <strength value="required" />
        <description value="Codes for general categories of communications." />
        <valueSetReference>
          <reference value="http://oda.fi/fhir/ValueSet/notification-category" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Communication.category.id">
      <path value="Communication.category.id" />
      <max value="0" />
    </element>
    <element id="Communication.category.coding">
      <path value="Communication.category.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Communication.category.coding.id">
      <path value="Communication.category.coding.id" />
      <max value="0" />
    </element>
    <element id="Communication.category.coding.system">
      <path value="Communication.category.coding.system" />
      <min value="1" />
      <fixedUri value="http://oda.fi/fhir/CodeSystem/communication-category" />
    </element>
    <element id="Communication.category.coding.version">
      <path value="Communication.category.coding.version" />
      <max value="0" />
    </element>
    <element id="Communication.category.coding.code">
      <path value="Communication.category.coding.code" />
      <min value="1" />
    </element>
    <element id="Communication.category.coding.userSelected">
      <path value="Communication.category.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Communication.category.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Communication.category.text" />
      <max value="0" />
    </element>
    <element id="Communication.medium">
      <path value="Communication.medium" />
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://oda.fi/fhir/ValueSet/communication-medium" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Communication.medium.id">
      <path value="Communication.medium.id" />
      <max value="0" />
    </element>
    <element id="Communication.medium.coding">
      <path value="Communication.medium.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Communication.medium.coding.id">
      <path value="Communication.medium.coding.id" />
      <max value="0" />
    </element>
    <element id="Communication.medium.coding.system">
      <path value="Communication.medium.coding.system" />
      <min value="1" />
      <fixedUri value="http://oda.fi/fhir/CodeSystem/communication-medium" />
    </element>
    <element id="Communication.medium.coding.version">
      <path value="Communication.medium.coding.version" />
      <max value="0" />
    </element>
    <element id="Communication.medium.coding.code">
      <path value="Communication.medium.coding.code" />
      <min value="1" />
    </element>
    <element id="Communication.medium.coding.userSelected">
      <path value="Communication.medium.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Communication.medium.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Communication.medium.text" />
      <max value="0" />
    </element>
    <element id="Communication.subject">
      <path value="Communication.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
    </element>
    <element id="Communication.subject.id">
      <path value="Communication.subject.id" />
      <max value="0" />
    </element>
    <element id="Communication.subject.reference">
      <path value="Communication.subject.reference" />
      <min value="1" />
    </element>
    <element id="Communication.subject.identifier">
      <path value="Communication.subject.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.subject.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Communication.subject.display" />
      <max value="0" />
    </element>
    <element id="Communication.recipient">
      <path value="Communication.recipient" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
      </type>
    </element>
    <element id="Communication.recipient.id">
      <path value="Communication.recipient.id" />
      <max value="0" />
    </element>
    <element id="Communication.recipient.reference">
      <path value="Communication.recipient.reference" />
      <min value="1" />
    </element>
    <element id="Communication.recipient.identifier">
      <path value="Communication.recipient.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.recipient.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Communication.recipient.display" />
      <max value="0" />
    </element>
    <element id="Communication.topic">
      <path value="Communication.topic" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ReferralRequest" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Goal" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/CarePlan" />
      </type>
    </element>
    <element id="Communication.topic.id">
      <path value="Communication.topic.id" />
      <max value="0" />
    </element>
    <element id="Communication.topic.extension">
      <path value="Communication.topic.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="Communication.topic.extension:referenceTargetType">
      <path value="Communication.topic.extension" />
      <sliceName value="referenceTargetType" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://oda.fi/fhir/StructureDefinition/reference-target-type" />
      </type>
    </element>
    <element id="Communication.topic.extension:carePlanActivityId">
      <path value="Communication.topic.extension" />
      <sliceName value="carePlanActivityId" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://oda.fi/fhir/StructureDefinition/care-plan-activity-id" />
      </type>
    </element>
    <element id="Communication.topic.reference">
      <path value="Communication.topic.reference" />
      <min value="1" />
    </element>
    <element id="Communication.topic.identifier">
      <path value="Communication.topic.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.topic.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Communication.topic.display" />
      <max value="0" />
    </element>
    <element id="Communication.context">
      <path value="Communication.context" />
      <max value="0" />
    </element>
    <element id="Communication.sender">
      <path value="Communication.sender" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
      </type>
    </element>
    <element id="Communication.reasonCode">
      <path value="Communication.reasonCode" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="coding.system" />
        </discriminator>
        <rules value="closed" />
      </slicing>
      <min value="1" />
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://oda.fi/fhir/ValueSet/notification-reason-code" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Communication.reasonCode:eventType">
      <path value="Communication.reasonCode" />
      <sliceName value="eventType" />
      <definition value="The type of event that triggered this communication." />
      <min value="1" />
      <max value="1" />
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://oda.fi/fhir/ValueSet/notification-reason-code" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Communication.reasonCode:eventType.id">
      <path value="Communication.reasonCode.id" />
      <max value="0" />
    </element>
    <element id="Communication.reasonCode:eventType.coding">
      <path value="Communication.reasonCode.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Communication.reasonCode:eventType.coding.id">
      <path value="Communication.reasonCode.coding.id" />
      <max value="0" />
    </element>
    <element id="Communication.reasonCode:eventType.coding.system">
      <path value="Communication.reasonCode.coding.system" />
      <min value="1" />
      <fixedUri value="http://oda.fi/fhir/CodeSystem/notification-type" />
    </element>
    <element id="Communication.reasonCode:eventType.coding.version">
      <path value="Communication.reasonCode.coding.version" />
      <max value="0" />
    </element>
    <element id="Communication.reasonCode:eventType.coding.code">
      <path value="Communication.reasonCode.coding.code" />
      <min value="1" />
    </element>
    <element id="Communication.reasonCode:eventType.coding.userSelected">
      <path value="Communication.reasonCode.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Communication.reasonCode:eventType.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Communication.reasonCode.text" />
      <max value="0" />
    </element>
    <element id="Communication.reasonCode:additionalReasonCode">
      <path value="Communication.reasonCode" />
      <sliceName value="additionalReasonCode" />
      <definition value="Other reason code for the communication." />
      <max value="1" />
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://oda.fi/fhir/ValueSet/notification-reason-code" />
        </valueSetReference>
      </binding>
    </element>
    <element id="Communication.reasonCode:additionalReasonCode.id">
      <path value="Communication.reasonCode.id" />
      <max value="0" />
    </element>
    <element id="Communication.reasonCode:additionalReasonCode.coding">
      <path value="Communication.reasonCode.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Communication.reasonCode:additionalReasonCode.coding.id">
      <path value="Communication.reasonCode.coding.id" />
      <max value="0" />
    </element>
    <element id="Communication.reasonCode:additionalReasonCode.coding.system">
      <path value="Communication.reasonCode.coding.system" />
      <min value="1" />
    </element>
    <element id="Communication.reasonCode:additionalReasonCode.coding.version">
      <path value="Communication.reasonCode.coding.version" />
      <max value="0" />
    </element>
    <element id="Communication.reasonCode:additionalReasonCode.coding.code">
      <path value="Communication.reasonCode.coding.code" />
      <min value="1" />
    </element>
    <element id="Communication.reasonCode:additionalReasonCode.coding.userSelected">
      <path value="Communication.reasonCode.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Communication.reasonCode:additionalReasonCode.text">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Communication.reasonCode.text" />
      <max value="0" />
    </element>
    <element id="Communication.reasonReference">
      <path value="Communication.reasonReference" />
      <max value="0" />
    </element>
    <element id="Communication.payload">
      <path value="Communication.payload" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Communication.payload.id">
      <path value="Communication.payload.id" />
      <max value="0" />
    </element>
    <element id="Communication.payload.content[x]:contentString">
      <path value="Communication.payload.contentString" />
      <sliceName value="contentString" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="Communication.note">
      <path value="Communication.note" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>