{
  "resourceType": "Bundle",
  "id": "example-digidot-referral-and-disclosure",
  "type": "collection",
  "entry": [
    {
      "fullUrl": "https://example.org/fhir/Patient/planning-patient",
      "resource": {
        "resourceType": "Patient",
        "id": "planning-patient",
        "meta": {
          "profile": [
            "https://novari.no/fhir/digidot/StructureDefinition/digidot-Patient-no|0.2.3"
          ]
        },
        "identifier": [
          {
            "system": "urn:oid:2.16.578.1.12.4.1.4.1",
            "value": "09661078143"
          },
          {
            "system": "urn:digidot:example:planning:patient",
            "value": "planning-patient"
          }
        ],
        "name": [
          {
            "given": [
              "Jonas"
            ],
            "family": "Moen"
          }
        ],
        "active": true,
        "birthDate": "2010-01-09",
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Jonas Moen, born 9 January 2010. Synthetic test patient from NHN SyntPop, supplied for this example.</p><p>Fictional health-group assignment A2, included to illustrate the DigiDOT Patient profile.</p></div>"
        },
        "extension": [
          {
            "url": "https://novari.no/fhir/digidot/StructureDefinition/digidot-PatientHealthGroup-no",
            "extension": [
              {
                "url": "group",
                "valueCodeableConcept": {
                  "coding": [
                    {
                      "system": "https://novari.no/fhir/digidot/CodeSystem/digidot-helsegruppe",
                      "code": "A2"
                    }
                  ]
                }
              },
              {
                "url": "period",
                "valuePeriod": {
                  "start": "2013-01-01",
                  "end": "2028-12-31"
                }
              }
            ]
          }
        ]
      }
    },
    {
      "fullUrl": "https://example.org/fhir/Practitioner/planning-practitioner",
      "resource": {
        "resourceType": "Practitioner",
        "id": "planning-practitioner",
        "meta": {
          "profile": [
            "http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner"
          ]
        },
        "identifier": [
          {
            "type": {
              "text": "HPR number (synthetic example)",
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                  "code": "PRN",
                  "display": "Provider number"
                }
              ]
            },
            "system": "urn:oid:2.16.578.1.12.4.1.4.4",
            "value": "1234567"
          },
          {
            "system": "urn:digidot:example:planning:practitioner",
            "value": "planning-practitioner"
          }
        ],
        "name": [
          {
            "given": [
              "Robin"
            ],
            "family": "Taylor"
          }
        ],
        "active": true,
        "qualification": [
          {
            "code": {
              "text": "Dentist"
            }
          }
        ],
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Robin Taylor, dentist at Central Dental Clinic in the public dental service of Fylkeskommune.</p></div>"
        }
      }
    },
    {
      "fullUrl": "https://example.org/fhir/Organization/planning-county",
      "resource": {
        "resourceType": "Organization",
        "id": "planning-county",
        "meta": {
          "profile": [
            "http://hl7.no/fhir/StructureDefinition/no-basis-Organization"
          ]
        },
        "identifier": [
          {
            "system": "urn:oid:2.16.578.1.12.4.1.4.101",
            "value": "999999999"
          },
          {
            "system": "urn:digidot:example:planning:organization",
            "value": "planning-county"
          }
        ],
        "name": "Fylkeskommune",
        "active": true,
        "type": [
          {
            "text": "County municipality"
          }
        ],
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>County municipality responsible for the public dental service.</p></div>"
        }
      }
    },
    {
      "fullUrl": "https://example.org/fhir/Location/planning-location",
      "resource": {
        "resourceType": "Location",
        "id": "planning-location",
        "meta": {
          "profile": [
            "http://hl7.no/fhir/StructureDefinition/no-basis-Location"
          ]
        },
        "identifier": [
          {
            "system": "urn:digidot:example:planning:location",
            "value": "planning-location"
          }
        ],
        "name": "Central Dental Clinic",
        "managingOrganization": {
          "reference": "Organization/planning-county",
          "type": "Organization"
        },
        "status": "active",
        "mode": "instance",
        "description": "Physical dental clinic site used for both visits. The street address is fictional.",
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Central Dental Clinic, the physical site for both visits. The street address is fictional.</p></div>"
        },
        "address": {
          "use": "work",
          "type": "physical",
          "text": "Eksempelveien 12, 7010 TRONDHEIM, Norway",
          "line": [
            "Eksempelveien 12"
          ],
          "city": "TRONDHEIM",
          "postalCode": "7010",
          "country": "NO"
        }
      }
    },
    {
      "fullUrl": "https://example.org/fhir/EpisodeOfCare/general-care",
      "resource": {
        "resourceType": "EpisodeOfCare",
        "id": "general-care",
        "meta": {
          "profile": [
            "https://novari.no/fhir/digidot/StructureDefinition/digidot-EpisodeOfCare-no|0.6.6"
          ]
        },
        "identifier": [
          {
            "system": "urn:digidot:example:planning:episodeofcare",
            "value": "general-care"
          }
        ],
        "status": "active",
        "patient": {
          "reference": "Patient/planning-patient",
          "type": "Patient"
        },
        "managingOrganization": {
          "reference": "Organization/planning-county",
          "type": "Organization"
        },
        "period": {
          "start": "2026-09-01"
        },
        "careManager": {
          "reference": "Practitioner/planning-practitioner",
          "type": "Practitioner"
        },
        "type": [
          {
            "coding": [
              {
                "system": "https://novari.no/fhir/digidot/CodeSystem/digidot-episode-of-care-type",
                "code": "general-dental-care"
              }
            ]
          }
        ],
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>General dental care. Responsibility started 1 September 2026 and remains active.</p></div>"
        }
      }
    },
    {
      "fullUrl": "https://example.org/fhir/Encounter/recall-contact",
      "resource": {
        "resourceType": "Encounter",
        "id": "recall-contact",
        "meta": {
          "profile": [
            "https://novari.no/fhir/digidot/StructureDefinition/digidot-Encounter-no|0.6.11"
          ]
        },
        "identifier": [
          {
            "system": "urn:digidot:example:planning:encounter",
            "value": "recall-contact"
          }
        ],
        "status": "finished",
        "subject": {
          "reference": "Patient/planning-patient",
          "type": "Patient"
        },
        "class": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "AMB"
        },
        "serviceProvider": {
          "reference": "Organization/planning-county",
          "type": "Organization"
        },
        "period": {
          "start": "2026-09-16T07:03:00+00:00",
          "end": "2026-09-16T07:28:00+00:00"
        },
        "participant": [
          {
            "type": [
              {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
                    "code": "PPRF"
                  }
                ]
              }
            ],
            "individual": {
              "reference": "Practitioner/planning-practitioner",
              "type": "Practitioner"
            }
          }
        ],
        "location": [
          {
            "location": {
              "reference": "Location/planning-location",
              "type": "Location"
            }
          }
        ],
        "episodeOfCare": [
          {
            "reference": "EpisodeOfCare/general-care",
            "type": "EpisodeOfCare"
          }
        ],
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Examination at Central Dental Clinic. Active occlusal caries in tooth 46 was identified; a referral for restorative treatment was authorised during this contact. No treatment or receiving-clinic contact is represented in this case.</p></div>"
        },
        "extension": [
          {
            "url": "https://novari.no/fhir/digidot/StructureDefinition/digidot-Helsegruppe-no",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "https://novari.no/fhir/digidot/CodeSystem/digidot-helsegruppe",
                  "version": "0.3.2",
                  "code": "A2",
                  "display": "Barn og unge 3–18 år"
                }
              ]
            }
          }
        ]
      }
    },
    {
      "fullUrl": "https://example.org/fhir/Condition/caries-finding",
      "resource": {
        "resourceType": "Condition",
        "id": "caries-finding",
        "meta": {
          "profile": [
            "https://novari.no/fhir/digidot/StructureDefinition/digidot-Condition-no|0.7.1"
          ]
        },
        "clinicalStatus": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
              "code": "active"
            }
          ]
        },
        "code": {
          "coding": [
            {
              "id": "SCTpre",
              "system": "http://snomed.info/sct",
              "version": "http://snomed.info/sct/51000202101/version/20260715",
              "code": "80967001",
              "display": "Dental caries"
            },
            {
              "system": "http://snomed.info/sct",
              "version": "http://snomed.info/sct/51000202101/version/20260715",
              "code": "80967001:{363698007=866005003}{363698007=83473006}",
              "display": "Dental caries on the occlusal surface of tooth 46",
              "id": "SCTextended"
            }
          ],
          "text": "Dental caries, tooth 46, occlusal surface"
        },
        "subject": {
          "reference": "Patient/planning-patient",
          "type": "Patient"
        },
        "encounter": {
          "reference": "Encounter/recall-contact",
          "type": "Encounter"
        },
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Confirmed active dental caries on the occlusal surface of tooth 46, first recorded at this examination. The finding justifies the requested restoration; it has not been treated in this example.</p></div>"
        },
        "bodySite": [
          {
            "extension": [
              {
                "url": "https://novari.no/fhir/digidot/StructureDefinition/digidot-ehds-body-structure",
                "extension": [
                  {
                    "url": "location",
                    "valueCodeableConcept": {
                      "coding": [
                        {
                          "system": "http://snomed.info/sct",
                          "version": "http://snomed.info/sct/51000202101/version/20260715",
                          "code": "866005003",
                          "display": "Structure of permanent mandibular right first molar tooth"
                        }
                      ],
                      "text": "Tooth 46 (ISO 3950)"
                    }
                  },
                  {
                    "url": "locationQualifier",
                    "valueCodeableConcept": {
                      "coding": [
                        {
                          "system": "http://snomed.info/sct",
                          "version": "http://snomed.info/sct/51000202101/version/20260715",
                          "code": "710098004",
                          "display": "Occlusal (qualifier value)"
                        }
                      ],
                      "text": "Occlusal surface"
                    }
                  }
                ]
              }
            ]
          }
        ],
        "category": [
          {
            "coding": [
              {
                "system": "http://hl7.org/fhir/us/dental-data-exchange/CodeSystem/dental-category",
                "code": "dental",
                "display": "Dental"
              }
            ]
          }
        ],
        "verificationStatus": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
              "code": "confirmed"
            }
          ]
        },
        "onsetDateTime": "2026-09-16",
        "recorder": {
          "reference": "Practitioner/planning-practitioner",
          "type": "Practitioner"
        }
      }
    },
    {
      "fullUrl": "https://example.org/fhir/Composition/examination-note",
      "resource": {
        "resourceType": "Composition",
        "id": "examination-note",
        "meta": {
          "profile": [
            "https://novari.no/fhir/digidot/StructureDefinition/digidot-DentalContactNote-no|0.4.12"
          ]
        },
        "identifier": {
          "system": "urn:digidot:example:planning:dental-contact-note",
          "value": "referral-contact-note-001"
        },
        "status": "final",
        "type": {
          "coding": [
            {
              "system": "urn:oid:2.16.578.1.12.4.1.1.9602",
              "code": "B02-2",
              "display": "Journalnotat"
            }
          ]
        },
        "subject": {
          "reference": "Patient/planning-patient",
          "type": "Patient"
        },
        "encounter": {
          "reference": "Encounter/recall-contact",
          "type": "Encounter"
        },
        "date": "2026-09-16T07:45:00+00:00",
        "author": [
          {
            "reference": "Practitioner/planning-practitioner",
            "type": "Practitioner",
            "display": "Robin Taylor"
          }
        ],
        "title": "Journal note — examination and referral disclosure",
        "custodian": {
          "reference": "Organization/planning-county",
          "type": "Organization"
        },
        "section": [
          {
            "title": "Examination, referral and information shared",
            "text": {
              "status": "additional",
              "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Confirmed active occlusal caries in tooth 46 was recorded during the examination. The necessary restorative care cannot be provided at the referring clinic, so Robin Taylor authorised a request to Receiving Fylkeskommune.</p><p>At 09:40 +02:00 on 16 September 2026, Robin Taylor sent the final referral letter referral-letter-001, version 1, to Receiving Fylkeskommune, public dental specialist service. The information shared was the patient identity and birth date, referring clinician and clinic, the tooth-46 occlusal caries finding, the examination date, the requested restoration and the reason the local clinic could not provide it. The retained letter and Condition/caries-finding identify the content and clinical basis.</p><p>This note records sending. It does not assert receipt, acceptance, booking or treatment. The order remains active; its scope is the requested restoration. The sending service retains its original care responsibility.</p></div>"
            },
            "entry": [
              {
                "reference": "Condition/caries-finding",
                "type": "Condition"
              },
              {
                "reference": "ServiceRequest/specialist-referral",
                "type": "ServiceRequest"
              },
              {
                "reference": "DocumentReference/referral-letter",
                "type": "DocumentReference"
              }
            ]
          }
        ],
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Final contact note authored by Robin Taylor. Records the examination, the referral rationale and the actual sender, recipient, sending time, shared content and retained letter version. No receiving-clinic workflow or access-control implementation is asserted.</p></div>"
        }
      }
    },
    {
      "fullUrl": "https://example.org/fhir/ServiceRequest/specialist-referral",
      "resource": {
        "resourceType": "ServiceRequest",
        "id": "specialist-referral",
        "meta": {
          "profile": [
            "https://novari.no/fhir/digidot/StructureDefinition/digidot-ServiceRequest-no|0.6.9"
          ]
        },
        "status": "active",
        "intent": "order",
        "subject": {
          "reference": "Patient/planning-patient",
          "type": "Patient"
        },
        "encounter": {
          "reference": "Encounter/recall-contact",
          "type": "Encounter"
        },
        "requester": {
          "reference": "Practitioner/planning-practitioner",
          "type": "Practitioner"
        },
        "performer": [
          {
            "reference": "Organization/receiving-county",
            "type": "Organization"
          }
        ],
        "supportingInfo": [
          {
            "reference": "EpisodeOfCare/general-care",
            "type": "EpisodeOfCare"
          },
          {
            "reference": "DocumentReference/referral-letter",
            "type": "DocumentReference"
          },
          {
            "reference": "Composition/examination-note",
            "type": "Composition"
          }
        ],
        "reasonReference": [
          {
            "reference": "Condition/caries-finding",
            "type": "Condition"
          }
        ],
        "authoredOn": "2026-09-16T07:25:00+00:00",
        "category": [
          {
            "coding": [
              {
                "system": "https://novari.no/fhir/digidot/CodeSystem/digidot-service-request-category",
                "code": "dental-treatment"
              }
            ]
          }
        ],
        "code": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "version": "http://snomed.info/sct/51000202101/version/20260715",
              "code": "129125009:{408730004=397943006,408731000=410512000,408732007=410604004,363589002=(234789004:{363704007=866005003}{363704007=83473006})}",
              "id": "SCTextended",
              "display": "Planned composite restoration of tooth 46, occlusal surface"
            }
          ],
          "text": "Planned composite restoration, tooth 46, occlusal surface"
        },
        "bodySite": [
          {
            "extension": [
              {
                "url": "https://novari.no/fhir/digidot/StructureDefinition/digidot-ehds-body-structure",
                "extension": [
                  {
                    "url": "location",
                    "valueCodeableConcept": {
                      "coding": [
                        {
                          "system": "http://snomed.info/sct",
                          "version": "http://snomed.info/sct/51000202101/version/20260715",
                          "code": "866005003",
                          "display": "Structure of permanent mandibular right first molar tooth"
                        }
                      ],
                      "text": "Tooth 46 (ISO 3950)"
                    }
                  },
                  {
                    "url": "locationQualifier",
                    "valueCodeableConcept": {
                      "coding": [
                        {
                          "system": "http://snomed.info/sct",
                          "version": "http://snomed.info/sct/51000202101/version/20260715",
                          "code": "710098004",
                          "display": "Occlusal (qualifier value)"
                        }
                      ],
                      "text": "Occlusal surface"
                    }
                  }
                ]
              }
            ]
          }
        ],
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Active order to Receiving Fylkeskommune for the planned composite restoration of the occlusal surface of tooth 46. The initiating contact and source care responsibility remain with the referring service. Sending the letter does not fulfil the requested treatment.</p></div>"
        },
        "identifier": [
          {
            "system": "urn:digidot:example:referral:request",
            "value": "specialist-referral-001"
          }
        ],
        "occurrencePeriod": {
          "start": "2026-09-16",
          "end": "2026-12-31"
        },
        "priority": "routine",
        "note": [
          {
            "authorReference": {
              "reference": "Practitioner/planning-practitioner",
              "type": "Practitioner"
            },
            "time": "2026-09-16T07:25:00+00:00",
            "text": "Restorative care cannot be provided at the referring clinic. Please arrange the specified restoration through the receiving public dental service. The requested scope is restoration, not assessment alone."
          }
        ]
      }
    },
    {
      "fullUrl": "https://example.org/fhir/Organization/receiving-county",
      "resource": {
        "resourceType": "Organization",
        "id": "receiving-county",
        "meta": {
          "profile": [
            "http://hl7.no/fhir/StructureDefinition/no-basis-Organization"
          ]
        },
        "identifier": [
          {
            "system": "urn:digidot:example:referral:organisation",
            "value": "receiving-county"
          }
        ],
        "active": true,
        "name": "Receiving Fylkeskommune",
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Fictional receiving county organisation. Its public dental service is asked to provide the specified restorative treatment through its specialist clinic.</p></div>"
        }
      }
    },
    {
      "fullUrl": "https://example.org/fhir/DocumentReference/referral-letter",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "referral-letter",
        "meta": {
          "profile": [
            "http://hl7.no/fhir/StructureDefinition/no-basis-DocumentReference|2.0.15"
          ],
          "versionId": "1"
        },
        "identifier": [
          {
            "system": "urn:digidot:example:referral:letter",
            "value": "referral-letter-001"
          }
        ],
        "status": "current",
        "docStatus": "final",
        "type": {
          "coding": [
            {
              "system": "urn:oid:2.16.578.1.12.4.1.1.9602",
              "code": "I01-2",
              "display": "Henvisninger"
            }
          ],
          "text": "Dental referral letter"
        },
        "subject": {
          "reference": "Patient/planning-patient",
          "type": "Patient"
        },
        "date": "2026-09-16T07:32:00+00:00",
        "author": [
          {
            "reference": "Practitioner/planning-practitioner",
            "type": "Practitioner"
          }
        ],
        "custodian": {
          "reference": "Organization/planning-county",
          "type": "Organization"
        },
        "description": "Retained final referral letter; indexing time is not the sending time.",
        "content": [
          {
            "attachment": {
              "contentType": "text/plain",
              "language": "en",
              "data": "RmljdGlvbmFsIGRlbnRhbCByZWZlcnJhbCDigJQgcmV0YWluZWQgc291cmNlIGxldHRlcgpQYXRpZW50OiBKb25hcyBNb2VuLCBib3JuIDkgSmFudWFyeSAyMDEwIChzeW50aGV0aWMgTkhOIFN5bnRQb3AgcGF0aWVudCkuCkZyb206IFJvYmluIFRheWxvciwgQ2VudHJhbCBEZW50YWwgQ2xpbmljLCBGeWxrZXNrb21tdW5lLgpUbzogUmVjZWl2aW5nIEZ5bGtlc2tvbW11bmUsIHB1YmxpYyBkZW50YWwgc3BlY2lhbGlzdCBzZXJ2aWNlLgpSZXF1ZXN0OiBjb21wb3NpdGUgcmVzdG9yYXRpb24gb2YgdG9vdGggNDYgKElTTyAzOTUwKSwgb2NjbHVzYWwgc3VyZmFjZS4KQ2xpbmljYWwgYmFzaXM6IGNvbmZpcm1lZCBhY3RpdmUgb2NjbHVzYWwgY2FyaWVzIGluIHRvb3RoIDQ2LCByZWNvcmRlZCBhdCB0aGUgZXhhbWluYXRpb24gb24gMTYgU2VwdGVtYmVyIDIwMjYuClJlYXNvbiBmb3IgcmVmZXJyYWw6IHRoZSBzcGVjaWZpZWQgcmVzdG9yYXRpdmUgY2FyZSBjYW5ub3QgYmUgcHJvdmlkZWQgYXQgdGhlIHJlZmVycmluZyBjbGluaWMuClJlcXVlc3RlZCBzY29wZTogY2Fycnkgb3V0IHRoZSByZXN0b3JhdGlvbjsgc3BlY2lhbGlzdCBhc3Nlc3NtZW50IGFsb25lIGRvZXMgbm90IGZ1bGZpbCB0aGlzIHJlcXVlc3QuClNvdXJjZSByZXF1ZXN0OiBzcGVjaWFsaXN0LXJlZmVycmFsLTAwMS4gU291cmNlIGZpbmRpbmc6IENvbmRpdGlvbi9jYXJpZXMtZmluZGluZy4KQ3JlYXRlZDogMTYgU2VwdGVtYmVyIDIwMjYsIDA5OjMwICswMjowMC4KVGhpcyBzeW50aGV0aWMgZXhhbXBsZSByZXByZXNlbnRzIHJldGFpbmVkIGpvdXJuYWwgaW5mb3JtYXRpb24sIG5vdCBhIGRvY3VtZW50IHN1Ym1pdHRlZCB0byBhIHJlYWwgcmVjaXBpZW50Lg==",
              "title": "Referral for restorative treatment — tooth 46",
              "creation": "2026-09-16T07:30:00+00:00"
            }
          }
        ],
        "context": {
          "encounter": [
            {
              "reference": "Encounter/recall-contact",
              "type": "Encounter"
            }
          ]
        },
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p>Retained final referral letter, identifier referral-letter-001, version 1. National document type I01-2 (Henvisninger). The exact plaintext content is included as an attachment.</p></div>"
        }
      }
    }
  ]
}