{
  "resourceType": "StructureDefinition",
  "id": "adtbasedencounter-profile",
  "url": "http://fhir.xt.dev/StructureDefinition/AdtBasedEncounter",
  "version": "1.2.0",
  "name": "AdtBasedEncounter",
  "status": "active",
  "date": "2026-03-24T00:00:00+00:00",
  "publisher": "x-tention Informationstechnologie GmbH",
  "contact": [
    {
      "telecom": [
        {
          "system": "email",
          "value": "fhir.profiling@x-tention.com",
          "use": "work"
        }
      ]
    }
  ],
  "description": "An encounter with this profile has been generated based on an incoming HL7v2 ADT message. The encounter's scope is determined by what the sending system tracks as belonging to this encounter identifier. This might entail several hospital visits or movements.",
  "copyright": "x-tention Informationstechnologie GmbH",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Encounter",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Encounter",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Encounter.extension:extensionAufnahmegrund",
        "path": "Encounter.extension",
        "sliceName": "extensionAufnahmegrund",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.de/StructureDefinition/Aufnahmegrund"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Encounter.extension:plannedStartDate",
        "path": "Encounter.extension",
        "sliceName": "plannedStartDate",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/5.0/StructureDefinition/extension-Encounter.plannedStartDate"
            ]
          }
        ],
        "mustSupport": false
      },
      {
        "id": "Encounter.extension:plannedEndDate",
        "path": "Encounter.extension",
        "sliceName": "plannedEndDate",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/5.0/StructureDefinition/extension-Encounter.plannedEndDate"
            ]
          }
        ],
        "mustSupport": false
      },
      {
        "id": "Encounter.extension:replacesEncounter",
        "path": "Encounter.extension",
        "sliceName": "replacesEncounter",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/ReplacesEncounter"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Encounter.extension:consentLabel",
        "path": "Encounter.extension",
        "sliceName": "consentLabel",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.xt.dev/StructureDefinition/ConsentLabel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Encounter.identifier",
        "path": "Encounter.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "type.coding"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Encounter.identifier:visitNumber",
        "path": "Encounter.identifier",
        "sliceName": "visitNumber",
        "short": "Main Identifier by which this encounter is known",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Encounter.identifier:visitNumber.type",
        "path": "Encounter.identifier.type",
        "min": 1
      },
      {
        "id": "Encounter.identifier:visitNumber.type.coding",
        "path": "Encounter.identifier.type.coding",
        "min": 1,
        "max": "1",
        "patternCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
          "code": "VN"
        }
      },
      {
        "id": "Encounter.identifier:visitNumber.type.coding.system",
        "path": "Encounter.identifier.type.coding.system",
        "min": 1
      },
      {
        "id": "Encounter.identifier:visitNumber.type.coding.code",
        "path": "Encounter.identifier.type.coding.code",
        "min": 1
      },
      {
        "id": "Encounter.identifier:visitNumber.system",
        "path": "Encounter.identifier.system",
        "min": 1
      },
      {
        "id": "Encounter.identifier:visitNumber.value",
        "path": "Encounter.identifier.value",
        "min": 1
      },
      {
        "id": "Encounter.type",
        "path": "Encounter.type",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Encounter.type:Kontaktebene",
        "path": "Encounter.type",
        "sliceName": "Kontaktebene",
        "min": 1,
        "max": "1",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://fhir.de/CodeSystem/Kontaktebene",
              "code": "einrichtungskontakt"
            }
          ]
        }
      },
      {
        "id": "Encounter.type:Kontaktebene.coding",
        "path": "Encounter.type.coding",
        "patternCoding": {
          "system": "http://fhir.de/CodeSystem/Kontaktebene",
          "code": "einrichtungskontakt"
        }
      },
      {
        "id": "Encounter.type:Kontaktebene.coding.system",
        "path": "Encounter.type.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.de/CodeSystem/Kontaktebene"
      },
      {
        "id": "Encounter.type:Kontaktebene.coding.code",
        "path": "Encounter.type.coding.code",
        "min": 1,
        "fixedCode": "einrichtungskontakt"
      },
      {
        "id": "Encounter.type:KontaktArt",
        "path": "Encounter.type",
        "sliceName": "KontaktArt",
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "http://fhir.de/CodeSystem/kontaktart-de"
            }
          ]
        }
      },
      {
        "id": "Encounter.type:KontaktArt.coding",
        "path": "Encounter.type.coding",
        "patternCoding": {
          "system": "http://fhir.de/CodeSystem/kontaktart-de"
        }
      },
      {
        "id": "Encounter.type:KontaktArt.coding.system",
        "path": "Encounter.type.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.de/CodeSystem/kontaktart-de"
      },
      {
        "id": "Encounter.type:KontaktArt.coding.code",
        "path": "Encounter.type.coding.code",
        "min": 1
      },
      {
        "id": "Encounter.serviceType.coding",
        "path": "Encounter.serviceType.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Encounter.serviceType.coding:Fachabteilungsschluessel",
        "path": "Encounter.serviceType.coding",
        "sliceName": "Fachabteilungsschluessel",
        "patternCoding": {
          "system": "http://fhir.de/CodeSystem/dkgev/Fachabteilungsschluessel"
        }
      },
      {
        "id": "Encounter.serviceType.coding:Fachabteilungsschluessel.system",
        "path": "Encounter.serviceType.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.de/CodeSystem/dkgev/Fachabteilungsschluessel"
      },
      {
        "id": "Encounter.serviceType.coding:Fachabteilungsschluessel.code",
        "path": "Encounter.serviceType.coding.code",
        "min": 1
      },
      {
        "id": "Encounter.serviceType.coding:ErweiterterFachabteilungsschluessel",
        "path": "Encounter.serviceType.coding",
        "sliceName": "ErweiterterFachabteilungsschluessel",
        "patternCoding": {
          "system": "http://fhir.de/CodeSystem/dkgev/Fachabteilungsschluessel-erweitert"
        }
      },
      {
        "id": "Encounter.serviceType.coding:ErweiterterFachabteilungsschluessel.system",
        "path": "Encounter.serviceType.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.de/CodeSystem/dkgev/Fachabteilungsschluessel-erweitert"
      },
      {
        "id": "Encounter.serviceType.coding:ErweiterterFachabteilungsschluessel.code",
        "path": "Encounter.serviceType.coding.code",
        "min": 1
      },
      {
        "id": "Encounter.subject",
        "path": "Encounter.subject",
        "min": 1
      },
      {
        "id": "Encounter.subject.reference",
        "path": "Encounter.subject.reference",
        "min": 1
      }
    ]
  }
}