<Bundle xmlns="http://hl7.org/fhir">
  <id value="example-digidot-external-critical-context" />
  <type value="collection" />
  <timestamp value="2026-07-31T10:00:00+02:00" />
  <entry>
    <fullUrl value="https://novari.no/fhir/digidot/example/Patient/pas-ehds-context" />
    <resource>
      <Patient>
        <id value="pas-ehds-context" />
        <meta>
          <source value="https://www.nhn.no/tjenester/persontjenesten" />
          <profile value="http://hl7.no/fhir/StructureDefinition/no-basis-Patient" />
        </meta>
        <identifier>
          <system value="urn:oid:2.16.578.1.12.4.1.4.1" />
          <value value="01019012345" />
        </identifier>
        <name>
          <family value="Testpasient" />
          <given value="Digi" />
        </name>
        <gender value="female" />
        <birthDate value="1990-01-01" />
      </Patient>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://novari.no/fhir/digidot/example/PractitionerRole/prr-ehds-dentist" />
    <resource>
      <PractitionerRole>
        <id value="prr-ehds-dentist" />
        <meta>
          <source value="https://www.nhn.no/tjenester/helsepersonellregisteret" />
          <profile value="http://hl7.no/fhir/StructureDefinition/no-basis-PractitionerRole" />
        </meta>
        <active value="true" />
        <practitioner>
          <reference value="Practitioner/practitioner-ehds-dentist" />
        </practitioner>
        <organization>
          <reference value="Organization/org-ehds-clinic" />
        </organization>
        <code>
          <coding>
            <system value="https://novari.no/fhir/digidot/CodeSystem/digidot-personnel-type" />
            <code value="dentist" />
            <display value="Dentist" />
          </coding>
        </code>
      </PractitionerRole>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://novari.no/fhir/digidot/example/Practitioner/practitioner-ehds-dentist" />
    <resource>
      <Practitioner>
        <id value="practitioner-ehds-dentist" />
        <meta>
          <source value="https://www.nhn.no/tjenester/helsepersonellregisteret" />
          <profile value="http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner" />
        </meta>
        <identifier>
          <system value="urn:oid:2.16.578.1.12.4.1.4.4" />
          <value value="123456789" />
        </identifier>
        <name>
          <family value="Tannlege" />
          <given value="Test" />
        </name>
      </Practitioner>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://novari.no/fhir/digidot/example/Organization/org-ehds-clinic" />
    <resource>
      <Organization>
        <id value="org-ehds-clinic" />
        <meta>
          <profile value="http://hl7.no/fhir/StructureDefinition/no-basis-Organization" />
        </meta>
        <identifier>
          <system value="urn:oid:2.16.578.1.12.4.1.2" />
          <value value="999999999" />
        </identifier>
        <name value="DigiDOT test dental clinic" />
      </Organization>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://novari.no/fhir/digidot/example/Location/loc-ehds-clinic-room" />
    <resource>
      <Location>
        <id value="loc-ehds-clinic-room" />
        <meta>
          <profile value="http://hl7.no/fhir/StructureDefinition/no-basis-Location" />
        </meta>
        <status value="active" />
        <name value="Treatment room 1" />
        <managingOrganization>
          <reference value="Organization/org-ehds-clinic" />
        </managingOrganization>
      </Location>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://novari.no/fhir/digidot/example/AllergyIntolerance/allergy-amoxicillin-critical" />
    <resource>
      <AllergyIntolerance>
        <id value="allergy-amoxicillin-critical" />
        <meta>
          <source value="https://utviklerportal.nhn.no/informasjonstjenester/kjernejournal/kritisk-informasjon" />
          <profile value="http://hl7.no/fhir/StructureDefinition/no-basis-AllergyIntolerance" />
          <tag>
            <system value="https://novari.no/fhir/digidot/CodeSystem/cache-status" />
            <code value="source-current" />
            <display value="Source checked for this clinical context" />
          </tag>
        </meta>
        <clinicalStatus>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical" />
            <code value="active" />
          </coding>
        </clinicalStatus>
        <verificationStatus>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/allergyintolerance-verification" />
            <code value="confirmed" />
          </coding>
        </verificationStatus>
        <type value="allergy" />
        <category value="medication" />
        <criticality value="high" />
        <code>
          <coding>
            <system value="http://snomed.info/sct" />
            <code value="387406002" />
            <display value="Amoxicillin" />
          </coding>
          <text value="Penicillin/amoxicillin reaction" />
        </code>
        <patient>
          <reference value="Patient/pas-ehds-context" />
        </patient>
        <recordedDate value="2026-07-30T09:00:00+02:00" />
        <recorder>
          <reference value="PractitionerRole/prr-ehds-dentist" />
        </recorder>
        <reaction>
          <manifestation>
            <coding>
              <system value="http://snomed.info/sct" />
              <code value="39579001" />
              <display value="Anaphylaxis" />
            </coding>
            <text value="Anaphylaxis" />
          </manifestation>
          <severity value="severe" />
        </reaction>
      </AllergyIntolerance>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://novari.no/fhir/digidot/example/Flag/flag-critical-allergy" />
    <resource>
      <Flag>
        <id value="flag-critical-allergy" />
        <meta>
          <source value="https://utviklerportal.nhn.no/informasjonstjenester/kjernejournal/kritisk-informasjon" />
        </meta>
        <status value="active" />
        <category>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/flag-category" />
            <code value="safety" />
            <display value="Safety" />
          </coding>
        </category>
        <code>
          <text value="Critical allergy information exists" />
        </code>
        <subject>
          <reference value="Patient/pas-ehds-context" />
        </subject>
        <period>
          <start value="2026-07-30" />
        </period>
      </Flag>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://novari.no/fhir/digidot/example/Consent/consent-treatment-limitation" />
    <resource>
      <Consent>
        <id value="consent-treatment-limitation" />
        <meta>
          <source value="https://utviklerportal.nhn.no/informasjonstjenester/kjernejournal/kritisk-informasjon" />
        </meta>
        <status value="active" />
        <scope>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/consentscope" />
            <code value="adr" />
            <display value="Advanced Care Directive" />
          </coding>
        </scope>
        <category>
          <coding>
            <system value="http://loinc.org" />
            <code value="42348-3" />
            <display value="Advance directives" />
          </coding>
        </category>
        <patient>
          <reference value="Patient/pas-ehds-context" />
        </patient>
        <dateTime value="2026-07-30T09:00:00+02:00" />
        <performer>
          <reference value="Patient/pas-ehds-context" />
        </performer>
        <provision>
          <type value="permit" />
          <period>
            <start value="2026-07-30" />
          </period>
        </provision>
      </Consent>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://novari.no/fhir/digidot/example/Device/device-pacemaker-context" />
    <resource>
      <Device>
        <id value="device-pacemaker-context" />
        <status value="active" />
        <type>
          <coding>
            <system value="http://snomed.info/sct" />
            <code value="14106009" />
            <display value="Cardiac pacemaker" />
          </coding>
        </type>
        <patient>
          <reference value="Patient/pas-ehds-context" />
        </patient>
      </Device>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://novari.no/fhir/digidot/example/DeviceUseStatement/deviceuse-pacemaker-context" />
    <resource>
      <DeviceUseStatement>
        <id value="deviceuse-pacemaker-context" />
        <meta>
          <source value="https://utviklerportal.nhn.no/informasjonstjenester/kjernejournal/kritisk-informasjon" />
        </meta>
        <status value="active" />
        <subject>
          <reference value="Patient/pas-ehds-context" />
        </subject>
        <recordedOn value="2026-07-30T09:00:00+02:00" />
        <device>
          <reference value="Device/device-pacemaker-context" />
        </device>
      </DeviceUseStatement>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://novari.no/fhir/digidot/example/QuestionnaireResponse/qr-dental-anamnesis" />
    <resource>
      <QuestionnaireResponse>
        <id value="qr-dental-anamnesis" />
        <status value="completed" />
        <subject>
          <reference value="Patient/pas-ehds-context" />
        </subject>
        <authored value="2026-07-31T09:35:00+02:00" />
        <author>
          <reference value="Patient/pas-ehds-context" />
        </author>
        <item>
          <linkId value="dental-anxiety" />
          <text value="Dental anxiety reported by patient" />
          <answer>
            <valueString value="Needs extra explanation before local anesthesia." />
          </answer>
        </item>
      </QuestionnaireResponse>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://novari.no/fhir/digidot/example/ServiceRequest/sr-treatment-with-critical-context" />
    <resource>
      <ServiceRequest>
        <id value="sr-treatment-with-critical-context" />
        <meta>
          <profile value="https://novari.no/fhir/digidot/StructureDefinition/digidot-ServiceRequest-no" />
        </meta>
        <identifier>
          <system value="urn:novari:example:service-request" />
          <value value="sr-treatment-with-critical-context" />
        </identifier>
        <status value="active" />
        <intent value="plan" />
        <category>
          <coding>
            <system value="https://novari.no/fhir/digidot/CodeSystem/digidot-service-request-category" />
            <code value="dental-treatment" />
            <display value="Dental treatment" />
          </coding>
          <text value="Dental treatment request" />
        </category>
        <code>
          <coding>
            <system value="http://snomed.info/sct" />
            <version value="http://snomed.info/sct/51000202101/version/20260715" />
            <code value="234789004" />
            <display value="Insertion of composite restoration into tooth" />
          </coding>
          <coding>
            <system value="http://snomed.info/sct" />
            <version value="http://snomed.info/sct/51000202101/version/20260715" />
            <code value="234789004:{363704007=866006002}" />
          </coding>
          <text value="Restoration with allergy and critical information context" />
        </code>
        <subject>
          <reference value="Patient/pas-ehds-context" />
        </subject>
        <authoredOn value="2026-07-31" />
        <requester>
          <reference value="PractitionerRole/prr-ehds-dentist" />
        </requester>
        <performer>
          <reference value="PractitionerRole/prr-ehds-dentist" />
        </performer>
        <locationReference>
          <reference value="Location/loc-ehds-clinic-room" />
        </locationReference>
        <supportingInfo>
          <reference value="AllergyIntolerance/allergy-amoxicillin-critical" />
        </supportingInfo>
        <supportingInfo>
          <reference value="Flag/flag-critical-allergy" />
        </supportingInfo>
        <supportingInfo>
          <reference value="Consent/consent-treatment-limitation" />
        </supportingInfo>
        <supportingInfo>
          <reference value="DeviceUseStatement/deviceuse-pacemaker-context" />
        </supportingInfo>
        <supportingInfo>
          <reference value="QuestionnaireResponse/qr-dental-anamnesis" />
        </supportingInfo>
        <bodySite>
          <coding>
            <system value="http://snomed.info/sct" />
            <version value="http://snomed.info/sct/51000202101/version/20260715" />
            <code value="866006002" />
            <display value="Structure of permanent mandibular left first molar tooth" />
          </coding>
        </bodySite>
      </ServiceRequest>
    </resource>
  </entry>
  <entry>
    <fullUrl value="https://novari.no/fhir/digidot/example/Provenance/prov-critical-context-import" />
    <resource>
      <Provenance>
        <id value="prov-critical-context-import" />
        <target>
          <reference value="AllergyIntolerance/allergy-amoxicillin-critical" />
        </target>
        <target>
          <reference value="Flag/flag-critical-allergy" />
        </target>
        <target>
          <reference value="Consent/consent-treatment-limitation" />
        </target>
        <target>
          <reference value="DeviceUseStatement/deviceuse-pacemaker-context" />
        </target>
        <recorded value="2026-07-31T09:40:00+02:00" />
        <activity>
          <coding>
            <system value="http://terminology.hl7.org/CodeSystem/v3-DataOperation" />
            <code value="TRANS" />
            <display value="Transform" />
          </coding>
        </activity>
        <agent>
          <type>
            <text value="Integration orchestrator" />
          </type>
          <who>
            <display value="DigiDOT Patient Context API" />
          </who>
        </agent>
        <entity>
          <role value="source" />
          <what>
            <display value="Kjernejournal critical information FHIR API" />
          </what>
        </entity>
      </Provenance>
    </resource>
  </entry>
</Bundle>