{
  "resourceType": "StructureDefinition",
  "id": "digidot-ChargeItem-no",
  "url": "https://novari.no/fhir/digidot/StructureDefinition/digidot-ChargeItem-no",
  "version": "0.1.3",
  "name": "DigidotChargeItemNo",
  "title": "DigiDot ChargeItem (NO)",
  "status": "draft",
  "date": "2026-09-29",
  "publisher": "Novari AS - DigiDOT",
  "description": "Readiness: [Experimental](https://simplifier.net/guide/Visual-overview/Home/Review-status-and-releases.page.md?version=current#readiness-chargeitem).\n\nProfile base: FHIR R4 ChargeItem (http://hl7.org/fhir/StructureDefinition/ChargeItem).\n\nTEST comparison draft. Not for production use. DigiDOT profile for dental fee, tariff and charge lines. Economic coding is kept separate from clinical Procedure.code.",
  "purpose": "Use this profile to represent dental fee, tariff or charge lines separately from clinical Procedure coding. This is test material for comparison and must not be treated as final settlement conformance.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "ChargeItem",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/ChargeItem",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "ChargeItem",
        "path": "ChargeItem",
        "constraint": [
          {
            "key": "digidot-status-known",
            "severity": "error",
            "human": "Do not use unknown as a default or an unmapped lifecycle status.",
            "expression": "status != 'unknown'"
          }
        ]
      },
      {
        "id": "ChargeItem.status",
        "path": "ChargeItem.status",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ChargeItem.code",
        "path": "ChargeItem.code",
        "min": 1,
        "short": "Fee, charge or other financial code.",
        "definition": "Economic code for billing, reimbursement or tariff handling. This is deliberately separate from Procedure.code, which carries the clinical SNOMED CT procedure meaning.",
        "binding": {
          "strength": "preferred",
          "description": "Use an agreed tariff, fee or honorarium code when available. The test value set is only a placeholder until Norwegian tariff and settlement coding has been agreed.",
          "valueSet": "https://novari.no/fhir/digidot/ValueSet/digidot-tariff-code"
        }
      },
      {
        "id": "ChargeItem.subject",
        "path": "ChargeItem.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Patient"
            ]
          }
        ],
        "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": "chargeitem-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-ChargeItem-no"
          }
        ]
      },
      {
        "id": "ChargeItem.subject.reference",
        "path": "ChargeItem.subject.reference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ChargeItem.subject.identifier",
        "path": "ChargeItem.subject.identifier",
        "min": 0,
        "max": "0"
      },
      {
        "id": "ChargeItem.context",
        "path": "ChargeItem.context",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Encounter-no",
              "http://hl7.org/fhir/StructureDefinition/Encounter",
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-EpisodeOfCare-no",
              "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
            ]
          }
        ]
      },
      {
        "id": "ChargeItem.occurrence[x]",
        "path": "ChargeItem.occurrence[x]",
        "min": 0
      },
      {
        "id": "ChargeItem.performer.actor",
        "path": "ChargeItem.performer.actor",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner",
              "http://hl7.no/fhir/StructureDefinition/no-basis-PractitionerRole",
              "http://hl7.no/fhir/StructureDefinition/no-basis-Organization"
            ]
          }
        ],
        "definition": "The device, practitioner, etc. who performed or participated in the service.",
        "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": "chargeitem-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-ChargeItem-no"
          }
        ]
      },
      {
        "id": "ChargeItem.performer.actor.reference",
        "path": "ChargeItem.performer.actor.reference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ChargeItem.performer.actor.identifier",
        "path": "ChargeItem.performer.actor.identifier",
        "min": 0,
        "max": "0"
      },
      {
        "id": "ChargeItem.performingOrganization",
        "path": "ChargeItem.performingOrganization",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Organization"
            ]
          }
        ],
        "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": "chargeitem-performingorganization-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-ChargeItem-no"
          }
        ]
      },
      {
        "id": "ChargeItem.performingOrganization.reference",
        "path": "ChargeItem.performingOrganization.reference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ChargeItem.performingOrganization.identifier",
        "path": "ChargeItem.performingOrganization.identifier",
        "min": 0,
        "max": "0"
      },
      {
        "id": "ChargeItem.requestingOrganization",
        "path": "ChargeItem.requestingOrganization",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Organization"
            ]
          }
        ],
        "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": "chargeitem-requestingorganization-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-ChargeItem-no"
          }
        ]
      },
      {
        "id": "ChargeItem.requestingOrganization.reference",
        "path": "ChargeItem.requestingOrganization.reference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ChargeItem.requestingOrganization.identifier",
        "path": "ChargeItem.requestingOrganization.identifier",
        "min": 0,
        "max": "0"
      },
      {
        "id": "ChargeItem.costCenter",
        "path": "ChargeItem.costCenter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Organization"
            ]
          }
        ],
        "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": "chargeitem-costcenter-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-ChargeItem-no"
          }
        ]
      },
      {
        "id": "ChargeItem.costCenter.reference",
        "path": "ChargeItem.costCenter.reference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ChargeItem.costCenter.identifier",
        "path": "ChargeItem.costCenter.identifier",
        "min": 0,
        "max": "0"
      },
      {
        "id": "ChargeItem.quantity",
        "path": "ChargeItem.quantity",
        "min": 0
      },
      {
        "id": "ChargeItem.factorOverride",
        "path": "ChargeItem.factorOverride",
        "min": 0
      },
      {
        "id": "ChargeItem.priceOverride",
        "path": "ChargeItem.priceOverride",
        "min": 0
      },
      {
        "id": "ChargeItem.enterer",
        "path": "ChargeItem.enterer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner",
              "http://hl7.no/fhir/StructureDefinition/no-basis-PractitionerRole",
              "http://hl7.no/fhir/StructureDefinition/no-basis-Organization",
              "http://hl7.no/fhir/StructureDefinition/no-basis-Patient",
              "http://hl7.org/fhir/StructureDefinition/Device",
              "http://hl7.no/fhir/StructureDefinition/no-basis-RelatedPerson"
            ]
          }
        ],
        "definition": "The device, practitioner, etc. who entered the charge item.",
        "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": "chargeitem-enterer-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-ChargeItem-no"
          }
        ]
      },
      {
        "id": "ChargeItem.enterer.reference",
        "path": "ChargeItem.enterer.reference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ChargeItem.enterer.identifier",
        "path": "ChargeItem.enterer.identifier",
        "min": 0,
        "max": "0"
      },
      {
        "id": "ChargeItem.service",
        "path": "ChargeItem.service",
        "short": "Clinical service that the financial line applies to.",
        "definition": "Reference to the clinical Procedure or Observation that the charge line is derived from when such a link is available. Some administrative or aggregate charge lines may not map one-to-one to a clinical resource.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Procedure-no",
              "https://novari.no/fhir/digidot/StructureDefinition/digidot-Observation-no",
              "http://hl7.no/fhir/StructureDefinition/no-basis-Procedure",
              "http://hl7.org/fhir/StructureDefinition/Procedure",
              "http://hl7.org/fhir/StructureDefinition/Observation"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ChargeItem.note.author[x]",
        "path": "ChargeItem.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": "chargeitem-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-ChargeItem-no"
          }
        ]
      }
    ]
  }
}