{
  "resourceType": "StructureDefinition",
  "id": "Encounter",
  "url": "https://fhir.centraxx.de/StructureDefinition/Encounter",
  "version": "2025.4.0",
  "name": "Encounter",
  "status": "active",
  "publisher": "Kairos an IQVIA business",
  "description": "Represents a CentraXX Episode.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Encounter",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Encounter",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Encounter.extension",
        "path": "Encounter.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "closed"
        },
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Encounter.extension:updateWithOverwrite",
        "path": "Encounter.extension",
        "sliceName": "updateWithOverwrite",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/updateWithOverwrite"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Encounter.identifier",
        "path": "Encounter.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "exists",
              "path": "system"
            },
            {
              "type": "exists",
              "path": "type"
            }
          ],
          "rules": "closed"
        },
        "min": 1,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "Encounter.identifier:cxxEpisodeId",
        "path": "Encounter.identifier",
        "sliceName": "centraxxEpisodeId",
        "comment": "System unique generated episode id, that cannot be changed by a user or import/update process. Cardinalities refer to theexported messages. The identifier will be ignored during CXX FHIR import",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Encounter.identifier:cxxEpisodeId.type",
        "path": "Encounter.identifier.type",
        "min": 0,
        "max": "0",
        "mustSupport": true
      },
      {
        "id": "Encounter.identifier:cxxEpisodeId.system",
        "path": "Encounter.identifier.system",
        "min": 1,
        "max": "1",
        "fixedString": "https://fhir.centraxx.de/system/episode/centraxxEpisodeId",
        "mustSupport": true
      },
      {
        "id": "Encounter.identifier:cxxEpisodeId.value",
        "path": "Encounter.identifier.value",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Encounter.identifier:idContainerType",
        "path": "Encounter.identifier",
        "sliceName": "idContainerType",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "https://fhir.centraxx.de/StructureDefinition/IdContainerType"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Encounter.status",
        "path": "Encounter.status",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Encounter.status.extension",
        "path": "Encounter.status.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "closed"
        },
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Encounter.status.extension:dataAbsentReason",
        "path": "Encounter.status.extension",
        "sliceName": "dataAbsentReason",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/data-absent-reason"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Encounter.status.extension:dataAbsentReason.url",
        "path": "Encounter.status.extension.url",
        "comment": "The code UNKNOWN in combination with this extension means that the element is was null in CXX. It will set the corresponding element null during CXX import.",
        "min": 1,
        "max": "1",
        "fixedString": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
        "mustSupport": true
      },
      {
        "id": "Encounter.status.extension:dataAbsentReason.value[x]",
        "path": "Encounter.status.extension.value[x]",
        "min": 1,
        "type": [
          {
            "code": "code"
          }
        ],
        "fixedCode": "asked-unknown",
        "mustSupport": true
      },
      {
        "id": "Encounter.status.extension:dataAbsentReason.value[x]:valueCode",
        "path": "Encounter.status.extension.value[x]",
        "sliceName": "valueCode",
        "min": 1,
        "fixedCode": "asked-unknown",
        "mustSupport": true
      },
      {
        "id": "Encounter.class",
        "path": "Encounter.class",
        "min": 1,
        "max": "1",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.centraxx.de/valueSet/episode/stayType"
        }
      },
      {
        "id": "Encounter.class.system",
        "path": "Encounter.class.system",
        "min": 1,
        "fixedString": "https://fhir.centraxx.de/system/episode/stayType",
        "mustSupport": true
      },
      {
        "id": "Encounter.class.code",
        "path": "Encounter.class.code",
        "comment": "If not present, stay type is set to null on import.",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Encounter.subject",
        "path": "Encounter.subject",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/Patient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Encounter.participant",
        "path": "Encounter.participant",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Encounter.participant.type",
        "path": "Encounter.participant.type",
        "min": 1,
        "max": "1",
        "fixedCodeableConcept": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
              "code": "PPRF",
              "display": "primary performer"
            }
          ]
        },
        "mustSupport": true
      },
      {
        "id": "Encounter.participant.individual",
        "path": "Encounter.participant.individual",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/Practitioner"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Encounter.period",
        "path": "Encounter.period",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Encounter.period.start",
        "path": "Encounter.period.start",
        "mustSupport": true
      },
      {
        "id": "Encounter.period.end",
        "path": "Encounter.period.end",
        "mustSupport": true
      },
      {
        "id": "Encounter.serviceProvider",
        "path": "Encounter.serviceProvider",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/Organization"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Encounter.partOf",
        "path": "Encounter.partOf",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/Encounter"
            ]
          }
        ],
        "mustSupport": true
      }
    ]
  }
}