{
  "resourceType": "StructureDefinition",
  "id": "procedure-eu-core",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 2
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    }
  ],
  "url": "http://hl7.eu/fhir/base/StructureDefinition/procedure-eu-core",
  "name": "ProcedureEuCore",
  "title": "Procedure (EU core)",
  "status": "active",
  "description": "This profile introduces essential constraints and extensions for the Procedure resource that apply across multiple use cases.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Procedure",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Procedure",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Procedure.language",
        "path": "Procedure.language",
        "short": "Language of the procedure"
      },
      {
        "id": "Procedure.text",
        "path": "Procedure.text",
        "short": "Textual representation of the procedure"
      },
      {
        "id": "Procedure.extension",
        "path": "Procedure.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Procedure.extension:recorded",
        "path": "Procedure.extension",
        "sliceName": "recorded",
        "short": "Date when the procedure was recorded",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/5.0/StructureDefinition/extension-Procedure.recorded"
            ]
          }
        ]
      },
      {
        "id": "Procedure.identifier",
        "path": "Procedure.identifier",
        "short": "Identifier for the procedure"
      },
      {
        "id": "Procedure.code",
        "path": "Procedure.code",
        "definition": "Identification of the procedure or recording of \"absence of relevant procedures\" or of \"procedures unknown\".",
        "min": 1,
        "binding": {
          "strength": "preferred",
          "valueSet": "http://hl7.org/fhir/uv/ips/ValueSet/procedures-uv-ips"
        }
      },
      {
        "id": "Procedure.subject",
        "path": "Procedure.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.eu/fhir/base/StructureDefinition/patient-eu-core"
            ]
          }
        ]
      },
      {
        "id": "Procedure.performed[x]",
        "path": "Procedure.performed[x]",
        "min": 1
      },
      {
        "id": "Procedure.recorder",
        "path": "Procedure.recorder",
        "short": "The person or organization who recorded the procedure"
      },
      {
        "id": "Procedure.asserter",
        "path": "Procedure.asserter",
        "short": "The person or organization who asserts the procedure"
      },
      {
        "id": "Procedure.performer.actor",
        "path": "Procedure.performer.actor",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.eu/fhir/base/StructureDefinition/practitionerRole-eu-core",
              "http://hl7.eu/fhir/base/StructureDefinition/practitioner-eu-core",
              "http://hl7.org/fhir/StructureDefinition/Device",
              "http://hl7.eu/fhir/base/StructureDefinition/patient-eu-core",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
              "http://hl7.eu/fhir/base/StructureDefinition/organization-eu-core"
            ]
          }
        ]
      },
      {
        "id": "Procedure.performer.onBehalfOf",
        "path": "Procedure.performer.onBehalfOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.eu/fhir/base/StructureDefinition/organization-eu-core"
            ]
          }
        ]
      },
      {
        "id": "Procedure.reasonCode",
        "path": "Procedure.reasonCode",
        "short": "Why the procedure was performed (code)"
      },
      {
        "id": "Procedure.reasonReference",
        "path": "Procedure.reasonReference",
        "short": "Why the procedure was performed (details)",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.eu/fhir/base/StructureDefinition/condition-eu-core",
              "http://hl7.org/fhir/StructureDefinition/Observation",
              "http://hl7.eu/fhir/base/StructureDefinition/procedure-eu-core",
              "http://hl7.org/fhir/StructureDefinition/DiagnosticReport",
              "http://hl7.org/fhir/StructureDefinition/DocumentReference"
            ]
          }
        ]
      },
      {
        "id": "Procedure.bodySite",
        "path": "Procedure.bodySite",
        "definition": "Anatomical location which is the focus of the problem.",
        "constraint": [
          {
            "key": "eu-bodysite-1",
            "severity": "error",
            "human": "Either a body site code or a reference to a BodyStructure resource SHALL be used, but not both.",
            "expression": "(coding.empty() and text.empty()) or extension('http://hl7.org/fhir/StructureDefinition/bodySite').empty()",
            "source": "http://hl7.eu/fhir/base/StructureDefinition/procedure-eu-core"
          }
        ],
        "binding": {
          "strength": "preferred",
          "valueSet": "http://hl7.org/fhir/ValueSet/body-site"
        }
      },
      {
        "id": "Procedure.bodySite.extension:bodySite",
        "path": "Procedure.bodySite.extension",
        "sliceName": "bodySite",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/bodySite"
            ]
          }
        ]
      },
      {
        "id": "Procedure.bodySite.extension:bodySite.value[x]",
        "path": "Procedure.bodySite.extension.value[x]",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.eu/fhir/base/StructureDefinition/bodyStructure-eu-core"
            ]
          }
        ]
      },
      {
        "id": "Procedure.outcome",
        "path": "Procedure.outcome",
        "short": "Outcome of the procedure"
      },
      {
        "id": "Procedure.complication",
        "path": "Procedure.complication",
        "short": "Complications that occurred during the procedure (code)"
      },
      {
        "id": "Procedure.complicationDetail",
        "path": "Procedure.complicationDetail",
        "short": "Complications that occurred during the procedure (details)",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.eu/fhir/base/StructureDefinition/condition-eu-core"
            ]
          }
        ]
      },
      {
        "id": "Procedure.note",
        "path": "Procedure.note",
        "short": "Additional information about the procedure."
      },
      {
        "id": "Procedure.focalDevice",
        "path": "Procedure.focalDevice",
        "short": "Device implanted, removed or otherwise manipulated"
      },
      {
        "id": "Procedure.usedReference",
        "path": "Procedure.usedReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Device",
              "http://hl7.eu/fhir/base/StructureDefinition/medication-eu-core",
              "http://hl7.org/fhir/StructureDefinition/Substance"
            ]
          }
        ]
      },
      {
        "id": "Procedure.usedCode",
        "path": "Procedure.usedCode",
        "short": "Device used to perform the procedure (code)"
      }
    ]
  }
}
