<Bundle xmlns="http://hl7.org/fhir">
  <id value="ch-atc-iti-81-response-sample"/>
  <meta>
    <profile
             value="http://fhir.ch/ig/ch-atc/StructureDefinition/CH-ATC.ITI-81.Response"/>
  </meta>
  <type value="searchset"/>
  <total value="3"/>
  <entry>
    <fullUrl value="http://test.fhir.org/r3/AuditEvent/48901"/>
    <resource>
      <AuditEvent>
        <id value="48901"/>
      <!--         
        <meta>
          <profile value="http://fhir.ch/ig/ch-atc/StructureDefinition/DocumentAuditEvent" />
        </meta>
 -->
        <text>
          <status value="generated"/>
          <div xmlns="http://www.w3.org/1999/xhtml">Upload of Birth certificate 10.10.2020 18:29 from Julia Helfe-Gern on behalf of Jakob Wieder-Gesund 
          </div>
        </text>
        <type>
          <system value="http://dicom.nema.org/resources/ontology/DCM"/>
          <code value="110106"/>
          <display value="Export"/>
        </type>
        <subtype>
          <system value="urn:oid:2.16.756.5.30.1.127.3.10.7"/>
          <code value="ATC_DOC_CREATE"/>
          <display value="Document upload"/>
        </subtype>
        <action value="C"/>
        <recorded value="2020-10-10T16:29:00Z"/>
        <outcome value="0"/>
        <purposeOfEvent>
          <coding>
            <system value="urn:oid:2.16.756.5.30.1.127.3.10.5"/>
            <code value="NORM"/>
            <display value="Normal Access"/>
          </coding>
        </purposeOfEvent>
        <agent>
          <role>
            <coding>
              <system value="urn:oid:2.16.756.5.30.1.127.3.10.6"/>
              <code value="PAT"/>
              <display value="Patient"/>
            </coding>
          </role>
          <name value="Jakob Wieder-Gesund"/>
          <requestor value="false"/>
        </agent>
        <agent>
          <role>
            <coding>
              <system value="urn:oid:2.16.756.5.30.1.127.3.10.6"/>
              <code value="REP"/>
              <display value="Representative"/>
            </coding>
          </role>
          <name value="Julia Helfe Gern"/>
          <requestor value="true"/>
        </agent>
        <source>
          <identifier>
            <system value="urn:ietf:rfc:3986"/>
          <!-- oid of system generating this audit event -->
            <value value="urn:oid:7.8.9.10.11"/>
          </identifier>
        </source>
        <entity>
        <!-- Patient -->
          <identifier>
            <system value="urn:oid:2.16.756.5.30.1.127.3.10.3"/>
            <value value="761337610469261945"/>
          </identifier>
          <type>
            <system value="http://hl7.org/fhir/audit-entity-type"/>
            <code value="1"/>
            <display value="Person"/>
          </type>
          <role>
            <system value="http://hl7.org/fhir/object-role"/>
            <code value="1"/>
            <display value="Patient"/>
          </role>
        </entity>
        <entity>
        <!-- Document -->
          <identifier>
            <type>
              <coding>
                <system value="urn:uuid:2e82c1f6-a085-4c72-9da3-8640a32e42ab"/>
                <code value="IHE XDS Metadata"/>
                <display value="XDSDocumentEntry.uniqueId"/>
              </coding>
            </type>
            <system value="urn:ietf:rfc:3986"/>
            <value value="urn:oid:1.2.3.4.5"/>
          </identifier>
          <type>
            <system value="http://hl7.org/fhir/audit-entity-type"/>
            <code value="2"/>
            <display value="System Object"/>
          </type>
          <role>
            <system value="http://hl7.org/fhir/object-role"/>
            <code value="3"/>
            <display value="Report"/>
          </role>
        <!-- base64 of OID eg 1.2.3 == -->
          <detail>
            <type value="Repository Unique Id"/>
            <value value="MS4yLjM="/>
          </detail>
        <!-- base64 of OID URN homeCommunityId e.g. 5.6.7.8 -->
          <detail>
            <type value="homeCommunityID"/>
            <value value="NS42LjcuOA=="/>
          </detail>
        <!-- base64 typeCode 444561001 -->
          <detail>
            <type value="EprDocumentTypeCode"/>
            <value value="NDQ0NTYxMDAx"/>
          </detail>
        </entity>
      </AuditEvent>
    </resource>
    <search>
      <mode value="match"/>
    </search>
  </entry>
  <entry>
    <fullUrl value="http://test.fhir.org/r3/AuditEvent/48904"/>
    <resource>
      <AuditEvent>
        <id value="48904"/>
      <!--         
        <meta>
          <versionId value="1"/>
          <lastUpdated value="2018-06-09T15:51:41Z"/>
          <profile value="http://fhir.ch/ig/ch-atc/StructureDefinition/AccessAuditTrailEvent"/>
        </meta>
 -->
        <text>
          <status value="generated"/>
          <div xmlns="http://www.w3.org/1999/xhtml">Jakob Wieder-Gesund has viewed the audit trail 22.09.2020 10:47 
          </div>
        </text>
        <type>
          <system value="http://dicom.nema.org/resources/ontology/DCM"/>
          <code value="110106"/>
          <display value="Export"/>
        </type>
        <subtype>
          <system value="urn:oid:2.16.756.5.30.1.127.3.10.7"/>
          <code value="ATC_LOG_READ"/>
          <display value="Accessing the Patient Audit Record Repository"/>
        </subtype>
        <action value="C"/>
        <recorded value="2020-09-22T08:47:00Z"/>
        <outcome value="0"/>
        <agent>
          <role>
            <coding>
              <system value="urn:oid:2.16.756.5.30.1.127.3.10.6"/>
              <code value="PAT"/>
              <display value="Patient"/>
            </coding>
          </role>
          <name value="Jakob Wieder-Gesund"/>
          <requestor value="true"/>
        </agent>
        <source>
          <identifier>
            <system value="urn:ietf:rfc:3986"/>
          <!-- oid of system generating this audit event -->
            <value value="urn:oid:7.8.9.10.11"/>
          </identifier>
        </source>
        <entity>
        <!-- Patient -->
          <identifier>
            <system value="urn:oid:2.16.756.5.30.1.127.3.10.3"/>
            <value value="761337610469261945"/>
          </identifier>
          <type>
            <system value="http://hl7.org/fhir/audit-entity-type"/>
            <code value="1"/>
            <display value="Person"/>
          </type>
          <role>
            <system value="http://hl7.org/fhir/object-role"/>
            <code value="1"/>
            <display value="Patient"/>
          </role>
        </entity>
      </AuditEvent>
    </resource>
    <search>
      <mode value="match"/>
    </search>
  </entry>
  <entry>
    <fullUrl value="http://test.fhir.org/r3/AuditEvent/48914"/>
    <resource>
      <AuditEvent>
        <id value="48914"/>
      <!--     
    <meta>
        <profile value="http://fhir.ch/ig/ch-atc/StructureDefinition/PolicyAuditEvent" />
    </meta>
 -->
        <text>
          <status value="generated"/>
          <div xmlns="http://www.w3.org/1999/xhtml">22.09.2020 09:47: Jakob Wieder-Gesund created Access Level delegation-and-restricted till 31.12.2020 08:00 to Dr. med. Hans Allzeitbereit
          </div>
        </text>
        <type>
          <system value="http://dicom.nema.org/resources/ontology/DCM"/>
          <code value="110106"/>
          <display value="Export"/>
        </type>
        <subtype>
          <system value="urn:oid:2.16.756.5.30.1.127.3.10.7"/>
          <code value="ATC_POL_CREATE_AUT_PART_AL"/>
          <display value="Authorize participants to access level/date"/>
        </subtype>
        <action value="C"/>
        <recorded value="2020-10-09T07:47:00Z"/>
        <outcome value="0"/>
        <agent>
          <role>
            <coding>
              <system value="urn:oid:2.16.756.5.30.1.127.3.10.6"/>
              <code value="PAT"/>
              <display value="Patient"/>
            </coding>
          </role>
          <name value="Jakob Wieder-Gesund"/>
          <requestor value="true"/>
        </agent>
        <source>
          <identifier>
            <system value="urn:ietf:rfc:3986"/>
          <!--  oid of system generating this audit event  -->
            <value value="urn:oid:7.8.9.10.12"/>
          </identifier>
        </source>
        <entity>
        <!--  Patient  -->
          <identifier>
            <system value="urn:oid:2.16.756.5.30.1.127.3.10.3"/>
            <value value="761337610469261945"/>
          </identifier>
          <type>
            <system value="http://hl7.org/fhir/audit-entity-type"/>
            <code value="1"/>
            <display value="Person"/>
          </type>
          <role>
            <system value="http://hl7.org/fhir/object-role"/>
            <code value="1"/>
            <display value="Patient"/>
          </role>
        </entity>
        <entity>
        <!--  Resource  -->
          <identifier>
            <system value="urn:oid:2.51.1.3"/>
            <value value="7601000234438"/>
          </identifier>
          <type>
            <system value="http://hl7.org/fhir/audit-entity-type"/>
            <code value="2"/>
            <display value="System Object"/>
          </type>
          <role>
            <system value="urn:oid:2.16.756.5.30.1.127.3.10.6"/>
            <code value="HCP"/>
            <display value="Healthcare professional"/>
          </role>
          <name value="Dr. med. Hans Allzeitbereit"/>
        <!--  base64 of urn:e-health-suisse:2015:policies:access-level:delegation-and-restricted  -->
          <detail>
            <type value="AccessLevel"/>
            <value
                   value="dXJuOmUtaGVhbHRoLXN1aXNzZToyMDE1OnBvbGljaWVzOmFjY2Vzcy1sZXZlbDpkZWxlZ2F0aW9uLWFuZC1yZXN0cmljdGVk"/>
          </detail>
        <!--  base64 of 2020-12-31T08:00:00Z  -->
          <detail>
            <type value="AccessLimitedToDate"/>
            <value value="MjAyMC0xMi0zMVQwODowMDowMFo="/>
          </detail>
        </entity>
      </AuditEvent>
    </resource>
    <search>
      <mode value="match"/>
    </search>
  </entry>
</Bundle>