{
  "resourceType": "StructureDefinition",
  "id": "Procedure",
  "url": "https://fhir.centraxx.de/StructureDefinition/Procedure",
  "version": "2025.4.0",
  "name": "Procedure",
  "status": "active",
  "publisher": "Kairos an IQVIA business",
  "description": "Represents a CentraXX medical procedure.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Procedure",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Procedure",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Procedure.identifier",
        "path": "Procedure.identifier",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Procedure.identifier.value",
        "path": "Procedure.identifier.value",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Procedure.partOf",
        "path": "Procedure.partOf",
        "slicing": {
          "discriminator": [
            {
              "type": "exists",
              "path": "reference"
            }
          ],
          "rules": "closed"
        },
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/Procedure"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.partOf:byReference",
        "path": "Procedure.partOf",
        "sliceName": "byReference",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/Procedure"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.partOf:byReference.reference",
        "path": "Procedure.partOf.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Procedure.partOf:byIdentifier",
        "path": "Procedure.partOf",
        "sliceName": "byIdentifier",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/Procedure"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.partOf:byIdentifier.type",
        "path": "Procedure.partOf.type",
        "min": 1,
        "fixedUri": "Procedure",
        "mustSupport": true
      },
      {
        "id": "Procedure.partOf:byIdentifier.identifier",
        "path": "Procedure.partOf.identifier",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Procedure.partOf:byIdentifier.identifier.system",
        "path": "Procedure.partOf.identifier.system",
        "min": 1,
        "fixedString": "https://fhir.centraxx.de/system/medProcedure/procedureId",
        "mustSupport": true
      },
      {
        "id": "Procedure.partOf:byIdentifier.identifier.value",
        "path": "Procedure.partOf.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Procedure.status",
        "path": "Procedure.status",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Procedure.status.extension",
        "path": "Procedure.status.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "closed"
        },
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.status.extension:dataAbsentReason",
        "path": "Procedure.status.extension",
        "sliceName": "dataAbsentReason",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/data-absent-reason"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.status.extension:dataAbsentReason.url",
        "path": "Procedure.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": "Procedure.status.extension:dataAbsentReason.value[x]",
        "path": "Procedure.status.extension.value[x]",
        "type": [
          {
            "code": "code"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.status.extension:dataAbsentReason.value[x]:valueCode",
        "path": "Procedure.status.extension.value[x]",
        "sliceName": "valueCode",
        "min": 1,
        "fixedCode": "asked-unknown",
        "mustSupport": true
      },
      {
        "id": "Procedure.status.extension:procedureStatusPlanned",
        "path": "Procedure.status.extension",
        "sliceName": "procedureStatusPlanned",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medProcedure/status/planned"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.code",
        "path": "Procedure.code",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Procedure.code.coding",
        "path": "Procedure.code.coding",
        "min": 1,
        "max": "1",
        "constraint": [
          {
            "key": "pro-cxx-1",
            "severity": "error",
            "human": "The catalog system must be supported by CentraXX. The system url must start with 'urn:centraxx:CodeSystem/<catalog>' where <catalog> must be one of: OpsCatalog, Catalog",
            "expression": "system.startsWith('urn:centraxx:CodeSystem/OpsCatalog') or system.startsWith('urn:centraxx:CodeSystem/Catalog')",
            "source": "https://fhir.centraxx.de/StructureDefinition/Procedure"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.code.coding.system",
        "path": "Procedure.code.coding.system",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Procedure.code.coding.code",
        "path": "Procedure.code.coding.code",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Procedure.code.coding.display",
        "path": "Procedure.code.coding.display",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Procedure.subject",
        "path": "Procedure.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/Patient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.encounter",
        "path": "Procedure.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/Encounter"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.performed[x]",
        "path": "Procedure.performed[x]",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.recorder",
        "path": "Procedure.recorder",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/Person"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.asserter",
        "path": "Procedure.asserter",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/Practitioner"
            ]
          }
        ],
        "constraint": [
          {
            "key": "cxx-pro-2",
            "severity": "error",
            "human": "If the asserter is given, the encounter must be given as well.",
            "expression": "Procedure.asserter.exists() implies Procedure.encounter.exists()",
            "source": "https://fhir.centraxx.de/StructureDefinition/Procedure"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.note",
        "path": "Procedure.note",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Procedure.note.text",
        "path": "Procedure.note.text",
        "min": 1,
        "max": "1",
        "mustSupport": true
      }
    ]
  }
}