{
  "resourceType": "StructureDefinition",
  "id": "8ee1262d-3184-4d8e-9720-cf906186fc20",
  "url": "https://health.gov.on.ca/sadie/fhir/StructureDefinition/ClientCommunication",
  "version": "1.0.0",
  "name": "ClientCommunication",
  "title": "Client Communication",
  "status": "active",
  "description": "Communications between the SADIE system and the Client system.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Communication",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Communication",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Communication",
        "path": "Communication",
        "definition": "#### **_`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`_**\n\n\nAn 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."
      },
      {
        "id": "Communication.identifier",
        "path": "Communication.identifier",
        "max": "0"
      },
      {
        "id": "Communication.instantiatesCanonical",
        "path": "Communication.instantiatesCanonical",
        "max": "0"
      },
      {
        "id": "Communication.instantiatesUri",
        "path": "Communication.instantiatesUri",
        "max": "0"
      },
      {
        "id": "Communication.basedOn",
        "path": "Communication.basedOn",
        "definition": "#### **_`FOR SADIE USE:  This is a reference to the Request.`_**\n\nAn order, proposal or plan fulfilled in whole or in part by this Communication.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://health.gov.on.ca/sadie/fhir/StructureDefinition/Request"
            ]
          }
        ]
      },
      {
        "id": "Communication.partOf",
        "path": "Communication.partOf",
        "definition": "#### **_`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": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://health.gov.on.ca/sadie/fhir/StructureDefinition/FlexFormsRole"
            ]
          }
        ]
      },
      {
        "id": "Communication.inResponseTo",
        "path": "Communication.inResponseTo",
        "max": "0"
      },
      {
        "id": "Communication.status",
        "path": "Communication.status",
        "definition": "#### **_`FOR SADIE USE: Use 'completed' if it was sucessful and 'entered-in-error' for errors.`_**\n\nThe status of the transmission."
      },
      {
        "id": "Communication.statusReason",
        "path": "Communication.statusReason",
        "definition": "#### **_`FOR SADIE USE: This is the code for the SADIE error message.`_**\n\nThe status of the transmission.",
        "binding": {
          "strength": "required",
          "valueSet": "http://health.gov.on.ca/sadie/fhir/ValueSet/FlexForms-ClientCommunication-Errors"
        }
      },
      {
        "id": "Communication.category",
        "path": "Communication.category",
        "definition": "#### **_`FOR SADIE USE:  If this is referral/member load request then use PRELOAD_REQUEST otherwise use CLIENT.`_**\n\nThe type of message conveyed such as alert, notification, reminder, instruction, etc.",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "valueSet": "http://health.gov.on.ca/sadie/fhir/ValueSet/FlexForms-CommunicationTypes"
        }
      },
      {
        "id": "Communication.priority",
        "path": "Communication.priority",
        "max": "0"
      },
      {
        "id": "Communication.medium",
        "path": "Communication.medium",
        "max": "0"
      },
      {
        "id": "Communication.subject",
        "path": "Communication.subject",
        "max": "0"
      },
      {
        "id": "Communication.subject.reference",
        "path": "Communication.subject.reference",
        "max": "0"
      },
      {
        "id": "Communication.subject.type",
        "path": "Communication.subject.type",
        "max": "0"
      },
      {
        "id": "Communication.subject.identifier",
        "path": "Communication.subject.identifier",
        "max": "0"
      },
      {
        "id": "Communication.subject.display",
        "path": "Communication.subject.display",
        "max": "0"
      },
      {
        "id": "Communication.topic",
        "path": "Communication.topic",
        "max": "0"
      },
      {
        "id": "Communication.about",
        "path": "Communication.about",
        "max": "0"
      },
      {
        "id": "Communication.about.reference",
        "path": "Communication.about.reference",
        "max": "0"
      },
      {
        "id": "Communication.about.type",
        "path": "Communication.about.type",
        "max": "0"
      },
      {
        "id": "Communication.about.identifier",
        "path": "Communication.about.identifier",
        "max": "0"
      },
      {
        "id": "Communication.about.display",
        "path": "Communication.about.display",
        "max": "0"
      },
      {
        "id": "Communication.encounter",
        "path": "Communication.encounter",
        "max": "0"
      },
      {
        "id": "Communication.sent",
        "path": "Communication.sent",
        "definition": "#### **_`FOR SADIE USE:  If SADIE is doing the sending then this is populated otherwise it is null`_**\n\nThe time when this communication was sent."
      },
      {
        "id": "Communication.received",
        "path": "Communication.received",
        "definition": "#### **_`FOR SADIE USE:  If SADIE is doing the receiving then this is populated otherwise it is null`_**\n\nThe time when this communication arrived at the destination."
      },
      {
        "id": "Communication.recipient",
        "path": "Communication.recipient",
        "definition": "#### **_`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`_**\n\n\nThe 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": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://health.gov.on.ca/sadie/fhir/StructureDefinition/ProgramArea"
            ]
          }
        ]
      },
      {
        "id": "Communication.recipient.type",
        "path": "Communication.recipient.type",
        "max": "0"
      },
      {
        "id": "Communication.recipient.identifier",
        "path": "Communication.recipient.identifier",
        "max": "0"
      },
      {
        "id": "Communication.sender",
        "path": "Communication.sender",
        "definition": "#### **_`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`_**\n\nThe entity (e.g. person, organization, clinical information system, or device) which was the source of the communication.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://health.gov.on.ca/sadie/fhir/StructureDefinition/ProgramArea"
            ]
          }
        ]
      },
      {
        "id": "Communication.sender.type",
        "path": "Communication.sender.type",
        "max": "0"
      },
      {
        "id": "Communication.sender.identifier",
        "path": "Communication.sender.identifier",
        "max": "0"
      },
      {
        "id": "Communication.reasonCode",
        "path": "Communication.reasonCode",
        "max": "0"
      },
      {
        "id": "Communication.reasonReference",
        "path": "Communication.reasonReference",
        "max": "0"
      },
      {
        "id": "Communication.payload",
        "path": "Communication.payload",
        "definition": "#### **_`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.`_**\n\nText, attachment(s), or resource(s) that was communicated to the recipient."
      },
      {
        "id": "Communication.note",
        "path": "Communication.note",
        "definition": "#### **_`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`_**\n\nAdditional notes or commentary about the communication by the sender, receiver or other interested parties."
      }
    ]
  }
}