<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="8ee1262d-3184-4d8e-9720-cf906186fc20" />
  <url value="https://health.gov.on.ca/sadie/fhir/StructureDefinition/ClientCommunication" />
  <version value="1.0.0" />
  <name value="ClientCommunication" />
  <title value="Client Communication" />
  <status value="active" />
  <description value="Communications between the SADIE system and the Client system." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Communication" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Communication" />
  <derivation value="constraint" />
  <differential>
    <element id="Communication">
      <path value="Communication" />
      <definition value="#### **_`FOR SADIE USE:  This is used to record data exchanges between SADIE and Client Systems.  This includes sending submission data and the client sending status updates and files`_**&#xA;&#xA;&#xA;An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition." />
    </element>
    <element id="Communication.identifier">
      <path value="Communication.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.instantiatesCanonical">
      <path value="Communication.instantiatesCanonical" />
      <max value="0" />
    </element>
    <element id="Communication.instantiatesUri">
      <path value="Communication.instantiatesUri" />
      <max value="0" />
    </element>
    <element id="Communication.basedOn">
      <path value="Communication.basedOn" />
      <definition value="#### **_`FOR SADIE USE:  This is a reference to the Request.`_**&#xA;&#xA;An order, proposal or plan fulfilled in whole or in part by this Communication." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://health.gov.on.ca/sadie/fhir/StructureDefinition/Request" />
      </type>
    </element>
    <element id="Communication.partOf">
      <path value="Communication.partOf" />
      <definition value="#### **_`FOR SADIE USE:  This is a reference to the Requestor Role that is the owner of the basedOn Request.  This is used by the security inteceptor.`_**" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://health.gov.on.ca/sadie/fhir/StructureDefinition/FlexFormsRole" />
      </type>
    </element>
    <element id="Communication.inResponseTo">
      <path value="Communication.inResponseTo" />
      <max value="0" />
    </element>
    <element id="Communication.status">
      <path value="Communication.status" />
      <definition value="#### **_`FOR SADIE USE: Use 'completed' if it was sucessful and 'entered-in-error' for errors.`_**&#xA;&#xA;The status of the transmission." />
    </element>
    <element id="Communication.statusReason">
      <path value="Communication.statusReason" />
      <definition value="#### **_`FOR SADIE USE: This is the code for the SADIE error message.`_**&#xA;&#xA;The status of the transmission." />
      <binding>
        <strength value="required" />
        <valueSet value="http://health.gov.on.ca/sadie/fhir/ValueSet/FlexForms-ClientCommunication-Errors" />
      </binding>
    </element>
    <element id="Communication.category">
      <path value="Communication.category" />
      <definition value="#### **_`FOR SADIE USE:  If this is referral/member load request then use PRELOAD_REQUEST otherwise use CLIENT.`_**&#xA;&#xA;The type of message conveyed such as alert, notification, reminder, instruction, etc." />
      <min value="1" />
      <max value="1" />
      <binding>
        <strength value="required" />
        <valueSet value="http://health.gov.on.ca/sadie/fhir/ValueSet/FlexForms-CommunicationTypes" />
      </binding>
    </element>
    <element id="Communication.priority">
      <path value="Communication.priority" />
      <max value="0" />
    </element>
    <element id="Communication.medium">
      <path value="Communication.medium" />
      <max value="0" />
    </element>
    <element id="Communication.subject">
      <path value="Communication.subject" />
      <max value="0" />
    </element>
    <element id="Communication.subject.reference">
      <path value="Communication.subject.reference" />
      <max value="0" />
    </element>
    <element id="Communication.subject.type">
      <path value="Communication.subject.type" />
      <max value="0" />
    </element>
    <element id="Communication.subject.identifier">
      <path value="Communication.subject.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.subject.display">
      <path value="Communication.subject.display" />
      <max value="0" />
    </element>
    <element id="Communication.topic">
      <path value="Communication.topic" />
      <max value="0" />
    </element>
    <element id="Communication.about">
      <path value="Communication.about" />
      <max value="0" />
    </element>
    <element id="Communication.about.reference">
      <path value="Communication.about.reference" />
      <max value="0" />
    </element>
    <element id="Communication.about.type">
      <path value="Communication.about.type" />
      <max value="0" />
    </element>
    <element id="Communication.about.identifier">
      <path value="Communication.about.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.about.display">
      <path value="Communication.about.display" />
      <max value="0" />
    </element>
    <element id="Communication.encounter">
      <path value="Communication.encounter" />
      <max value="0" />
    </element>
    <element id="Communication.sent">
      <path value="Communication.sent" />
      <definition value="#### **_`FOR SADIE USE:  If SADIE is doing the sending then this is populated otherwise it is null`_**&#xA;&#xA;The time when this communication was sent." />
    </element>
    <element id="Communication.received">
      <path value="Communication.received" />
      <definition value="#### **_`FOR SADIE USE:  If SADIE is doing the receiving then this is populated otherwise it is null`_**&#xA;&#xA;The time when this communication arrived at the destination." />
    </element>
    <element id="Communication.recipient">
      <path value="Communication.recipient" />
      <definition value="#### **_`FOR SADIE USE:  If SADIE doing the sending then the reference will be populated with a reference to the Program Area and display will be populated with the Program Area identifier code.   If SADIE is receiving then the reference is null and the display = SADIE`_**&#xA;&#xA;&#xA;The entity (e.g. person, organization, clinical information system, care team or device) which was the target of the communication. If receipts need to be tracked by an individual, a separate resource instance will need to be created for each recipient.  Multiple recipient communications are intended where either receipts are not tracked (e.g. a mass mail-out) or a receipt is captured in aggregate (all emails confirmed received by a particular time)." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://health.gov.on.ca/sadie/fhir/StructureDefinition/ProgramArea" />
      </type>
    </element>
    <element id="Communication.recipient.type">
      <path value="Communication.recipient.type" />
      <max value="0" />
    </element>
    <element id="Communication.recipient.identifier">
      <path value="Communication.recipient.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.sender">
      <path value="Communication.sender" />
      <definition value="#### **_`FOR SADIE USE:  If SADIE doing the receiving then the reference will be populated with a reference to the Program Area and display will be populated with the Program Area identifier code.   If SADIE is sending then the reference is null and the display = SADIE`_**&#xA;&#xA;The entity (e.g. person, organization, clinical information system, or device) which was the source of the communication." />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://health.gov.on.ca/sadie/fhir/StructureDefinition/ProgramArea" />
      </type>
    </element>
    <element id="Communication.sender.type">
      <path value="Communication.sender.type" />
      <max value="0" />
    </element>
    <element id="Communication.sender.identifier">
      <path value="Communication.sender.identifier" />
      <max value="0" />
    </element>
    <element id="Communication.reasonCode">
      <path value="Communication.reasonCode" />
      <max value="0" />
    </element>
    <element id="Communication.reasonReference">
      <path value="Communication.reasonReference" />
      <max value="0" />
    </element>
    <element id="Communication.payload">
      <path value="Communication.payload" />
      <definition value="#### **_`FOR SADIE USE:  Any documents will be stored as a contentAttachment.  If a contentAttachment is present the UI will display a download  button so the user can download and view the document.  The following are the elements of the attachement that will be used: contentType=type of file, url=pointer to the binary, size=size of the file, hash=security hash, title=title for the document.`_**&#xA;&#xA;Text, attachment(s), or resource(s) that was communicated to the recipient." />
    </element>
    <element id="Communication.note">
      <path value="Communication.note" />
      <definition value="#### **_`FOR SADIE USE:  This is a description of what the client asked to be changed. Example: (Custom Status = 'Processed',   Request Status = 'Completed')  This will appear on the UI under Communication History`_**&#xA;&#xA;Additional notes or commentary about the communication by the sender, receiver or other interested parties." />
    </element>
  </differential>
</StructureDefinition>