<Bundle xmlns="http://hl7.org/fhir">
  <id value="example-digidot-referral-and-disclosure" />
  <type value="collection" />
  <entry>
    <fullUrl value="https://example.org/fhir/Patient/planning-patient" />
    <resource>
      <Patient>
        <id value="planning-patient" />
        <meta>
          <profile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Patient-no|0.2.3" />
        </meta>
        <text>
          <status value="generated" />
          <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>
        </text>
        <extension url="https://novari.no/fhir/digidot/StructureDefinition/digidot-PatientHealthGroup-no">
          <extension url="group">
            <valueCodeableConcept>
              <coding>
                <system value="https://novari.no/fhir/digidot/CodeSystem/digidot-helsegruppe" />
                <code value="A2" />
              </coding>
            </valueCodeableConcept>
          </extension>
          <extension url="period">
            <valuePeriod>
              <start value="2013-01-01" />
              <end value="2028-12-31" />
            </valuePeriod>
          </extension>
        </extension>
        <identifier>
          <system value="urn:oid:2.16.578.1.12.4.1.4.1" />
          <value value="09661078143" />
        </identifier>
        <identifier>
          <system value="urn:digidot:example:planning:patient" />
          <value value="planning-patient" />
        </identifier>
        <active value="true" />
        <name>
          <family value="Moen" />
          <given value="Jonas" />
        </name>
        <birthDate value="2010-01-09" />
      </Patient>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://example.org/fhir/Practitioner/planning-practitioner" />
    <resource>
      <Practitioner>
        <id value="planning-practitioner" />
        <meta>
          <profile value="http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner" />
        </meta>
        <text>
          <status value="generated" />
          <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>
        </text>
        <identifier>
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
              <code value="PRN" />
              <display value="Provider number" />
            </coding>
            <text value="HPR number (synthetic example)" />
          </type>
          <system value="urn:oid:2.16.578.1.12.4.1.4.4" />
          <value value="1234567" />
        </identifier>
        <identifier>
          <system value="urn:digidot:example:planning:practitioner" />
          <value value="planning-practitioner" />
        </identifier>
        <active value="true" />
        <name>
          <family value="Taylor" />
          <given value="Robin" />
        </name>
        <qualification>
          <code>
            <text value="Dentist" />
          </code>
        </qualification>
      </Practitioner>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://example.org/fhir/Organization/planning-county" />
    <resource>
      <Organization>
        <id value="planning-county" />
        <meta>
          <profile value="http://hl7.no/fhir/StructureDefinition/no-basis-Organization" />
        </meta>
        <text>
          <status value="generated" />
          <div xmlns="http://www.w3.org/1999/xhtml">
            <p>County municipality responsible for the public dental service.</p>
          </div>
        </text>
        <identifier>
          <system value="urn:oid:2.16.578.1.12.4.1.4.101" />
          <value value="999999999" />
        </identifier>
        <identifier>
          <system value="urn:digidot:example:planning:organization" />
          <value value="planning-county" />
        </identifier>
        <active value="true" />
        <type>
          <text value="County municipality" />
        </type>
        <name value="Fylkeskommune" />
      </Organization>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://example.org/fhir/Location/planning-location" />
    <resource>
      <Location>
        <id value="planning-location" />
        <meta>
          <profile value="http://hl7.no/fhir/StructureDefinition/no-basis-Location" />
        </meta>
        <text>
          <status value="generated" />
          <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>
        </text>
        <identifier>
          <system value="urn:digidot:example:planning:location" />
          <value value="planning-location" />
        </identifier>
        <status value="active" />
        <name value="Central Dental Clinic" />
        <description value="Physical dental clinic site used for both visits. The street address is fictional." />
        <mode value="instance" />
        <address>
          <use value="work" />
          <type value="physical" />
          <text value="Eksempelveien 12, 7010 TRONDHEIM, Norway" />
          <line value="Eksempelveien 12" />
          <city value="TRONDHEIM" />
          <postalCode value="7010" />
          <country value="NO" />
        </address>
        <managingOrganization>
          <reference value="Organization/planning-county" />
          <type value="Organization" />
        </managingOrganization>
      </Location>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://example.org/fhir/EpisodeOfCare/general-care" />
    <resource>
      <EpisodeOfCare>
        <id value="general-care" />
        <meta>
          <profile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-EpisodeOfCare-no|0.6.6" />
        </meta>
        <text>
          <status value="generated" />
          <div xmlns="http://www.w3.org/1999/xhtml">
            <p>General dental care. Responsibility started 1 September 2026 and remains active.</p>
          </div>
        </text>
        <identifier>
          <system value="urn:digidot:example:planning:episodeofcare" />
          <value value="general-care" />
        </identifier>
        <status value="active" />
        <type>
          <coding>
            <system value="https://novari.no/fhir/digidot/CodeSystem/digidot-episode-of-care-type" />
            <code value="general-dental-care" />
          </coding>
        </type>
        <patient>
          <reference value="Patient/planning-patient" />
          <type value="Patient" />
        </patient>
        <managingOrganization>
          <reference value="Organization/planning-county" />
          <type value="Organization" />
        </managingOrganization>
        <period>
          <start value="2026-09-01" />
        </period>
        <careManager>
          <reference value="Practitioner/planning-practitioner" />
          <type value="Practitioner" />
        </careManager>
      </EpisodeOfCare>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://example.org/fhir/Encounter/recall-contact" />
    <resource>
      <Encounter>
        <id value="recall-contact" />
        <meta>
          <profile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Encounter-no|0.6.11" />
        </meta>
        <text>
          <status value="generated" />
          <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>
        </text>
        <extension url="https://novari.no/fhir/digidot/StructureDefinition/digidot-Helsegruppe-no">
          <valueCodeableConcept>
            <coding>
              <system value="https://novari.no/fhir/digidot/CodeSystem/digidot-helsegruppe" />
              <version value="0.3.2" />
              <code value="A2" />
              <display value="Barn og unge 3–18 år" />
            </coding>
          </valueCodeableConcept>
        </extension>
        <identifier>
          <system value="urn:digidot:example:planning:encounter" />
          <value value="recall-contact" />
        </identifier>
        <status value="finished" />
        <class>
          <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode" />
          <code value="AMB" />
        </class>
        <subject>
          <reference value="Patient/planning-patient" />
          <type value="Patient" />
        </subject>
        <episodeOfCare>
          <reference value="EpisodeOfCare/general-care" />
          <type value="EpisodeOfCare" />
        </episodeOfCare>
        <participant>
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/v3-ParticipationType" />
              <code value="PPRF" />
            </coding>
          </type>
          <individual>
            <reference value="Practitioner/planning-practitioner" />
            <type value="Practitioner" />
          </individual>
        </participant>
        <period>
          <start value="2026-09-16T09:03:00+02:00" />
          <end value="2026-09-16T09:28:00+02:00" />
        </period>
        <location>
          <location>
            <reference value="Location/planning-location" />
            <type value="Location" />
          </location>
        </location>
        <serviceProvider>
          <reference value="Organization/planning-county" />
          <type value="Organization" />
        </serviceProvider>
      </Encounter>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://example.org/fhir/Condition/caries-finding" />
    <resource>
      <Condition>
        <id value="caries-finding" />
        <meta>
          <profile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-Condition-no|0.7.1" />
        </meta>
        <text>
          <status value="generated" />
          <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>
        </text>
        <clinicalStatus>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/condition-clinical" />
            <code value="active" />
          </coding>
        </clinicalStatus>
        <verificationStatus>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/condition-ver-status" />
            <code value="confirmed" />
          </coding>
        </verificationStatus>
        <category>
          <coding>
            <system value="http://hl7.org/fhir/us/dental-data-exchange/CodeSystem/dental-category" />
            <code value="dental" />
            <display value="Dental" />
          </coding>
        </category>
        <code>
          <coding id="SCTpre">
            <system value="http://snomed.info/sct" />
            <version value="http://snomed.info/sct/51000202101/version/20260715" />
            <code value="80967001" />
            <display value="Dental caries" />
          </coding>
          <coding id="SCTextended">
            <system value="http://snomed.info/sct" />
            <version value="http://snomed.info/sct/51000202101/version/20260715" />
            <code value="80967001:{363698007=866005003}{363698007=83473006}" />
            <display value="Dental caries on the occlusal surface of tooth 46" />
          </coding>
          <text value="Dental caries, tooth 46, occlusal surface" />
        </code>
        <bodySite>
          <extension url="https://novari.no/fhir/digidot/StructureDefinition/digidot-ehds-body-structure">
            <extension url="location">
              <valueCodeableConcept>
                <coding>
                  <system value="http://snomed.info/sct" />
                  <version value="http://snomed.info/sct/51000202101/version/20260715" />
                  <code value="866005003" />
                  <display value="Structure of permanent mandibular right first molar tooth" />
                </coding>
                <text value="Tooth 46 (ISO 3950)" />
              </valueCodeableConcept>
            </extension>
            <extension url="locationQualifier">
              <valueCodeableConcept>
                <coding>
                  <system value="http://snomed.info/sct" />
                  <version value="http://snomed.info/sct/51000202101/version/20260715" />
                  <code value="710098004" />
                  <display value="Occlusal (qualifier value)" />
                </coding>
                <text value="Occlusal surface" />
              </valueCodeableConcept>
            </extension>
          </extension>
        </bodySite>
        <subject>
          <reference value="Patient/planning-patient" />
          <type value="Patient" />
        </subject>
        <encounter>
          <reference value="Encounter/recall-contact" />
          <type value="Encounter" />
        </encounter>
        <onsetDateTime value="2026-09-16" />
        <recorder>
          <reference value="Practitioner/planning-practitioner" />
          <type value="Practitioner" />
        </recorder>
      </Condition>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://example.org/fhir/Composition/examination-note" />
    <resource>
      <Composition>
        <id value="examination-note" />
        <meta>
          <profile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-DentalContactNote-no|0.4.12" />
        </meta>
        <text>
          <status value="generated" />
          <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>
        </text>
        <identifier>
          <system value="urn:digidot:example:planning:dental-contact-note" />
          <value value="referral-contact-note-001" />
        </identifier>
        <status value="final" />
        <type>
          <coding>
            <system value="urn:oid:2.16.578.1.12.4.1.1.9602" />
            <code value="B02-2" />
            <display value="Journalnotat" />
          </coding>
        </type>
        <subject>
          <reference value="Patient/planning-patient" />
          <type value="Patient" />
        </subject>
        <encounter>
          <reference value="Encounter/recall-contact" />
          <type value="Encounter" />
        </encounter>
        <date value="2026-09-16T09:45:00+02:00" />
        <author>
          <reference value="Practitioner/planning-practitioner" />
          <type value="Practitioner" />
          <display value="Robin Taylor" />
        </author>
        <title value="Journal note — examination and referral disclosure" />
        <custodian>
          <reference value="Organization/planning-county" />
          <type value="Organization" />
        </custodian>
        <section>
          <title value="Examination, referral and information shared" />
          <text>
            <status value="additional" />
            <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>
          </text>
          <entry>
            <reference value="Condition/caries-finding" />
            <type value="Condition" />
          </entry>
          <entry>
            <reference value="ServiceRequest/specialist-referral" />
            <type value="ServiceRequest" />
          </entry>
          <entry>
            <reference value="DocumentReference/referral-letter" />
            <type value="DocumentReference" />
          </entry>
        </section>
      </Composition>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://example.org/fhir/ServiceRequest/specialist-referral" />
    <resource>
      <ServiceRequest>
        <id value="specialist-referral" />
        <meta>
          <profile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-ServiceRequest-no|0.6.9" />
        </meta>
        <text>
          <status value="generated" />
          <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>
        </text>
        <identifier>
          <system value="urn:digidot:example:referral:request" />
          <value value="specialist-referral-001" />
        </identifier>
        <status value="active" />
        <intent value="order" />
        <category>
          <coding>
            <system value="https://novari.no/fhir/digidot/CodeSystem/digidot-service-request-category" />
            <code value="dental-treatment" />
          </coding>
        </category>
        <priority value="routine" />
        <code>
          <coding id="SCTextended">
            <system value="http://snomed.info/sct" />
            <version value="http://snomed.info/sct/51000202101/version/20260715" />
            <code value="129125009:{408730004=397943006,408731000=410512000,408732007=410604004,363589002=(234789004:{363704007=866005003}{363704007=83473006})}" />
            <display value="Planned composite restoration of tooth 46, occlusal surface" />
          </coding>
          <text value="Planned composite restoration, tooth 46, occlusal surface" />
        </code>
        <subject>
          <reference value="Patient/planning-patient" />
          <type value="Patient" />
        </subject>
        <encounter>
          <reference value="Encounter/recall-contact" />
          <type value="Encounter" />
        </encounter>
        <occurrencePeriod>
          <start value="2026-09-16" />
          <end value="2026-12-31" />
        </occurrencePeriod>
        <authoredOn value="2026-09-16T09:25:00+02:00" />
        <requester>
          <reference value="Practitioner/planning-practitioner" />
          <type value="Practitioner" />
        </requester>
        <performer>
          <reference value="Organization/receiving-county" />
          <type value="Organization" />
        </performer>
        <reasonReference>
          <reference value="Condition/caries-finding" />
          <type value="Condition" />
        </reasonReference>
        <supportingInfo>
          <reference value="EpisodeOfCare/general-care" />
          <type value="EpisodeOfCare" />
        </supportingInfo>
        <supportingInfo>
          <reference value="DocumentReference/referral-letter" />
          <type value="DocumentReference" />
        </supportingInfo>
        <supportingInfo>
          <reference value="Composition/examination-note" />
          <type value="Composition" />
        </supportingInfo>
        <bodySite>
          <extension url="https://novari.no/fhir/digidot/StructureDefinition/digidot-ehds-body-structure">
            <extension url="location">
              <valueCodeableConcept>
                <coding>
                  <system value="http://snomed.info/sct" />
                  <version value="http://snomed.info/sct/51000202101/version/20260715" />
                  <code value="866005003" />
                  <display value="Structure of permanent mandibular right first molar tooth" />
                </coding>
                <text value="Tooth 46 (ISO 3950)" />
              </valueCodeableConcept>
            </extension>
            <extension url="locationQualifier">
              <valueCodeableConcept>
                <coding>
                  <system value="http://snomed.info/sct" />
                  <version value="http://snomed.info/sct/51000202101/version/20260715" />
                  <code value="710098004" />
                  <display value="Occlusal (qualifier value)" />
                </coding>
                <text value="Occlusal surface" />
              </valueCodeableConcept>
            </extension>
          </extension>
        </bodySite>
        <note>
          <authorReference>
            <reference value="Practitioner/planning-practitioner" />
            <type value="Practitioner" />
          </authorReference>
          <time value="2026-09-16T09:25:00+02:00" />
          <text value="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." />
        </note>
      </ServiceRequest>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://example.org/fhir/Organization/receiving-county" />
    <resource>
      <Organization>
        <id value="receiving-county" />
        <meta>
          <profile value="http://hl7.no/fhir/StructureDefinition/no-basis-Organization" />
        </meta>
        <text>
          <status value="generated" />
          <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>
        </text>
        <identifier>
          <system value="urn:digidot:example:referral:organisation" />
          <value value="receiving-county" />
        </identifier>
        <active value="true" />
        <name value="Receiving Fylkeskommune" />
      </Organization>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://example.org/fhir/DocumentReference/referral-letter" />
    <resource>
      <DocumentReference>
        <id value="referral-letter" />
        <meta>
          <versionId value="1" />
          <profile value="http://hl7.no/fhir/StructureDefinition/no-basis-DocumentReference|2.0.15" />
        </meta>
        <text>
          <status value="generated" />
          <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>
        </text>
        <identifier>
          <system value="urn:digidot:example:referral:letter" />
          <value value="referral-letter-001" />
        </identifier>
        <status value="current" />
        <docStatus value="final" />
        <type>
          <coding>
            <system value="urn:oid:2.16.578.1.12.4.1.1.9602" />
            <code value="I01-2" />
            <display value="Henvisninger" />
          </coding>
          <text value="Dental referral letter" />
        </type>
        <subject>
          <reference value="Patient/planning-patient" />
          <type value="Patient" />
        </subject>
        <date value="2026-09-16T09:32:00+02:00" />
        <author>
          <reference value="Practitioner/planning-practitioner" />
          <type value="Practitioner" />
        </author>
        <custodian>
          <reference value="Organization/planning-county" />
          <type value="Organization" />
        </custodian>
        <description value="Retained final referral letter; indexing time is not the sending time." />
        <content>
          <attachment>
            <contentType value="text/plain" />
            <language value="en" />
            <data value="RmljdGlvbmFsIGRlbnRhbCByZWZlcnJhbCDigJQgcmV0YWluZWQgc291cmNlIGxldHRlcgpQYXRpZW50OiBKb25hcyBNb2VuLCBib3JuIDkgSmFudWFyeSAyMDEwIChzeW50aGV0aWMgTkhOIFN5bnRQb3AgcGF0aWVudCkuCkZyb206IFJvYmluIFRheWxvciwgQ2VudHJhbCBEZW50YWwgQ2xpbmljLCBGeWxrZXNrb21tdW5lLgpUbzogUmVjZWl2aW5nIEZ5bGtlc2tvbW11bmUsIHB1YmxpYyBkZW50YWwgc3BlY2lhbGlzdCBzZXJ2aWNlLgpSZXF1ZXN0OiBjb21wb3NpdGUgcmVzdG9yYXRpb24gb2YgdG9vdGggNDYgKElTTyAzOTUwKSwgb2NjbHVzYWwgc3VyZmFjZS4KQ2xpbmljYWwgYmFzaXM6IGNvbmZpcm1lZCBhY3RpdmUgb2NjbHVzYWwgY2FyaWVzIGluIHRvb3RoIDQ2LCByZWNvcmRlZCBhdCB0aGUgZXhhbWluYXRpb24gb24gMTYgU2VwdGVtYmVyIDIwMjYuClJlYXNvbiBmb3IgcmVmZXJyYWw6IHRoZSBzcGVjaWZpZWQgcmVzdG9yYXRpdmUgY2FyZSBjYW5ub3QgYmUgcHJvdmlkZWQgYXQgdGhlIHJlZmVycmluZyBjbGluaWMuClJlcXVlc3RlZCBzY29wZTogY2Fycnkgb3V0IHRoZSByZXN0b3JhdGlvbjsgc3BlY2lhbGlzdCBhc3Nlc3NtZW50IGFsb25lIGRvZXMgbm90IGZ1bGZpbCB0aGlzIHJlcXVlc3QuClNvdXJjZSByZXF1ZXN0OiBzcGVjaWFsaXN0LXJlZmVycmFsLTAwMS4gU291cmNlIGZpbmRpbmc6IENvbmRpdGlvbi9jYXJpZXMtZmluZGluZy4KQ3JlYXRlZDogMTYgU2VwdGVtYmVyIDIwMjYsIDA5OjMwICswMjowMC4KVGhpcyBzeW50aGV0aWMgZXhhbXBsZSByZXByZXNlbnRzIHJldGFpbmVkIGpvdXJuYWwgaW5mb3JtYXRpb24sIG5vdCBhIGRvY3VtZW50IHN1Ym1pdHRlZCB0byBhIHJlYWwgcmVjaXBpZW50Lg==" />
            <title value="Referral for restorative treatment — tooth 46" />
            <creation value="2026-09-16T09:30:00+02:00" />
          </attachment>
        </content>
        <context>
          <encounter>
            <reference value="Encounter/recall-contact" />
            <type value="Encounter" />
          </encounter>
        </context>
      </DocumentReference>
    </resource>
  </entry>
</Bundle>