{
  "resourceType": "StructureDefinition",
  "id": "test-digidot-ServiceRequest-no",
  "url": "https://novari.no/fhir/digidot/StructureDefinition/test-digidot-ServiceRequest-no",
  "version": "0.1.4-test",
  "name": "TestDigidotServiceRequestNo",
  "title": "TEST DigiDot ServiceRequest (NO)",
  "status": "draft",
  "date": "2026-05-19",
  "publisher": "Novari AS - DigiDOT",
  "description": "TEST comparison draft. Not for production use. DigiDOT profile for planned, proposed or ordered dental services, including recall, treatment, diagnostic services and follow-up. Recall is represented in this same ServiceRequest profile with category = dental-recall, not with a separate recall profile. This is the planning/request layer that may later result in Appointment, Encounter and Procedure resources. Episode, patient safety, EHDS/Helse-NIM relevant context and selected external clinical context can be included with ServiceRequest.supportingInfo when the context directly affects the requested dental work.",
  "purpose": "Use this profile as the planning or request layer before dental activity is scheduled or performed. Use ServiceRequest.category to distinguish recall, treatment, diagnostic service and follow-up. For recall, set category = dental-recall and use occurrencePeriod or occurrenceTiming to express the due window or cadence; Appointment remains the scheduling resource for the actual proposed or booked time. Performed clinical work should link back to the request with Procedure.basedOn. Follow-up requests created during or after a contact should use ServiceRequest.encounter. Request-level episode context and selected decision context can be carried with ServiceRequest.supportingInfo, for example EpisodeOfCare, no-basis-AllergyIntolerance, relevant Condition, Flag, Consent, QuestionnaireResponse, SFM medication context, DeviceUseStatement, DocumentReference, DiagnosticReport, ImagingStudy or Composition. Do not copy a full patient history into every request.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "ServiceRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/ServiceRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "ServiceRequest",
        "path": "ServiceRequest",
        "definition": "DigiDOT planning/request layer for proposed or ordered dental services, including recall. Recall is represented by ServiceRequest.category = dental-recall; Appointment and Encounter represent later workflow states.",
        "constraint": [
          {
            "key": "digidot-sr-recall-occurrence",
            "severity": "error",
            "human": "A ServiceRequest with category dental-recall SHALL have occurrence[x] to express the recall due date, due window or cadence. The exact booked time belongs on Appointment.",
            "expression": "category.coding.where(system = 'https://novari.no/fhir/digidot/CodeSystem/test-digidot-service-request-category' and code = 'dental-recall').empty() or occurrence.exists()"
          },
          {
            "key": "digidot-sr-recall-plan",
            "severity": "warning",
            "human": "A ServiceRequest with category dental-recall SHOULD normally use intent = plan.",
            "expression": "category.coding.where(system = 'https://novari.no/fhir/digidot/CodeSystem/test-digidot-service-request-category' and code = 'dental-recall').empty() or intent = 'plan'"
          },
          {
            "key": "digidot-sr-recall-code",
            "severity": "warning",
            "human": "Until DigiDOT terminology work agrees a more precise recall concept, dental-recall ServiceRequests SHOULD include SNOMED CT 185349003 |Encounter for check up (procedure)|.",
            "expression": "category.coding.where(system = 'https://novari.no/fhir/digidot/CodeSystem/test-digidot-service-request-category' and code = 'dental-recall').empty() or code.coding.where(system = 'http://snomed.info/sct' and code = '185349003').exists()"
          }
        ]
      },
      {
        "id": "ServiceRequest.basedOn",
        "path": "ServiceRequest.basedOn",
        "short": "Higher-level plan or request that this plan is based on.",
        "definition": "Use ServiceRequest.basedOn only when this request fulfils or refines another plan/request. Do not use it to link performed procedures; performed procedures should point back with Procedure.basedOn.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://novari.no/fhir/digidot/StructureDefinition/test-digidot-ServiceRequest-no",
              "http://hl7.org/fhir/StructureDefinition/ServiceRequest"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.replaces",
        "path": "ServiceRequest.replaces",
        "short": "Previous plan/request that this plan replaces.",
        "definition": "Use ServiceRequest.replaces when the treatment plan changes because the clinical situation is different than first assumed, for example when a procedure becomes more complex and a revised plan is created. The old ServiceRequest should normally be completed or revoked according to local workflow.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://novari.no/fhir/digidot/StructureDefinition/test-digidot-ServiceRequest-no",
              "http://hl7.org/fhir/StructureDefinition/ServiceRequest"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.status",
        "path": "ServiceRequest.status",
        "short": "Status of the plan/request, not the status of a performed procedure.",
        "definition": "Use ServiceRequest.status for the lifecycle of the planned/requested dental service. Keep it active while the plan can still be fulfilled, use on-hold when the plan is paused, completed when the planned work is fulfilled or closed, and revoked when the plan is cancelled before fulfilment. Use Procedure.status for what actually happened clinically.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ServiceRequest.intent",
        "path": "ServiceRequest.intent",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ServiceRequest.code",
        "path": "ServiceRequest.code",
        "min": 1,
        "binding": {
          "strength": "extensible",
          "description": "Use a code from the DigiDOT dental procedure value set when it covers the requested service or planned procedure. The value set represents reportable/refset procedure values, including values relevant for KPR reporting. For clinical planning and storage, a broader SNOMED CT concept may be used when the refset does not cover the intended meaning. A postcoordinated SNOMED CT expression may be included as additional semantic precision.",
          "valueSet": "https://novari.no/fhir/digidot/ValueSet/dental-procedures"
        },
        "constraint": [
          {
            "key": "sr-sct-min1",
            "severity": "warning",
            "human": "At least one SNOMED CT code (pre- or postcoordinated) should be present.",
            "expression": "coding.where(system = 'http://snomed.info/sct').exists()"
          }
        ],
        "definition": "Use SNOMED CT to represent what is being requested or planned. For dental-recall, use 185349003 |Encounter for check up (procedure)| until DigiDOT terminology work agrees a more precise dental recall concept. For treatment and diagnostic services, use a precoordinated SNOMED CT concept from the DigiDOT dental procedure value set when it covers the intended request, and optionally add a postcoordinated expression for dental precision."
      },
      {
        "id": "ServiceRequest.code.coding",
        "path": "ServiceRequest.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "profile",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "max": "2"
      },
      {
        "id": "ServiceRequest.code.coding:SCTpre",
        "path": "ServiceRequest.code.coding",
        "sliceName": "SCTpre",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding",
            "profile": [
              "https://novari.no/fhir/digidot/StructureDefinition/test-digidot-Coding-SCTpre-no"
            ]
          }
        ],
        "binding": {
          "strength": "extensible",
          "description": "For planned dental services, use a precoordinated SNOMED CT concept from the DigiDOT dental procedure refset when it covers the intended request. Broader SNOMED CT concepts are allowed for clinical planning when the refset does not cover the meaning. Stricter KPR/reporting validation should be handled by a reporting-specific profile or extraction rule.",
          "valueSet": "https://novari.no/fhir/digidot/ValueSet/dental-procedures"
        }
      },
      {
        "id": "ServiceRequest.code.coding:SCTpost",
        "path": "ServiceRequest.code.coding",
        "sliceName": "SCTpost",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Coding",
            "profile": [
              "https://novari.no/fhir/digidot/StructureDefinition/test-digidot-Coding-SCTpost-no"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.subject",
        "path": "ServiceRequest.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Patient",
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.encounter",
        "path": "ServiceRequest.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://novari.no/fhir/digidot/StructureDefinition/test-digidot-Encounter-no",
              "http://hl7.org/fhir/StructureDefinition/Encounter"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.supportingInfo",
        "path": "ServiceRequest.supportingInfo",
        "short": "Episode, patient safety or other supporting context for the dental request.",
        "definition": "Use ServiceRequest.supportingInfo to reference the relevant DigiDOT EpisodeOfCare when the request should explicitly carry episode or course-of-care context. It may also reference selected patient safety, EHDS/Helse-NIM or clinical decision context that directly affects the requested dental work, such as no-basis-AllergyIntolerance, a relevant Condition, a Flag, Consent, QuestionnaireResponse, SFM medication context, DeviceUseStatement, DocumentReference, DiagnosticReport, ImagingStudy or Composition. For follow-up requests created during or after a visit, also populate ServiceRequest.encounter; the episode can then be resolved through Encounter.episodeOfCare. Do not copy the full patient history into every request; include only context that affects this request.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://novari.no/fhir/digidot/StructureDefinition/test-digidot-EpisodeOfCare-no",
              "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare",
              "http://hl7.no/fhir/StructureDefinition/no-basis-AllergyIntolerance",
              "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance",
              "https://novari.no/fhir/digidot/StructureDefinition/test-digidot-Condition-no",
              "http://hl7.org/fhir/StructureDefinition/Condition",
              "https://novari.no/fhir/digidot/StructureDefinition/test-digidot-Observation-no",
              "http://hl7.org/fhir/StructureDefinition/Observation",
              "http://hl7.org/fhir/StructureDefinition/Flag",
              "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse",
              "http://ehelse.no/fhir/StructureDefinition/sfm-lib-List",
              "http://hl7.org/fhir/StructureDefinition/List",
              "http://ehelse.no/fhir/StructureDefinition/sfm-MedicationStatement",
              "http://hl7.org/fhir/StructureDefinition/MedicationStatement",
              "http://hl7.org/fhir/StructureDefinition/DeviceUseStatement",
              "http://hl7.org/fhir/StructureDefinition/Consent",
              "http://hl7.org/fhir/StructureDefinition/DocumentReference",
              "http://hl7.org/fhir/StructureDefinition/DiagnosticReport",
              "http://hl7.org/fhir/StructureDefinition/ImagingStudy",
              "http://hl7.org/fhir/StructureDefinition/Composition"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.occurrence[x]",
        "path": "ServiceRequest.occurrence[x]",
        "short": "Requested timing, due window or cadence for the planned service.",
        "definition": "Use occurrenceDateTime, occurrencePeriod or occurrenceTiming when the planned work has a known or expected time window. For dental-recall, occurrence[x] is mandatory and represents the recall due date, due window or cadence; Appointment remains the scheduling resource for the actual proposed or booked time.",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.requester",
        "path": "ServiceRequest.requester",
        "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.no/fhir/StructureDefinition/no-basis-RelatedPerson",
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.performer",
        "path": "ServiceRequest.performer",
        "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-HealthcareService",
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://hl7.org/fhir/StructureDefinition/HealthcareService"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.locationReference",
        "path": "ServiceRequest.locationReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Location",
              "http://hl7.org/fhir/StructureDefinition/Location"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.reasonReference",
        "path": "ServiceRequest.reasonReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://novari.no/fhir/digidot/StructureDefinition/test-digidot-Condition-no",
              "https://novari.no/fhir/digidot/StructureDefinition/test-digidot-Observation-no",
              "http://hl7.org/fhir/StructureDefinition/Condition",
              "http://hl7.org/fhir/StructureDefinition/Observation"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.bodySite",
        "path": "ServiceRequest.bodySite",
        "min": 0,
        "max": "*",
        "constraint": [
          {
            "key": "single-tooth-required-if-surface",
            "severity": "error",
            "human": "If tooth surfaces are provided, exactly one tooth must also be provided in the same bodySite.",
            "expression": "coding.where(memberOf('https://novari.no/fhir/digidot/ValueSet/tooth-surfaces')).empty() or coding.where(memberOf('https://novari.no/fhir/digidot/ValueSet/teeth')).count() = 1"
          }
        ],
        "short": "Tooth, surface or other dental body site",
        "definition": "Use bodySite to identify the relevant tooth or teeth and, when needed, tooth surface. Tooth and surface are represented as named slices on bodySite.coding, with required bindings to the DigiDOT teeth and tooth-surfaces ValueSets. If a surface coding is present, exactly one tooth coding must also be present in the same bodySite.",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.bodySite.coding",
        "path": "ServiceRequest.bodySite.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 0,
        "max": "*",
        "short": "Tooth and surface codings",
        "definition": "Open slicing of bodySite.coding. The named tooth and surface slices are identified by required ValueSet bindings, not by separate Coding profiles."
      },
      {
        "id": "ServiceRequest.bodySite.coding:tooth",
        "path": "ServiceRequest.bodySite.coding",
        "sliceName": "tooth",
        "min": 0,
        "max": "*",
        "short": "Tooth",
        "definition": "One or more relevant teeth, coded with SNOMED CT and constrained by the DigiDOT teeth ValueSet.",
        "binding": {
          "strength": "required",
          "valueSet": "https://novari.no/fhir/digidot/ValueSet/teeth"
        }
      },
      {
        "id": "ServiceRequest.bodySite.coding:tooth.system",
        "path": "ServiceRequest.bodySite.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "ServiceRequest.bodySite.coding:tooth.code",
        "path": "ServiceRequest.bodySite.coding.code",
        "min": 1
      },
      {
        "id": "ServiceRequest.bodySite.coding:surface",
        "path": "ServiceRequest.bodySite.coding",
        "sliceName": "surface",
        "min": 0,
        "max": "*",
        "short": "Tooth surface",
        "definition": "One or more relevant tooth surfaces, coded with SNOMED CT and constrained by the DigiDOT tooth-surfaces ValueSet. A surface coding requires exactly one tooth coding on the same bodySite.",
        "binding": {
          "strength": "required",
          "valueSet": "https://novari.no/fhir/digidot/ValueSet/tooth-surfaces"
        }
      },
      {
        "id": "ServiceRequest.bodySite.coding:surface.system",
        "path": "ServiceRequest.bodySite.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "ServiceRequest.bodySite.coding:surface.code",
        "path": "ServiceRequest.bodySite.coding.code",
        "min": 1
      },
      {
        "id": "ServiceRequest.category",
        "path": "ServiceRequest.category",
        "mustSupport": true,
        "short": "Request category: recall, treatment, diagnostic service or follow-up.",
        "min": 1,
        "max": "1",
        "definition": "Use category as the coarse DigiDOT workflow marker. Use dental-recall for recall need/next due window, dental-treatment for planned treatment, dental-diagnostic for diagnostic services such as imaging, and dental-follow-up for control/follow-up after a finding or treatment.",
        "binding": {
          "strength": "required",
          "valueSet": "https://novari.no/fhir/digidot/ValueSet/test-digidot-service-request-category"
        }
      },
      {
        "id": "ServiceRequest.authoredOn",
        "path": "ServiceRequest.authoredOn",
        "short": "When the request was authored"
      }
    ]
  }
}