{
  "resourceType": "StructureDefinition",
  "id": "test-digidot-EpisodeOfCare-no",
  "url": "http://novari.no/fhir/digidot/StructureDefinition/test-digidot-EpisodeOfCare-no",
  "version": "0.1.0-test",
  "name": "TestDigidotEpisodeOfCareNo",
  "title": "TEST DigiDOT EpisodeOfCare (NO)",
  "status": "draft",
  "date": "2026-05-22",
  "publisher": "Novari AS - DigiDOT",
  "description": "TEST comparison draft. Not for production use. DigiDOT profile for a dental episode or case that groups related encounters, requests and performed procedures over time.",
  "purpose": "Use this profile as a lightweight episode or case frame that groups related contacts over time. Episode context should normally be reached through Encounter.episodeOfCare rather than a custom Procedure extension.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "EpisodeOfCare",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "EpisodeOfCare",
        "path": "EpisodeOfCare",
        "short": "Dental episode or case frame"
      },
      {
        "id": "EpisodeOfCare.identifier",
        "path": "EpisodeOfCare.identifier",
        "short": "Business identifier for the dental episode",
        "definition": "A stable identifier for the episode or case. This is expected to be assigned by the source system or DigiDOT integration layer.",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "max": "1"
      },
      {
        "id": "EpisodeOfCare.identifier:episode",
        "path": "EpisodeOfCare.identifier",
        "sliceName": "episode",
        "short": "DigiDOT dental episode identifier",
        "min": 1,
        "max": "1"
      },
      {
        "id": "EpisodeOfCare.identifier:episode.system",
        "path": "EpisodeOfCare.identifier.system",
        "min": 1,
        "patternUri": "urn:novari:episode"
      },
      {
        "id": "EpisodeOfCare.status",
        "path": "EpisodeOfCare.status",
        "short": "Episode lifecycle status",
        "definition": "Use EpisodeOfCare.status for the lifecycle of the episode or case. Do not use this status to describe whether an individual procedure has been completed; use Procedure.status for performed procedure occurrences.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "EpisodeOfCare.type",
        "path": "EpisodeOfCare.type",
        "short": "Type of dental episode",
        "definition": "The type of episode or case, for example examination, treatment episode, orthodontic episode or follow-up. The exact value set should be clarified with counties and EHR suppliers before production use.",
        "min": 0,
        "max": "1"
      },
      {
        "id": "EpisodeOfCare.patient",
        "path": "EpisodeOfCare.patient",
        "short": "Patient who is the subject of the episode",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Patient",
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ]
      },
      {
        "id": "EpisodeOfCare.managingOrganization",
        "path": "EpisodeOfCare.managingOrganization",
        "short": "Organization responsible for managing the episode",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Organization",
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ]
      },
      {
        "id": "EpisodeOfCare.period",
        "path": "EpisodeOfCare.period",
        "short": "Episode start and end period",
        "definition": "Recommended when the episode has a known start or end date. Use Encounter.period for contact timing and Procedure.performed[x] for performed procedure timing."
      },
      {
        "id": "EpisodeOfCare.careManager",
        "path": "EpisodeOfCare.careManager",
        "short": "Responsible clinician or role",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-PractitionerRole",
              "http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ]
          }
        ]
      }
    ]
  }
}