<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="679d1f7f-f1de-4cbb-80aa-4891d9f4144c" />
  <url value="https://health.gov.on.ca/sadie/fhir/StructureDefinition/ClientDataLoad" />
  <version value="1.0.0" />
  <name value="ClientDataLoad" />
  <title value="Client Data Load" />
  <status value="active" />
  <description value="Client requests to load their data.  The data itself conforms the ClientLoad profile" />
  <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 client data preload requests.  Clients will send data such as Referral and Member IDs that they want loaded.`_**" />
    </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" />
      <max value="0" />
    </element>
    <element id="Communication.partOf">
      <path value="Communication.partOf" />
      <max value="0" />
    </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:  Use PRELOAD_REQUEST`_**&#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" />
      <max value="0" />
    </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: There will be no Reference,  the display = SADIE`_**" />
      <min value="1" />
      <max value="1" />
    </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:  Since SADIE is 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.`_**&#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" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>