{
  "resourceType": "StructureDefinition",
  "url": "https://meditools.nl/fhir/StructureDefinition/IncomingEconsult",
  "name": "IncomingEconsult",
  "status": "draft",
  "date": "2023-09-27T08:00:33.6886767+00:00",
  "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",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Communication.identifier:sliceIdentifier",
        "path": "Communication.identifier",
        "sliceName": "sliceIdentifier"
      },
      {
        "id": "Communication.identifier:sliceIdentifier.system",
        "path": "Communication.identifier.system",
        "min": 1
      },
      {
        "id": "Communication.identifier:sliceIdentifier.value",
        "path": "Communication.identifier.value",
        "min": 1
      },
      {
        "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",
        "max": "0"
      },
      {
        "id": "Communication.inResponseTo",
        "path": "Communication.inResponseTo",
        "max": "1"
      },
      {
        "id": "Communication.subject",
        "path": "Communication.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ]
      },
      {
        "id": "Communication.subject.reference",
        "path": "Communication.subject.reference",
        "min": 1
      },
      {
        "id": "Communication.topic",
        "path": "Communication.topic",
        "min": 1
      },
      {
        "id": "Communication.topic.text",
        "path": "Communication.topic.text",
        "min": 1
      },
      {
        "id": "Communication.about",
        "path": "Communication.about",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
            ]
          }
        ]
      },
      {
        "id": "Communication.about.reference",
        "path": "Communication.about.reference",
        "min": 1
      },
      {
        "id": "Communication.about.display",
        "path": "Communication.about.display",
        "min": 1
      },
      {
        "id": "Communication.sent",
        "path": "Communication.sent",
        "min": 1
      },
      {
        "id": "Communication.received",
        "path": "Communication.received",
        "max": "0"
      },
      {
        "id": "Communication.recipient",
        "path": "Communication.recipient",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/CareTeam"
            ]
          }
        ]
      },
      {
        "id": "Communication.sender",
        "path": "Communication.sender",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ]
      },
      {
        "id": "Communication.sender.reference",
        "path": "Communication.sender.reference",
        "min": 1
      },
      {
        "id": "Communication.payload",
        "path": "Communication.payload",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "extension.value"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Communication.payload.extension",
        "path": "Communication.payload.extension",
        "min": 1
      },
      {
        "id": "Communication.payload.extension:payloadType",
        "path": "Communication.payload.extension",
        "sliceName": "payloadType",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://example.org/fhir/StructureDefinition/PayloadType"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Communication.payload.extension:payloadType.value[x]",
        "path": "Communication.payload.extension.value[x]",
        "min": 1
      },
      {
        "id": "Communication.payload:text",
        "path": "Communication.payload",
        "sliceName": "text",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Communication.payload:text.extension",
        "path": "Communication.payload.extension",
        "min": 1
      },
      {
        "id": "Communication.payload:text.extension:payloadType",
        "path": "Communication.payload.extension",
        "sliceName": "payloadType",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://example.org/fhir/StructureDefinition/PayloadType"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Communication.payload:text.extension:payloadType.value[x]",
        "path": "Communication.payload.extension.value[x]",
        "min": 1,
        "fixedCode": "econsult-text"
      },
      {
        "id": "Communication.payload:text.content[x]",
        "path": "Communication.payload.content[x]",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Communication.payload:attachments",
        "path": "Communication.payload",
        "sliceName": "attachments"
      },
      {
        "id": "Communication.payload:attachments.extension",
        "path": "Communication.payload.extension",
        "min": 1
      },
      {
        "id": "Communication.payload:attachments.extension:payloadType",
        "path": "Communication.payload.extension",
        "sliceName": "payloadType",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://example.org/fhir/StructureDefinition/PayloadType"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Communication.payload:attachments.extension:payloadType.value[x]",
        "path": "Communication.payload.extension.value[x]",
        "min": 1,
        "fixedCode": "econsult-attachment"
      },
      {
        "id": "Communication.payload:attachments.content[x]",
        "path": "Communication.payload.content[x]",
        "type": [
          {
            "code": "Attachment"
          }
        ]
      },
      {
        "id": "Communication.payload:attachments.content[x].contentType",
        "path": "Communication.payload.content[x].contentType",
        "min": 1
      },
      {
        "id": "Communication.payload:attachments.content[x].data",
        "path": "Communication.payload.content[x].data",
        "min": 1
      },
      {
        "id": "Communication.payload:attachments.content[x].hash",
        "path": "Communication.payload.content[x].hash",
        "min": 1
      }
    ]
  }
}