{
  "resourceType": "StructureDefinition",
  "id": "digidot-Procedure-no",
  "url": "https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no",
  "version": "0.6.13",
  "name": "DigidotProcedureNo",
  "title": "DigiDot Procedure (NO)",
  "status": "draft",
  "date": "2026-10-27",
  "publisher": "Novari AS - DigiDOT",
  "description": "Readiness: [In review](https://simplifier.net/guide/Visual-overview/Home/Review-status-and-releases.page.md?version=current#readiness-procedure).\n\nProfile base: FHIR R4 Procedure (http://hl7.org/fhir/StructureDefinition/Procedure).\n\nRepresents the clinical record of a dental procedure, such as a filling, tooth extraction or preventive treatment. Use it to document what was performed, attempted or not performed, its status and timing, the clinician involved and the tooth or oral site concerned. Link the procedure to the relevant patient contact and, when applicable, the request that planned it. The ServiceRequest profile should be used to represent planned or requested procedures. The Procedure profile records what was actually done, attempted or not done.",
  "purpose": "Use this profile when a dental action has been performed, started, stopped, put on hold or documented as not done. Use Procedure.status for the lifecycle and performed[x] for the timing of an action that was performed or attempted. Every Procedure references the Encounter where it occurred. Use basedOn for the ServiceRequest that planned the work, reasonCode or reasonReference for the clinical indication and performer for the responsible clinician. Use partOf for a clinically useful component relationship to another Procedure or a MedicationAdministration in the same encounter. Keep clinical procedure coding separate from tariff, fee and settlement coding. Generate structured anatomy and extended clinical meaning from the same clinical input and validate equal anatomical scope.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Procedure",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Procedure",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Procedure",
        "path": "Procedure",
        "short": "Clinically performed, attempted or stopped dental procedure",
        "constraint": [
          {
            "key": "proc-category-recommended",
            "severity": "warning",
            "human": "DigiDOT clinical dental procedures should include Procedure.category coding dental-procedure from the DigiDOT procedure category code system.",
            "expression": "category.coding.where(system = 'https://novari.no/fhir/digidot/CodeSystem/digidot-procedure-category' and code = 'dental-procedure').exists()"
          },
          {
            "key": "procedure-anatomy-same-release",
            "severity": "error",
            "human": "When bodySite is populated, clinical SNOMED CT codings use the pinned Norwegian draft release 20260715. Anatomical Coding.version equality is checked separately.",
            "expression": "bodySite.empty() or code.coding.where(system = 'http://snomed.info/sct').all(version = 'http://snomed.info/sct/51000202101/version/20260715')"
          },
          {
            "key": "digidot-status-known",
            "severity": "error",
            "human": "Do not use unknown as a default or an unmapped lifecycle status.",
            "expression": "status != 'unknown'"
          },
          {
            "key": "procedure-anatomy-version-match",
            "severity": "error",
            "human": "Every SNOMED CT anatomical coding in the inline body-structure extension must state the same edition release as SCTextended.",
            "expression": "bodySite.extension.where(url = 'https://novari.no/fhir/digidot/StructureDefinition/digidot-ehds-body-structure').extension.value.ofType(CodeableConcept).coding.where(system = 'http://snomed.info/sct').all(version.exists() and version = %resource.code.coding.where(id = 'SCTextended').version)",
            "source": "https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no"
          }
        ]
      },
      {
        "id": "Procedure.implicitRules",
        "path": "Procedure.implicitRules",
        "short": "Not used in the current DigiDOT procedure draft",
        "definition": "A DigiDOT Procedure must be interpretable from the published FHIR R4 profile, terminology version and agreed exchange documentation. Do not use implicitRules to introduce undocumented processing rules.",
        "max": "0"
      },
      {
        "id": "Procedure.contained",
        "path": "Procedure.contained",
        "short": "Not used in the current DigiDOT procedure draft",
        "definition": "Resources relevant to the national storage model must be stored as independently identifiable FHIR resources and linked by reference. Do not use contained resources for devices, materials, clinical reasons, reports or other procedure context.",
        "max": "0"
      },
      {
        "id": "Procedure.extension",
        "path": "Procedure.extension",
        "short": "No root extensions",
        "definition": "DigiDOT does not use root extensions on Procedure. Structured anatomy is represented where implementers expect it, inside Procedure.bodySite.",
        "max": "0"
      },
      {
        "id": "Procedure.modifierExtension",
        "path": "Procedure.modifierExtension",
        "short": "Not used in the current DigiDOT procedure draft",
        "definition": "Modifier extensions can change the meaning of a Procedure and require every consumer to understand them. No modifier extension is defined for the current DigiDOT procedure scope. Add a named, governed slice only when such a requirement has been agreed.",
        "max": "0"
      },
      {
        "id": "Procedure.identifier",
        "path": "Procedure.identifier",
        "short": "Stable source business identifiers when available",
        "definition": "Stable business identifiers for this record. If the source EHR or external system has a stable business identifier, it SHALL be included and preserved with its assigning system and value. The element is optional when no such identifier is available. Each supplied identifier SHALL contain system and value. Do not copy the local FHIR resource id merely to populate this element.",
        "mustSupport": true,
        "min": 0,
        "max": "*",
        "comment": "MustSupport requires producers to support conveying available source identifiers and receivers to support preserving them; it does not require inventing an identifier when none is available. Any additional identifier-assignment and matching requirements belong in the exchange contract. An integration-assigned identifier requires governed assignment and a persistent mapping across retries; never generate a fresh identifier on each submission. Different records retain their own identities, even when they share the same patient or care episode. Resource references and FHIR server id rules are unchanged."
      },
      {
        "id": "Procedure.identifier.system",
        "path": "Procedure.identifier.system",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Procedure.identifier.value",
        "path": "Procedure.identifier.value",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Procedure.instantiatesCanonical",
        "path": "Procedure.instantiatesCanonical",
        "short": "Not used in the current DigiDOT procedure scope",
        "definition": "The current DigiDOT procedure profile does not record adherence to FHIR PlanDefinition, ActivityDefinition, Measure, OperationDefinition or Questionnaire artefacts. A future agreed protocol or guideline model may introduce a separate profile or revised constraint.",
        "max": "0"
      },
      {
        "id": "Procedure.instantiatesUri",
        "path": "Procedure.instantiatesUri",
        "short": "Not used in the current DigiDOT procedure scope",
        "definition": "The current DigiDOT procedure profile does not record adherence to external protocols, guidelines or order sets by URI. A future agreed protocol or guideline model may introduce a separate profile or revised constraint.",
        "max": "0"
      },
      {
        "id": "Procedure.basedOn",
        "path": "Procedure.basedOn",
        "short": "Planned/requested procedure that this performed procedure is based on.",
        "definition": "Use Procedure.basedOn to connect a performed procedure to a planned, proposed or ordered dental service. If the source has the relevant request or plan, it shall be populated. This enables traceability from ServiceRequest to Procedure.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-ServiceRequest-no"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.partOf",
        "path": "Procedure.partOf",
        "short": "Procedure or medication administration that this action is part of",
        "definition": "Use Procedure.partOf when this action is a clinical component of another DigiDOT Procedure or a DigiDOT MedicationAdministration in the same Encounter. For a Procedure parent, both Procedures must reference that Encounter. For a MedicationAdministration parent, Procedure.encounter and MedicationAdministration.context identify the same Encounter, and both resources concern the same patient. For treatment spanning several contacts, create one or more Procedures for each Encounter and group the treatment plan through the same ServiceRequest. Do not create an encounter-less parent Procedure, and do not use partOf for the plan/request relationship; use basedOn for ServiceRequest.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no",
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-MedicationAdministration-no"
            ]
          }
        ],
        "mustSupport": true,
        "comment": "For example, a separately documented injection-related technical action or insertion of intravenous access can be part of a medication administration. MedicationAdministration records the medicine and administration details; Procedure records the distinct clinical action. An injection already fully represented as a MedicationAdministration does not automatically require a duplicate Procedure. The reference points from the component to the larger event. Do not create reciprocal partOf references between the same two resources."
      },
      {
        "id": "Procedure.status",
        "path": "Procedure.status",
        "short": "Lifecycle status for this concrete procedure occurrence.",
        "definition": "Use Procedure.status as the authoritative lifecycle status for this Procedure. Use ServiceRequest.status for the plan or request lifecycle. Clinical coding must not contradict these statuses; the extended procedure coding stays in the Procedure hierarchy rather than a planned/completed Situation wrapper. Use a known lifecycle status; unknown is not permitted.",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Procedure.statusReason",
        "path": "Procedure.statusReason",
        "short": "Not used in the current DigiDOT procedure draft",
        "definition": "The current DigiDOT procedure draft has no agreed terminology binding for a separate status reason. Procedure.status is the lifecycle state. Link a clinically significant reason through reasonReference to a DigiDOT Condition; appointment or request lifecycle belongs in Appointment or ServiceRequest.",
        "comment": "This element is closed to avoid an unbound status-reason code or free-text value that duplicates clinical and workflow context.",
        "max": "0"
      },
      {
        "id": "Procedure.category",
        "path": "Procedure.category",
        "short": "Optional interoperable category marker for a DigiDOT dental procedure.",
        "definition": "Use Procedure.category as an optional interoperable marker for searching, sorting, display and comparison across systems. When category is included, use the canonical DigiDOT dental-procedure coding. This profile represents procedures within dental care; category does not replace the clinical procedure code. The precise clinical meaning is represented in Procedure.code using SNOMED CT.",
        "min": 0,
        "max": "1",
        "binding": {
          "strength": "required",
          "description": "When Procedure.category is included, it shall contain exactly one canonical DigiDOT dental-procedure coding. It is not the clinical procedure terminology.",
          "valueSet": "https://novari.no/fhir/digidot/ValueSet/digidot-procedure-category"
        }
      },
      {
        "id": "Procedure.category.extension",
        "path": "Procedure.category.extension",
        "max": "0"
      },
      {
        "id": "Procedure.category.coding",
        "path": "Procedure.category.coding",
        "short": "Canonical DigiDOT dental procedure category coding when category is present",
        "definition": "When Procedure.category is populated, use exactly one coding with system https://novari.no/fhir/digidot/CodeSystem/digidot-procedure-category and code dental-procedure. A display may be included, but it is not the clinical procedure name.",
        "min": 1,
        "max": "1",
        "patternCoding": {
          "system": "https://novari.no/fhir/digidot/CodeSystem/digidot-procedure-category",
          "code": "dental-procedure"
        }
      },
      {
        "id": "Procedure.category.coding.extension",
        "path": "Procedure.category.coding.extension",
        "min": 0,
        "max": "0",
        "definition": "The category coding is a simple interoperable dental-procedure marker. No coding extension is permitted; clinical procedure meaning belongs in Procedure.code."
      },
      {
        "id": "Procedure.code",
        "path": "Procedure.code",
        "short": "Clinical dental procedure",
        "definition": "Record the action in the SNOMED CT Procedure hierarchy. Do not wrap a performed action in a planned or completed Situation. Procedure.status remains authoritative; planned care belongs in ServiceRequest. Include exactly one SCTextended coding and optionally one SCTpre coding. SCTextended carries the complete intended meaning as either a single precoordinated SNOMED CT concept or a postcoordinated expression. SCTpre is an optional, directly usable concept representing the same clinical meaning at the same or a compatible broader level of detail. Do not add a duplicate companion merely to fill a slot. When both are present they must use the same edition release and must not contradict each other; the extended coding may add compatible precision. Compatible meaning must be checked through the terminology contract, not inferred from code equality. When bodySite is present, the extended coding must represent the same complete anatomical scope. Prefer a valid postcoordinated expression when additional clinical or anatomical detail needs to be represented. A single precoordinated concept is sufficient if its defined meaning already represents the complete intended scope. Validate concept membership, compositional grammar, MRCM, clinical templates and anatomical equivalence with the terminology service; a FHIR syntax guard cannot establish these semantic requirements.",
        "min": 1,
        "constraint": [
          {
            "key": "digidot-coding-same-release",
            "severity": "error",
            "human": "When SCTpre is present, both clinical codings must use the same SNOMED CT edition release.",
            "expression": "coding.where(id = 'SCTpre').empty() or coding.where(id = 'SCTpre').version = coding.where(id = 'SCTextended').version"
          }
        ],
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "description": "Prefer a suitable concept from the national dental procedures core, either directly or as the focus of a postcoordinated expression. If it does not cover the intended meaning, use another suitable concept within the Procedure hierarchy. Validate the complete coding against the required binding on its slice. No additional SCTpre coding is required to satisfy this preferred selection.",
          "valueSet": "https://novari.no/fhir/digidot/ValueSet/snomed-procedures"
        },
        "max": "1"
      },
      {
        "id": "Procedure.code.extension",
        "path": "Procedure.code.extension",
        "short": "No extensions on the clinical procedure code",
        "definition": "Additional clinical precision is represented by the agreed SCTextended coding in Procedure.code.coding. Extensions on Procedure.code are not used in the current DigiDOT procedure draft.",
        "max": "0"
      },
      {
        "id": "Procedure.code.coding",
        "path": "Procedure.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "id"
            }
          ],
          "rules": "closed"
        },
        "short": "One required extended coding and one optional precoordinated coding",
        "definition": "Include exactly one SCTextended coding and optionally one SCTpre coding. SCTextended carries the complete intended meaning as either a single precoordinated SNOMED CT concept or a postcoordinated expression. SCTpre is an optional, directly usable concept representing the same clinical meaning at the same or a compatible broader level of detail. Do not add a duplicate companion merely to fill a slot. When both are present they must use the same edition release and must not contradict each other; the extended coding may add compatible precision. Compatible meaning must be checked through the terminology contract, not inferred from code equality. Fixed Coding.id values distinguish the roles because a numeric concept can conform to both datatype profiles.",
        "min": 1,
        "max": "2"
      },
      {
        "id": "Procedure.code.coding:SCTpre",
        "path": "Procedure.code.coding",
        "sliceName": "SCTpre",
        "short": "Optional precoordinated SNOMED CT concept",
        "definition": "Optional single numeric SNOMED CT concept in the Procedure hierarchy, compatible with the complete meaning in SCTextended. The SCTpre datatype prohibits postcoordinated expressions. Both codings must use the same edition release. Follow the core-selection guidance on Procedure.code.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Coding",
            "profile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Coding-SCTpre-no"
            ]
          }
        ],
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "description": "Required Procedure scope, restricted here to a single concept by the SCTpre datatype. Postcoordinated expressions are not permitted in this slice.",
          "valueSet": "http://hl7.org/fhir/ValueSet/procedure-code"
        }
      },
      {
        "id": "Procedure.code.coding:SCTpre.id",
        "path": "Procedure.code.coding.id",
        "short": "SCTpre slot identifier",
        "definition": "Required technical slot identifier. It distinguishes the two roles even when their system, version and code are identical.",
        "min": 1,
        "fixedString": "SCTpre"
      },
      {
        "id": "Procedure.code.coding:SCTextended",
        "path": "Procedure.code.coding",
        "sliceName": "SCTextended",
        "short": "Required extended SNOMED CT code: concept or expression",
        "definition": "The complete clinical meaning as one sufficiently specific SNOMED CT concept or a valid postcoordinated expression. Prefer a suitable national core concept as the focus; another suitable focus is allowed when the core does not cover the meaning. The complete expression must satisfy the Procedure hierarchy binding, not membership of the core refset. Follow the meaning and anatomy rules on Procedure.code. Do not add an identical or broader SCTpre coding solely to match the core list.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding",
            "profile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Coding-SCTpost-no"
            ]
          }
        ],
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "description": "Required Procedure scope for the complete coding. Single concepts and postcoordinated expressions are permitted. Validate the entire value, not only its focus concept, against this ValueSet using the stated SNOMED edition and release. Expression syntax and concept-model rules also require terminology validation.",
          "valueSet": "http://hl7.org/fhir/ValueSet/procedure-code"
        }
      },
      {
        "id": "Procedure.code.coding:SCTextended.id",
        "path": "Procedure.code.coding.id",
        "short": "SCTextended slot identifier",
        "definition": "Required technical slot identifier. It distinguishes the two roles even when their system, version and code are identical.",
        "min": 1,
        "fixedString": "SCTextended"
      },
      {
        "id": "Procedure.subject",
        "path": "Procedure.subject",
        "short": "Patient receiving the procedure",
        "definition": "Reference the patient through no-basis-Patient. External patient data is mapped to this agreed patient representation before it is used by a canonical DigiDOT Procedure.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Patient"
            ]
          }
        ],
        "mustSupport": true,
        "comment": "Use a literal Reference.reference to a separately stored resource conforming to the permitted national target profile. Identifier-only and contained references are not permitted. Official identifiers belong on the target resource. Reuse a confirmed resource in central storage; if no matching resource exists, register it before persisting the clinical reference. The receiving service must check target existence and profile conformance; the profile alone does not perform identity matching or prove that a resource exists in central storage.",
        "constraint": [
          {
            "key": "procedure-subject-literal",
            "severity": "error",
            "human": "A shared-resource reference must contain a literal reference value; identifiers and contained references are not permitted.",
            "expression": "($this is Reference) implies (reference.hasValue() and identifier.empty() and reference.startsWith('#').not())",
            "source": "https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no"
          }
        ]
      },
      {
        "id": "Procedure.subject.reference",
        "path": "Procedure.subject.reference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Procedure.subject.identifier",
        "path": "Procedure.subject.identifier",
        "min": 0,
        "max": "0"
      },
      {
        "id": "Procedure.encounter",
        "path": "Procedure.encounter",
        "short": "Encounter where the procedure occurred",
        "definition": "Reference the DigiDOT Encounter where this procedure was performed, attempted, stopped or documented as not done. Location and organisation context are resolved through the Encounter. For treatment spanning more than one contact, use one Procedure per Encounter and group the plan through ServiceRequest; do not create an encounter-less parent Procedure.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Encounter-no"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.performed[x]",
        "path": "Procedure.performed[x]",
        "short": "Time or period of the procedure.",
        "definition": "Use performedDateTime for a procedure at one clinically relevant time and performedPeriod for an action that lasts over a period within the referenced Encounter. If the source has a procedure time or period, it shall be populated. For imported historical data, performedString, performedAge or performedRange may preserve the source timing when no date or period is known. Do not use those less structured forms for newly recorded procedures when a date or period is available. performed[x] may be absent when status is not-done or entered-in-error and no action occurred or a reliable time is unavailable.",
        "min": 0,
        "mustSupport": true
      },
      {
        "id": "Procedure.recorder",
        "path": "Procedure.recorder",
        "short": "Person responsible for recording the procedure statement",
        "definition": "Individual who recorded the record and takes responsibility for its content.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner"
            ]
          }
        ],
        "mustSupport": true,
        "comment": "Use a literal Reference.reference to a separately stored resource conforming to the permitted national target profile. Identifier-only and contained references are not permitted. Official identifiers belong on the target resource. Reuse a confirmed resource in central storage; if no matching resource exists, register it before persisting the clinical reference. The receiving service must check target existence and profile conformance; the profile alone does not perform identity matching or prove that a resource exists in central storage.",
        "constraint": [
          {
            "key": "procedure-recorder-literal",
            "severity": "error",
            "human": "A shared-resource reference must contain a literal reference value; identifiers and contained references are not permitted.",
            "expression": "($this is Reference) implies (reference.hasValue() and identifier.empty() and reference.startsWith('#').not())",
            "source": "https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no"
          }
        ]
      },
      {
        "id": "Procedure.recorder.reference",
        "path": "Procedure.recorder.reference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Procedure.recorder.identifier",
        "path": "Procedure.recorder.identifier",
        "min": 0,
        "max": "0"
      },
      {
        "id": "Procedure.asserter",
        "path": "Procedure.asserter",
        "short": "Person asserting that the procedure occurred",
        "definition": "Individual who is making the procedure statement.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Patient",
              "http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner"
            ]
          }
        ],
        "comment": "Use a literal Reference.reference to a separately stored resource conforming to the permitted national target profile. Identifier-only and contained references are not permitted. Official identifiers belong on the target resource. Reuse a confirmed resource in central storage; if no matching resource exists, register it before persisting the clinical reference. The receiving service must check target existence and profile conformance; the profile alone does not perform identity matching or prove that a resource exists in central storage.",
        "constraint": [
          {
            "key": "procedure-asserter-literal",
            "severity": "error",
            "human": "A shared-resource reference must contain a literal reference value; identifiers and contained references are not permitted.",
            "expression": "($this is Reference) implies (reference.hasValue() and identifier.empty() and reference.startsWith('#').not())",
            "source": "https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no"
          }
        ]
      },
      {
        "id": "Procedure.asserter.reference",
        "path": "Procedure.asserter.reference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Procedure.asserter.identifier",
        "path": "Procedure.asserter.identifier",
        "min": 0,
        "max": "0"
      },
      {
        "id": "Procedure.performer",
        "path": "Procedure.performer",
        "short": "Individual performing the procedure",
        "definition": "Use performer to record the individual who performed or was responsible for the concrete procedure occurrence. More than one performer may be included when clinically relevant."
      },
      {
        "id": "Procedure.performer.extension",
        "path": "Procedure.performer.extension",
        "max": "0"
      },
      {
        "id": "Procedure.performer.modifierExtension",
        "path": "Procedure.performer.modifierExtension",
        "max": "0"
      },
      {
        "id": "Procedure.performer.function",
        "path": "Procedure.performer.function",
        "short": "Not used in the current DigiDOT procedure draft",
        "definition": "The current DigiDOT procedure draft has no agreed terminology binding for a separate performer-function code. The responsible individual is recorded through performer.actor. A future revision may add a bound performer-function model when a documented dental use case requires it.",
        "max": "0"
      },
      {
        "id": "Procedure.performer.actor",
        "path": "Procedure.performer.actor",
        "short": "Responsible individual performer",
        "definition": "The practitioner who was involved in the procedure.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner"
            ]
          }
        ],
        "mustSupport": true,
        "comment": "Use a literal Reference.reference to a separately stored resource conforming to the permitted national target profile. Identifier-only and contained references are not permitted. Official identifiers belong on the target resource. Reuse a confirmed resource in central storage; if no matching resource exists, register it before persisting the clinical reference. The receiving service must check target existence and profile conformance; the profile alone does not perform identity matching or prove that a resource exists in central storage.",
        "constraint": [
          {
            "key": "procedure-performer-actor-literal",
            "severity": "error",
            "human": "A shared-resource reference must contain a literal reference value; identifiers and contained references are not permitted.",
            "expression": "($this is Reference) implies (reference.hasValue() and identifier.empty() and reference.startsWith('#').not())",
            "source": "https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no"
          }
        ]
      },
      {
        "id": "Procedure.performer.actor.reference",
        "path": "Procedure.performer.actor.reference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Procedure.performer.actor.identifier",
        "path": "Procedure.performer.actor.identifier",
        "min": 0,
        "max": "0"
      },
      {
        "id": "Procedure.performer.onBehalfOf",
        "path": "Procedure.performer.onBehalfOf",
        "short": "Not used in the current DigiDOT procedure draft",
        "definition": "The current DigiDOT procedure draft records the individual performer through performer.actor. Organisation and location context belongs in the required Encounter and its serviceProvider and location elements, with Provenance used where relevant, rather than in a second performer representation. This also avoids an R4/R5 difference in Procedure.performer.onBehalfOf.",
        "max": "0"
      },
      {
        "id": "Procedure.location",
        "path": "Procedure.location",
        "short": "Not used; location is recorded on Encounter",
        "definition": "Procedure location is resolved through the required Procedure.encounter and Encounter.location. Procedure.location is prohibited to prevent duplicate or conflicting location data.",
        "max": "0"
      },
      {
        "id": "Procedure.reasonCode",
        "path": "Procedure.reasonCode",
        "short": "Precoordinated clinical reason for the procedure",
        "definition": "Use reasonCode when the source records a coded clinical indication without a separately maintained Condition. Each reason contains exactly one direct, versioned and precoordinated SNOMED CT concept from Clinical finding or Finding with explicit context (situation), using the same clinical-reasons ValueSet as ServiceRequest and Appointment. Preserve the meaning of historical, absent, uncertain or family-history context; do not reinterpret it as a current diagnosis. Use reasonReference when the reason is a separately stored Condition. Do not use local codes, anatomy-only codes, postcoordinated expressions or procedure lifecycle reasons here.",
        "comment": "Do not duplicate the same reason in reasonCode and reasonReference unless the source explicitly carries both representations and their consistency can be maintained.",
        "min": 0,
        "max": "*",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "https://novari.no/fhir/digidot/ValueSet/digidot-service-request-reasons"
        }
      },
      {
        "id": "Procedure.reasonCode.extension",
        "path": "Procedure.reasonCode.extension",
        "short": "Extensions are not used on a coded reason",
        "max": "0"
      },
      {
        "id": "Procedure.reasonCode.coding",
        "path": "Procedure.reasonCode.coding",
        "short": "One precoordinated SNOMED CT reason code",
        "definition": "One Coding conforming to the DigiDOT precoordinated SNOMED CT Coding profile. The CodeableConcept binding permits Clinical finding and Finding with explicit context concepts. The clinical-reasons ValueSet defines the shared hierarchy boundary.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding",
            "profile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Coding-SCTpre-no"
            ]
          }
        ]
      },
      {
        "id": "Procedure.reasonCode.text",
        "path": "Procedure.reasonCode.text",
        "short": "Supplementary display text for the coded reason",
        "definition": "Text may preserve a useful source display for the reason, but it does not replace the required precoordinated SNOMED CT coding and must not introduce a different clinical meaning."
      },
      {
        "id": "Procedure.reasonReference",
        "path": "Procedure.reasonReference",
        "short": "Dental condition that clinically justified the procedure",
        "definition": "Use reasonReference to link the procedure to the finding, diagnosis or condition that clinically justified it. When known, use DigiDOT Condition. A preventive procedure may omit reasonReference when no clinically significant Condition is present.",
        "comment": "Use this link when the clinical justification is retained as a separate Condition. Use reasonCode only for a direct precoordinated SNOMED CT reason without a separate Condition resource.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Condition-no"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.bodySite",
        "path": "Procedure.bodySite",
        "short": "Inline Xt-EHR anatomy group",
        "definition": "One inline anatomical group in the shared DentalBodySite format: a complex extension containing location, repeated locationQualifier, laterality, morphology and description, matching the Xt-EHR logical field model. No independent BodyStructure resource is required. Clinical coding and dental workflow rules apply separately.",
        "comment": "Each bodySite contains one shared complex body-structure extension. Its location and repeated locationQualifier fields keep each tooth with its surfaces; laterality, morphology and description are additional fields where applicable. This is an inline value, not a BodyStructure resource. Dental rules and equivalence with SCTextended require the shared terminology/template contract; FHIR shape validation alone does not prove anatomical equivalence. See DentalBodySite-use.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-DentalBodySite-no"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.outcome",
        "path": "Procedure.outcome",
        "short": "Not used in the current DigiDOT procedure draft",
        "definition": "The current DigiDOT procedure draft does not define an agreed terminology binding for a separate procedure outcome. Procedure.status remains the lifecycle state. Clinically significant findings or results are recorded as Condition, Observation or a referenced report.",
        "comment": "This element is closed to avoid an ungoverned result code that overlaps with status, findings and reports.",
        "max": "0"
      },
      {
        "id": "Procedure.report",
        "path": "Procedure.report",
        "short": "Document reporting the result of this procedure",
        "definition": "Reference a no-basis DocumentReference for a report produced from this procedure, such as a treatment report supplied as PDF. This field is not a general attachment list and is not used for the original referral or an unrelated source image. Patient-specific reports must concern the same patient. Store the file and its metadata once and reuse the DocumentReference.",
        "max": "*",
        "min": 0,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-DocumentReference"
            ]
          }
        ],
        "constraint": [
          {
            "key": "procedure-report-literal",
            "severity": "error",
            "human": "A shared-resource reference must contain a literal reference value; identifiers and contained references are not permitted.",
            "expression": "($this is Reference) implies (reference.hasValue() and identifier.empty() and reference.startsWith('#').not())",
            "source": "https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no"
          }
        ],
        "comment": "Use a literal reference to a separately stored permitted resource. The receiving service must check target existence, profile conformance and patient consistency. File access is through the document API, not a database table identifier."
      },
      {
        "id": "Procedure.report.reference",
        "path": "Procedure.report.reference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Procedure.report.identifier",
        "path": "Procedure.report.identifier",
        "max": "0"
      },
      {
        "id": "Procedure.complication",
        "path": "Procedure.complication",
        "short": "Not used in the current DigiDOT procedure draft",
        "definition": "The current DigiDOT procedure draft does not define an agreed terminology binding for a separate coded complication. A clinically significant complication is recorded once as a Condition and linked through complicationDetail.",
        "comment": "This element is closed. Do not record the same complication both as a code here and as a Condition.",
        "max": "0"
      },
      {
        "id": "Procedure.complicationDetail",
        "path": "Procedure.complicationDetail",
        "short": "Condition representing a procedure complication",
        "definition": "Use complicationDetail only when a DigiDOT Condition represents a clinically significant complication caused by the procedure and the source establishes that relationship. It must not reference the original condition that justified the procedure.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Condition-no"
            ]
          }
        ]
      },
      {
        "id": "Procedure.followUp",
        "path": "Procedure.followUp",
        "short": "Not used in the current DigiDOT procedure draft",
        "definition": "The current DigiDOT procedure draft does not define an agreed terminology binding for coded follow-up instructions. A planned dental service is represented by ServiceRequest and, when booked, Appointment. Procedure.note may carry limited procedure narrative but must not replace a planned service or contact.",
        "comment": "This element is closed. A planned follow-up must have its own workflow resource.",
        "max": "0"
      },
      {
        "id": "Procedure.note",
        "path": "Procedure.note",
        "short": "Additional procedure narrative",
        "definition": "Use note for clinically relevant additional information that is not represented in the structured Procedure elements. This may include product or material details such as product name, manufacturer or batch number when relevant and available. Keep the clinical action and anatomy in the structured fields and avoid duplicating information already recorded in linked resources."
      },
      {
        "id": "Procedure.note.author[x]",
        "path": "Procedure.note.author[x]",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner",
              "http://hl7.no/fhir/StructureDefinition/no-basis-Patient",
              "http://hl7.no/fhir/StructureDefinition/no-basis-RelatedPerson",
              "http://hl7.no/fhir/StructureDefinition/no-basis-Organization"
            ]
          },
          {
            "code": "string"
          }
        ],
        "definition": "The individual responsible for making the annotation.",
        "comment": "Use a literal Reference.reference to a separately stored resource conforming to the permitted national target profile. Identifier-only and contained references are not permitted. Official identifiers belong on the target resource. Reuse a confirmed resource in central storage; if no matching resource exists, register it before persisting the clinical reference. The receiving service must check target existence and profile conformance; the profile alone does not perform identity matching or prove that a resource exists in central storage. An authorString may be retained where this Annotation choice permits it; if authorReference is used, the literal-reference rule applies.",
        "constraint": [
          {
            "key": "procedure-note-author-x-literal",
            "severity": "error",
            "human": "A shared-resource reference must contain a literal reference value; identifiers and contained references are not permitted.",
            "expression": "($this is Reference) implies (reference.hasValue() and identifier.empty() and reference.startsWith('#').not())",
            "source": "https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no"
          }
        ]
      },
      {
        "id": "Procedure.focalDevice",
        "path": "Procedure.focalDevice",
        "short": "Device implanted, removed or actively manipulated by the procedure",
        "definition": "Optionally identify a concrete device implanted, removed or actively manipulated as a focal part of the procedure, when its identity is relevant. General product or material details can be recorded in Procedure.note. Do not use focalDevice for consumable materials."
      },
      {
        "id": "Procedure.focalDevice.extension",
        "path": "Procedure.focalDevice.extension",
        "short": "No extensions on focal device context",
        "definition": "The focal device is identified through focalDevice.manipulated. Extensions on the focalDevice backbone element are not used in the current DigiDOT procedure draft.",
        "max": "0"
      },
      {
        "id": "Procedure.focalDevice.modifierExtension",
        "path": "Procedure.focalDevice.modifierExtension",
        "short": "No modifier extensions on focal device context",
        "definition": "Modifier extensions on the focalDevice backbone element are not used in the current DigiDOT procedure draft.",
        "max": "0"
      },
      {
        "id": "Procedure.focalDevice.action",
        "path": "Procedure.focalDevice.action",
        "short": "Not used in the current DigiDOT procedure draft",
        "definition": "The clinical action on a focal device is represented by the extended coding in Procedure.code. focalDevice.manipulated identifies the patient-specific device instance. This avoids a second, potentially conflicting action representation.",
        "max": "0"
      },
      {
        "id": "Procedure.focalDevice.manipulated",
        "path": "Procedure.focalDevice.manipulated",
        "short": "Device implanted, removed or manipulated",
        "definition": "Reference the Device resource that was implanted, removed or manipulated. The device must represent the focal device affected by this procedure, not a consumable material used during it.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Device-no"
            ]
          }
        ]
      },
      {
        "id": "Procedure.usedReference",
        "path": "Procedure.usedReference",
        "short": "Optional concrete device used during the procedure",
        "definition": "Reference an identifiable DigiDOT Device that was used during the procedure only when the source records it and the device identity is clinically or traceability relevant. Do not use this element for generic equipment categories, consumable materials, medication products, or to repeat a device type already represented in Procedure.code or SCTextended. Use focalDevice.manipulated instead when the procedure implants, removes or otherwise manipulates the Device itself.",
        "comment": "This optional element records a separate Device instance, not the semantic procedure meaning. The source need not create a Device resource when no relevant device instance is recorded.",
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Device-no"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Procedure.usedCode",
        "path": "Procedure.usedCode",
        "short": "Not used in the current DigiDOT procedure draft",
        "definition": "The current DigiDOT procedure draft has no agreed material terminology or mapping rule for a separate coded used-item field. A future traceability model may define an appropriate representation.",
        "comment": "Use Procedure.note for general product or material details. Where a concrete device needs to be identified, use focalDevice.manipulated for a device acted on, or usedReference for a device used during the procedure.",
        "min": 0,
        "max": "0"
      }
    ]
  }
}