{
  "resourceType": "StructureDefinition",
  "id": "hl7v2communication-profile",
  "url": "http://fhir.xt.dev/StructureDefinition/HL7v2Communication",
  "version": "1.0.1",
  "name": "HL7v2Communication",
  "status": "active",
  "date": "2024-11-25T22:31:46.488095+00:00",
  "publisher": "x-tention Informationstechnologie GmbH",
  "contact": [
    {
      "telecom": [
        {
          "system": "email",
          "value": "fhir.profiling@x-tention.com",
          "use": "work"
        }
      ]
    }
  ],
  "copyright": "x-tention Informationstechnologie GmbH",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Communication",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Communication",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Communication.text",
        "path": "Communication.text",
        "max": "0"
      },
      {
        "id": "Communication.contained",
        "path": "Communication.contained",
        "max": "0"
      },
      {
        "id": "Communication.identifier",
        "path": "Communication.identifier",
        "short": "Message ID",
        "definition": "Message ID aus MSH.10",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Communication.identifier.use",
        "path": "Communication.identifier.use",
        "max": "0"
      },
      {
        "id": "Communication.identifier.type",
        "path": "Communication.identifier.type",
        "max": "0"
      },
      {
        "id": "Communication.identifier.system",
        "path": "Communication.identifier.system",
        "max": "0"
      },
      {
        "id": "Communication.identifier.value",
        "path": "Communication.identifier.value",
        "short": "MSH.10",
        "min": 1
      },
      {
        "id": "Communication.identifier.period",
        "path": "Communication.identifier.period",
        "max": "0"
      },
      {
        "id": "Communication.identifier.assigner",
        "path": "Communication.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Communication.instantiatesCanonical",
        "path": "Communication.instantiatesCanonical",
        "max": "0"
      },
      {
        "id": "Communication.basedOn",
        "path": "Communication.basedOn",
        "max": "0"
      },
      {
        "id": "Communication.statusReason",
        "path": "Communication.statusReason",
        "max": "0"
      },
      {
        "id": "Communication.category",
        "path": "Communication.category",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://fhir.xt.dev/ValueSet/HL7v2SystemCommunicationCategories"
        }
      },
      {
        "id": "Communication.category.coding",
        "path": "Communication.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Communication.category.coding.id",
        "path": "Communication.category.coding.id",
        "max": "0"
      },
      {
        "id": "Communication.category.coding.userSelected",
        "path": "Communication.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Communication.priority",
        "path": "Communication.priority",
        "max": "0"
      },
      {
        "id": "Communication.medium",
        "path": "Communication.medium",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Communication.medium.coding",
        "path": "Communication.medium.coding",
        "min": 1,
        "max": "1",
        "fixedCoding": {
          "system": "http://fhir.xt.dev/CodeSystem/ConnectionTypes",
          "code": "hl7v2-orcsignal"
        }
      },
      {
        "id": "Communication.medium.coding.userSelected",
        "path": "Communication.medium.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Communication.medium.text",
        "path": "Communication.medium.text",
        "max": "0"
      },
      {
        "id": "Communication.subject",
        "path": "Communication.subject",
        "short": "Patient",
        "definition": "The patient that was communicated in the PID segment. Either a reference to the resolved master patient identity or a local patient Identifier is used. If a local identifier is used, the resource may only be stored as a contained resource.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Communication.subject.type",
        "path": "Communication.subject.type",
        "min": 1,
        "fixedUri": "Patient"
      },
      {
        "id": "Communication.subject.identifier",
        "path": "Communication.subject.identifier",
        "short": "Logical reference",
        "definition": "An identifier for the target resource. This is used when it is important to record the local patient ID. If this is used, the resource may not be stored independently in the CDS, only contained."
      },
      {
        "id": "Communication.topic",
        "path": "Communication.topic",
        "min": 1
      },
      {
        "id": "Communication.topic.coding",
        "path": "Communication.topic.coding",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "description": "v2 MESSAGE TYPE",
          "valueSet": "http://terminology.hl7.org/ValueSet/v2-0076"
        }
      },
      {
        "id": "Communication.topic.coding.userSelected",
        "path": "Communication.topic.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Communication.topic.text",
        "path": "Communication.topic.text",
        "max": "0"
      },
      {
        "id": "Communication.about",
        "path": "Communication.about",
        "max": "0"
      },
      {
        "id": "Communication.encounter",
        "path": "Communication.encounter",
        "short": "Encounter communicated in message",
        "definition": "The Encounter which was communicated in the HL7 message's PV1 segment. Either as a literal reference, if it can be found in the FHIR server, or as a logical reference."
      },
      {
        "id": "Communication.recipient",
        "path": "Communication.recipient",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "reference"
            },
            {
              "type": "type",
              "path": "type"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Communication.recipient:knownOrganization",
        "path": "Communication.recipient",
        "sliceName": "knownOrganization",
        "short": "Message recipient (MSH.6 Organization)",
        "definition": "The target organization of the communication, as communicated in MSH.6.",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Communication.recipient:knownOrganization.reference",
        "path": "Communication.recipient.reference",
        "min": 1
      },
      {
        "id": "Communication.recipient:knownOrganization.type",
        "path": "Communication.recipient.type",
        "max": "0"
      },
      {
        "id": "Communication.recipient:knownOrganization.identifier",
        "path": "Communication.recipient.identifier",
        "max": "0"
      },
      {
        "id": "Communication.recipient:knownPractitioner",
        "path": "Communication.recipient",
        "sliceName": "knownPractitioner",
        "short": "Message recipient (Practitioner)",
        "definition": "The practitioner which was the target of the communication.",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Communication.recipient:knownPractitioner.reference",
        "path": "Communication.recipient.reference",
        "min": 1
      },
      {
        "id": "Communication.recipient:knownPractitioner.type",
        "path": "Communication.recipient.type",
        "max": "0"
      },
      {
        "id": "Communication.recipient:knownPractitioner.identifier",
        "path": "Communication.recipient.identifier",
        "max": "0"
      },
      {
        "id": "Communication.recipient:unknownPractitioner",
        "path": "Communication.recipient",
        "sliceName": "unknownPractitioner",
        "short": "Message recipient (Practitioner ID)",
        "definition": "The practitioner which was the target of the communication. Only to be used in case the practitioner is not known in the CDS.",
        "max": "1"
      },
      {
        "id": "Communication.recipient:unknownPractitioner.reference",
        "path": "Communication.recipient.reference",
        "max": "0"
      },
      {
        "id": "Communication.recipient:unknownPractitioner.type",
        "path": "Communication.recipient.type",
        "min": 1,
        "fixedUri": "Practitioner"
      },
      {
        "id": "Communication.recipient:unknownPractitioner.identifier",
        "path": "Communication.recipient.identifier",
        "min": 1
      },
      {
        "id": "Communication.sender",
        "path": "Communication.sender",
        "short": "Sending Facility",
        "definition": "Sending Facility as communicated in MSH.4. Use a reference if the organization can be resolved or an identifier if not.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Communication.sender.type",
        "path": "Communication.sender.type",
        "min": 1,
        "fixedUri": "Organization"
      },
      {
        "id": "Communication.sender.identifier.use",
        "path": "Communication.sender.identifier.use",
        "max": "0"
      },
      {
        "id": "Communication.sender.identifier.type",
        "path": "Communication.sender.identifier.type",
        "max": "0"
      },
      {
        "id": "Communication.sender.identifier.system",
        "path": "Communication.sender.identifier.system",
        "max": "0"
      },
      {
        "id": "Communication.sender.identifier.period",
        "path": "Communication.sender.identifier.period",
        "max": "0"
      },
      {
        "id": "Communication.sender.identifier.assigner",
        "path": "Communication.sender.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Communication.sender.display",
        "path": "Communication.sender.display",
        "short": "MSH.4",
        "definition": "MSH.4 content if a reference is used."
      },
      {
        "id": "Communication.reasonCode",
        "path": "Communication.reasonCode",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Communication.reasonCode.coding",
        "path": "Communication.reasonCode.coding",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "description": "v2 EVENT TYPE CODE",
          "valueSet": "http://terminology.hl7.org/ValueSet/v2-0003"
        }
      },
      {
        "id": "Communication.reasonCode.coding.userSelected",
        "path": "Communication.reasonCode.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Communication.reasonCode.text",
        "path": "Communication.reasonCode.text",
        "max": "0"
      },
      {
        "id": "Communication.reasonReference",
        "path": "Communication.reasonReference",
        "max": "0"
      },
      {
        "id": "Communication.payload",
        "path": "Communication.payload",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Communication.payload.content[x]",
        "path": "Communication.payload.content[x]",
        "short": "HL7v2 message content",
        "definition": "HL7v2 message content. Please note the 1 MB size limit for FHIR Strings and exclude base64-encoded documents and similar large content.",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Communication.note",
        "path": "Communication.note",
        "max": "0"
      }
    ]
  }
}