<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="CommunicationABeReC" />
  <url value="https://www.alberta.ca/fhir/aberec/StructureDefinition/CommunicationABeReC" />
  <version value="1.1.0" />
  <name value="CommunicationABeReC" />
  <title value="Communication (AB:eReC)" />
  <status value="draft" />
  <description value="This profile defines a set of constraints to the FHIR Communication resource for use in Alberta eReferral and eConsult (AB:eReC). It re-profiles the CA-eReC Communication profile and it includes constraints that represent the minimum expectations for the Communication resource when used in the AB:eReC." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Communication" />
  <baseDefinition value="http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Communication" />
  <derivation value="constraint" />
  <differential>
    <element id="Communication.basedOn">
      <path value="Communication.basedOn" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.alberta.ca/fhir/aberec/StructureDefinition/ServiceRequestABeReC" />
      </type>
    </element>
    <element id="Communication.inResponseTo">
      <path value="Communication.inResponseTo" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.alberta.ca/fhir/aberec/StructureDefinition/CommunicationABeReC" />
      </type>
    </element>
    <element id="Communication.category">
      <path value="Communication.category" />
      <binding>
        <strength value="extensible" />
        <valueSet value="https://www.alberta.ca/fhir/ValueSet/referral-communication-category-ab" />
      </binding>
    </element>
    <element id="Communication.subject">
      <path value="Communication.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.alberta.ca/fhir/aberec/StructureDefinition/PatientABeReC" />
      </type>
    </element>
    <element id="Communication.recipient">
      <path value="Communication.recipient" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.alberta.ca/fhir/aberec/StructureDefinition/PractitionerRoleABeReC" />
        <targetProfile value="https://www.alberta.ca/fhir/aberec/StructureDefinition/HealthcareServiceABeReC" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Communication.recipient.reference">
      <path value="Communication.recipient.reference" />
      <mustSupport value="true" />
    </element>
    <element id="Communication.recipient.identifier">
      <path value="Communication.recipient.identifier" />
      <mustSupport value="true" />
    </element>
    <element id="Communication.recipient.identifier.system">
      <path value="Communication.recipient.identifier.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Communication.recipient.identifier.value">
      <path value="Communication.recipient.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Communication.sender">
      <path value="Communication.sender" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.alberta.ca/fhir/aberec/StructureDefinition/PractitionerRoleABeReC" />
        <targetProfile value="https://www.alberta.ca/fhir/aberec/StructureDefinition/HealthcareServiceABeReC" />
      </type>
    </element>
    <element id="Communication.payload">
      <path value="Communication.payload" />
      <min value="1" />
    </element>
    <element id="Communication.payload.content[x]">
      <path value="Communication.payload.content[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
    </element>
    <element id="Communication.payload.content[x]:contentReference">
      <path value="Communication.payload.content[x]" />
      <sliceName value="contentReference" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.alberta.ca/fhir/aberec/StructureDefinition/DocumentReferenceABeReC" />
      </type>
    </element>
  </differential>
</StructureDefinition>