{
  "resourceType": "StructureDefinition",
  "url": "https://cortex-care.io/fhir/StructureDefinition/Cortex_Communication_message",
  "version": "1.0",
  "name": "Cortex_Communication_message",
  "status": "draft",
  "date": "2024-02-08",
  "publisher": "MN Sante",
  "description": "Message represented by a communication FHIR object. A message is part of a discussion.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Communication",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Communication",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "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",
        "max": "0"
      },
      {
        "id": "Communication.partOf",
        "path": "Communication.partOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://cortex-care.io/fhir/StructureDefinition/Cortex_Communication_discussion"
            ]
          }
        ]
      },
      {
        "id": "Communication.inResponseTo",
        "path": "Communication.inResponseTo",
        "max": "0"
      },
      {
        "id": "Communication.status",
        "path": "Communication.status",
        "short": "Binding message code",
        "definition": "Communication status binding the cortex message code",
        "binding": {
          "strength": "required",
          "description": "Pattern for discussion status",
          "valueSet": "https://cortex-care.io/fhir/ValueSet/message-status"
        }
      },
      {
        "id": "Communication.statusReason",
        "path": "Communication.statusReason",
        "max": "0"
      },
      {
        "id": "Communication.category",
        "path": "Communication.category",
        "definition": "Communication category : DISCUSSION | MESSAGE",
        "binding": {
          "strength": "required",
          "description": "Communication category : discussion | message",
          "valueSet": "https://cortex-care.io/fhir/ValueSet/communication-category"
        },
        "fixedCodeableConcept": {
          "coding": {
            "system": "https://cortex-care.io/fhir/ValueSet/communication-category",
            "code": "MESSAGE"
          }
        }
      },
      {
        "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.topic",
        "path": "Communication.topic",
        "max": "0"
      },
      {
        "id": "Communication.about",
        "path": "Communication.about",
        "max": "0"
      },
      {
        "id": "Communication.encounter",
        "path": "Communication.encounter",
        "max": "0"
      },
      {
        "id": "Communication.recipient",
        "path": "Communication.recipient",
        "max": "0"
      },
      {
        "id": "Communication.sender",
        "path": "Communication.sender",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://interopsante.org/fhir/StructureDefinition/FrPractitioner",
              "http://interopsante.org/fhir/StructureDefinition/FrPatient"
            ]
          }
        ]
      },
      {
        "id": "Communication.reasonCode",
        "path": "Communication.reasonCode",
        "max": "0"
      },
      {
        "id": "Communication.reasonReference",
        "path": "Communication.reasonReference",
        "max": "0"
      },
      {
        "id": "Communication.payload",
        "path": "Communication.payload",
        "min": 1,
        "max": "1",
        "definition": "Text contained in the message.",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Communication.payload.contentAttachment",
        "path": "Communication.payload.contentAttachment",
        "max": "0"
      },
      {
        "id": "Communication.payload.contentReference",
        "path": "Communication.payload.contentReference",
        "max": "0"
      },
      {
        "id": "Communication.note",
        "path": "Communication.note",
        "max": "0"
      }
    ]
  }
}