<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="digidot-Procedure-no" />
  <url value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no" />
  <version value="0.6.13" />
  <name value="DigidotProcedureNo" />
  <title value="DigiDot Procedure (NO)" />
  <status value="draft" />
  <date value="2026-10-27" />
  <publisher value="Novari AS - DigiDOT" />
  <description value="Readiness: [In review](https://simplifier.net/guide/Visual-overview/Home/Review-status-and-releases.page.md?version=current#readiness-procedure).&#xA;&#xA;Profile base: FHIR R4 Procedure (http://hl7.org/fhir/StructureDefinition/Procedure).&#xA;&#xA;Represents 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 value="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 value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Procedure" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Procedure" />
  <derivation value="constraint" />
  <differential>
    <element id="Procedure">
      <path value="Procedure" />
      <short value="Clinically performed, attempted or stopped dental procedure" />
      <constraint>
        <key value="proc-category-recommended" />
        <severity value="warning" />
        <human value="DigiDOT clinical dental procedures should include Procedure.category coding dental-procedure from the DigiDOT procedure category code system." />
        <expression value="category.coding.where(system = 'https://novari.no/fhir/digidot/CodeSystem/digidot-procedure-category' and code = 'dental-procedure').exists()" />
      </constraint>
      <constraint>
        <key value="procedure-anatomy-same-release" />
        <severity value="error" />
        <human value="When bodySite is populated, clinical SNOMED CT codings use the pinned Norwegian draft release 20260715. Anatomical Coding.version equality is checked separately." />
        <expression value="bodySite.empty() or code.coding.where(system = 'http://snomed.info/sct').all(version = 'http://snomed.info/sct/51000202101/version/20260715')" />
      </constraint>
      <constraint>
        <key value="digidot-status-known" />
        <severity value="error" />
        <human value="Do not use unknown as a default or an unmapped lifecycle status." />
        <expression value="status != 'unknown'" />
      </constraint>
      <constraint>
        <key value="procedure-anatomy-version-match" />
        <severity value="error" />
        <human value="Every SNOMED CT anatomical coding in the inline body-structure extension must state the same edition release as SCTextended." />
        <expression value="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 value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no" />
      </constraint>
    </element>
    <element id="Procedure.implicitRules">
      <path value="Procedure.implicitRules" />
      <short value="Not used in the current DigiDOT procedure draft" />
      <definition value="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 value="0" />
    </element>
    <element id="Procedure.contained">
      <path value="Procedure.contained" />
      <short value="Not used in the current DigiDOT procedure draft" />
      <definition value="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 value="0" />
    </element>
    <element id="Procedure.extension">
      <path value="Procedure.extension" />
      <short value="No root extensions" />
      <definition value="DigiDOT does not use root extensions on Procedure. Structured anatomy is represented where implementers expect it, inside Procedure.bodySite." />
      <max value="0" />
    </element>
    <element id="Procedure.modifierExtension">
      <path value="Procedure.modifierExtension" />
      <short value="Not used in the current DigiDOT procedure draft" />
      <definition value="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 value="0" />
    </element>
    <element id="Procedure.identifier">
      <path value="Procedure.identifier" />
      <short value="Stable source business identifiers when available" />
      <definition value="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." />
      <comment value="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." />
      <min value="0" />
      <max value="*" />
      <mustSupport value="true" />
    </element>
    <element id="Procedure.identifier.system">
      <path value="Procedure.identifier.system" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Procedure.identifier.value">
      <path value="Procedure.identifier.value" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Procedure.instantiatesCanonical">
      <path value="Procedure.instantiatesCanonical" />
      <short value="Not used in the current DigiDOT procedure scope" />
      <definition value="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 value="0" />
    </element>
    <element id="Procedure.instantiatesUri">
      <path value="Procedure.instantiatesUri" />
      <short value="Not used in the current DigiDOT procedure scope" />
      <definition value="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 value="0" />
    </element>
    <element id="Procedure.basedOn">
      <path value="Procedure.basedOn" />
      <short value="Planned/requested procedure that this performed procedure is based on." />
      <definition value="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 value="Reference" />
        <targetProfile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-ServiceRequest-no" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Procedure.partOf">
      <path value="Procedure.partOf" />
      <short value="Procedure or medication administration that this action is part of" />
      <definition value="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." />
      <comment value="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." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no" />
        <targetProfile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-MedicationAdministration-no" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Procedure.status">
      <path value="Procedure.status" />
      <short value="Lifecycle status for this concrete procedure occurrence." />
      <definition value="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 value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Procedure.statusReason">
      <path value="Procedure.statusReason" />
      <short value="Not used in the current DigiDOT procedure draft" />
      <definition value="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 value="This element is closed to avoid an unbound status-reason code or free-text value that duplicates clinical and workflow context." />
      <max value="0" />
    </element>
    <element id="Procedure.category">
      <path value="Procedure.category" />
      <short value="Optional interoperable category marker for a DigiDOT dental procedure." />
      <definition value="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 value="0" />
      <max value="1" />
      <binding>
        <strength value="required" />
        <description value="When Procedure.category is included, it shall contain exactly one canonical DigiDOT dental-procedure coding. It is not the clinical procedure terminology." />
        <valueSet value="https://novari.no/fhir/digidot/ValueSet/digidot-procedure-category" />
      </binding>
    </element>
    <element id="Procedure.category.extension">
      <path value="Procedure.category.extension" />
      <max value="0" />
    </element>
    <element id="Procedure.category.coding">
      <path value="Procedure.category.coding" />
      <short value="Canonical DigiDOT dental procedure category coding when category is present" />
      <definition value="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 value="1" />
      <max value="1" />
      <patternCoding>
        <system value="https://novari.no/fhir/digidot/CodeSystem/digidot-procedure-category" />
        <code value="dental-procedure" />
      </patternCoding>
    </element>
    <element id="Procedure.category.coding.extension">
      <path value="Procedure.category.coding.extension" />
      <definition value="The category coding is a simple interoperable dental-procedure marker. No coding extension is permitted; clinical procedure meaning belongs in Procedure.code." />
      <min value="0" />
      <max value="0" />
    </element>
    <element id="Procedure.code">
      <path value="Procedure.code" />
      <short value="Clinical dental procedure" />
      <definition value="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 value="1" />
      <max value="1" />
      <constraint>
        <key value="digidot-coding-same-release" />
        <severity value="error" />
        <human value="When SCTpre is present, both clinical codings must use the same SNOMED CT edition release." />
        <expression value="coding.where(id = 'SCTpre').empty() or coding.where(id = 'SCTpre').version = coding.where(id = 'SCTextended').version" />
      </constraint>
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <description value="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 value="https://novari.no/fhir/digidot/ValueSet/snomed-procedures" />
      </binding>
    </element>
    <element id="Procedure.code.extension">
      <path value="Procedure.code.extension" />
      <short value="No extensions on the clinical procedure code" />
      <definition value="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 value="0" />
    </element>
    <element id="Procedure.code.coding">
      <path value="Procedure.code.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="id" />
        </discriminator>
        <rules value="closed" />
      </slicing>
      <short value="One required extended coding and one optional precoordinated coding" />
      <definition value="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 value="1" />
      <max value="2" />
    </element>
    <element id="Procedure.code.coding:SCTpre">
      <path value="Procedure.code.coding" />
      <sliceName value="SCTpre" />
      <short value="Optional precoordinated SNOMED CT concept" />
      <definition value="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 value="0" />
      <max value="1" />
      <type>
        <code value="Coding" />
        <profile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Coding-SCTpre-no" />
      </type>
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="Required Procedure scope, restricted here to a single concept by the SCTpre datatype. Postcoordinated expressions are not permitted in this slice." />
        <valueSet value="http://hl7.org/fhir/ValueSet/procedure-code" />
      </binding>
    </element>
    <element id="Procedure.code.coding:SCTpre.id">
      <path value="Procedure.code.coding.id" />
      <short value="SCTpre slot identifier" />
      <definition value="Required technical slot identifier. It distinguishes the two roles even when their system, version and code are identical." />
      <min value="1" />
      <fixedString value="SCTpre" />
    </element>
    <element id="Procedure.code.coding:SCTextended">
      <path value="Procedure.code.coding" />
      <sliceName value="SCTextended" />
      <short value="Required extended SNOMED CT code: concept or expression" />
      <definition value="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 value="1" />
      <max value="1" />
      <type>
        <code value="Coding" />
        <profile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Coding-SCTpost-no" />
      </type>
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="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 value="http://hl7.org/fhir/ValueSet/procedure-code" />
      </binding>
    </element>
    <element id="Procedure.code.coding:SCTextended.id">
      <path value="Procedure.code.coding.id" />
      <short value="SCTextended slot identifier" />
      <definition value="Required technical slot identifier. It distinguishes the two roles even when their system, version and code are identical." />
      <min value="1" />
      <fixedString value="SCTextended" />
    </element>
    <element id="Procedure.subject">
      <path value="Procedure.subject" />
      <short value="Patient receiving the procedure" />
      <definition value="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." />
      <comment value="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." />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.no/fhir/StructureDefinition/no-basis-Patient" />
      </type>
      <constraint>
        <key value="procedure-subject-literal" />
        <severity value="error" />
        <human value="A shared-resource reference must contain a literal reference value; identifiers and contained references are not permitted." />
        <expression value="($this is Reference) implies (reference.hasValue() and identifier.empty() and reference.startsWith('#').not())" />
        <source value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no" />
      </constraint>
      <mustSupport value="true" />
    </element>
    <element id="Procedure.subject.reference">
      <path value="Procedure.subject.reference" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Procedure.subject.identifier">
      <path value="Procedure.subject.identifier" />
      <min value="0" />
      <max value="0" />
    </element>
    <element id="Procedure.encounter">
      <path value="Procedure.encounter" />
      <short value="Encounter where the procedure occurred" />
      <definition value="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 value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Encounter-no" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Procedure.performed[x]">
      <path value="Procedure.performed[x]" />
      <short value="Time or period of the procedure." />
      <definition value="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 value="0" />
      <mustSupport value="true" />
    </element>
    <element id="Procedure.recorder">
      <path value="Procedure.recorder" />
      <short value="Person responsible for recording the procedure statement" />
      <definition value="Individual who recorded the record and takes responsibility for its content." />
      <comment value="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." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner" />
      </type>
      <constraint>
        <key value="procedure-recorder-literal" />
        <severity value="error" />
        <human value="A shared-resource reference must contain a literal reference value; identifiers and contained references are not permitted." />
        <expression value="($this is Reference) implies (reference.hasValue() and identifier.empty() and reference.startsWith('#').not())" />
        <source value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no" />
      </constraint>
      <mustSupport value="true" />
    </element>
    <element id="Procedure.recorder.reference">
      <path value="Procedure.recorder.reference" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Procedure.recorder.identifier">
      <path value="Procedure.recorder.identifier" />
      <min value="0" />
      <max value="0" />
    </element>
    <element id="Procedure.asserter">
      <path value="Procedure.asserter" />
      <short value="Person asserting that the procedure occurred" />
      <definition value="Individual who is making the procedure statement." />
      <comment value="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." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.no/fhir/StructureDefinition/no-basis-Patient" />
        <targetProfile value="http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner" />
      </type>
      <constraint>
        <key value="procedure-asserter-literal" />
        <severity value="error" />
        <human value="A shared-resource reference must contain a literal reference value; identifiers and contained references are not permitted." />
        <expression value="($this is Reference) implies (reference.hasValue() and identifier.empty() and reference.startsWith('#').not())" />
        <source value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no" />
      </constraint>
    </element>
    <element id="Procedure.asserter.reference">
      <path value="Procedure.asserter.reference" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Procedure.asserter.identifier">
      <path value="Procedure.asserter.identifier" />
      <min value="0" />
      <max value="0" />
    </element>
    <element id="Procedure.performer">
      <path value="Procedure.performer" />
      <short value="Individual performing the procedure" />
      <definition value="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." />
    </element>
    <element id="Procedure.performer.extension">
      <path value="Procedure.performer.extension" />
      <max value="0" />
    </element>
    <element id="Procedure.performer.modifierExtension">
      <path value="Procedure.performer.modifierExtension" />
      <max value="0" />
    </element>
    <element id="Procedure.performer.function">
      <path value="Procedure.performer.function" />
      <short value="Not used in the current DigiDOT procedure draft" />
      <definition value="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 value="0" />
    </element>
    <element id="Procedure.performer.actor">
      <path value="Procedure.performer.actor" />
      <short value="Responsible individual performer" />
      <definition value="The practitioner who was involved in the procedure." />
      <comment value="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." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner" />
      </type>
      <constraint>
        <key value="procedure-performer-actor-literal" />
        <severity value="error" />
        <human value="A shared-resource reference must contain a literal reference value; identifiers and contained references are not permitted." />
        <expression value="($this is Reference) implies (reference.hasValue() and identifier.empty() and reference.startsWith('#').not())" />
        <source value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no" />
      </constraint>
      <mustSupport value="true" />
    </element>
    <element id="Procedure.performer.actor.reference">
      <path value="Procedure.performer.actor.reference" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Procedure.performer.actor.identifier">
      <path value="Procedure.performer.actor.identifier" />
      <min value="0" />
      <max value="0" />
    </element>
    <element id="Procedure.performer.onBehalfOf">
      <path value="Procedure.performer.onBehalfOf" />
      <short value="Not used in the current DigiDOT procedure draft" />
      <definition value="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 value="0" />
    </element>
    <element id="Procedure.location">
      <path value="Procedure.location" />
      <short value="Not used; location is recorded on Encounter" />
      <definition value="Procedure location is resolved through the required Procedure.encounter and Encounter.location. Procedure.location is prohibited to prevent duplicate or conflicting location data." />
      <max value="0" />
    </element>
    <element id="Procedure.reasonCode">
      <path value="Procedure.reasonCode" />
      <short value="Precoordinated clinical reason for the procedure" />
      <definition value="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 value="Do not duplicate the same reason in reasonCode and reasonReference unless the source explicitly carries both representations and their consistency can be maintained." />
      <min value="0" />
      <max value="*" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="https://novari.no/fhir/digidot/ValueSet/digidot-service-request-reasons" />
      </binding>
    </element>
    <element id="Procedure.reasonCode.extension">
      <path value="Procedure.reasonCode.extension" />
      <short value="Extensions are not used on a coded reason" />
      <max value="0" />
    </element>
    <element id="Procedure.reasonCode.coding">
      <path value="Procedure.reasonCode.coding" />
      <short value="One precoordinated SNOMED CT reason code" />
      <definition value="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 value="1" />
      <max value="1" />
      <type>
        <code value="Coding" />
        <profile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Coding-SCTpre-no" />
      </type>
    </element>
    <element id="Procedure.reasonCode.text">
      <path value="Procedure.reasonCode.text" />
      <short value="Supplementary display text for the coded reason" />
      <definition value="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." />
    </element>
    <element id="Procedure.reasonReference">
      <path value="Procedure.reasonReference" />
      <short value="Dental condition that clinically justified the procedure" />
      <definition value="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 value="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 value="Reference" />
        <targetProfile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Condition-no" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Procedure.bodySite">
      <path value="Procedure.bodySite" />
      <short value="Inline Xt-EHR anatomy group" />
      <definition value="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 value="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 value="0" />
      <max value="*" />
      <type>
        <code value="CodeableConcept" />
        <profile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-DentalBodySite-no" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Procedure.outcome">
      <path value="Procedure.outcome" />
      <short value="Not used in the current DigiDOT procedure draft" />
      <definition value="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 value="This element is closed to avoid an ungoverned result code that overlaps with status, findings and reports." />
      <max value="0" />
    </element>
    <element id="Procedure.report">
      <path value="Procedure.report" />
      <short value="Document reporting the result of this procedure" />
      <definition value="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." />
      <comment value="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." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.no/fhir/StructureDefinition/no-basis-DocumentReference" />
      </type>
      <constraint>
        <key value="procedure-report-literal" />
        <severity value="error" />
        <human value="A shared-resource reference must contain a literal reference value; identifiers and contained references are not permitted." />
        <expression value="($this is Reference) implies (reference.hasValue() and identifier.empty() and reference.startsWith('#').not())" />
        <source value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no" />
      </constraint>
    </element>
    <element id="Procedure.report.reference">
      <path value="Procedure.report.reference" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Procedure.report.identifier">
      <path value="Procedure.report.identifier" />
      <max value="0" />
    </element>
    <element id="Procedure.complication">
      <path value="Procedure.complication" />
      <short value="Not used in the current DigiDOT procedure draft" />
      <definition value="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 value="This element is closed. Do not record the same complication both as a code here and as a Condition." />
      <max value="0" />
    </element>
    <element id="Procedure.complicationDetail">
      <path value="Procedure.complicationDetail" />
      <short value="Condition representing a procedure complication" />
      <definition value="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 value="Reference" />
        <targetProfile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Condition-no" />
      </type>
    </element>
    <element id="Procedure.followUp">
      <path value="Procedure.followUp" />
      <short value="Not used in the current DigiDOT procedure draft" />
      <definition value="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 value="This element is closed. A planned follow-up must have its own workflow resource." />
      <max value="0" />
    </element>
    <element id="Procedure.note">
      <path value="Procedure.note" />
      <short value="Additional procedure narrative" />
      <definition value="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." />
    </element>
    <element id="Procedure.note.author[x]">
      <path value="Procedure.note.author[x]" />
      <definition value="The individual responsible for making the annotation." />
      <comment value="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." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner" />
        <targetProfile value="http://hl7.no/fhir/StructureDefinition/no-basis-Patient" />
        <targetProfile value="http://hl7.no/fhir/StructureDefinition/no-basis-RelatedPerson" />
        <targetProfile value="http://hl7.no/fhir/StructureDefinition/no-basis-Organization" />
      </type>
      <type>
        <code value="string" />
      </type>
      <constraint>
        <key value="procedure-note-author-x-literal" />
        <severity value="error" />
        <human value="A shared-resource reference must contain a literal reference value; identifiers and contained references are not permitted." />
        <expression value="($this is Reference) implies (reference.hasValue() and identifier.empty() and reference.startsWith('#').not())" />
        <source value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no" />
      </constraint>
    </element>
    <element id="Procedure.focalDevice">
      <path value="Procedure.focalDevice" />
      <short value="Device implanted, removed or actively manipulated by the procedure" />
      <definition value="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." />
    </element>
    <element id="Procedure.focalDevice.extension">
      <path value="Procedure.focalDevice.extension" />
      <short value="No extensions on focal device context" />
      <definition value="The focal device is identified through focalDevice.manipulated. Extensions on the focalDevice backbone element are not used in the current DigiDOT procedure draft." />
      <max value="0" />
    </element>
    <element id="Procedure.focalDevice.modifierExtension">
      <path value="Procedure.focalDevice.modifierExtension" />
      <short value="No modifier extensions on focal device context" />
      <definition value="Modifier extensions on the focalDevice backbone element are not used in the current DigiDOT procedure draft." />
      <max value="0" />
    </element>
    <element id="Procedure.focalDevice.action">
      <path value="Procedure.focalDevice.action" />
      <short value="Not used in the current DigiDOT procedure draft" />
      <definition value="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 value="0" />
    </element>
    <element id="Procedure.focalDevice.manipulated">
      <path value="Procedure.focalDevice.manipulated" />
      <short value="Device implanted, removed or manipulated" />
      <definition value="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 value="Reference" />
        <targetProfile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Device-no" />
      </type>
    </element>
    <element id="Procedure.usedReference">
      <path value="Procedure.usedReference" />
      <short value="Optional concrete device used during the procedure" />
      <definition value="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 value="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 value="*" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Device-no" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Procedure.usedCode">
      <path value="Procedure.usedCode" />
      <short value="Not used in the current DigiDOT procedure draft" />
      <definition value="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 value="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 value="0" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>