<AuditEvent xmlns="http://hl7.org/fhir">
  <id value="atc-doc-create-rep-pat"/>
  <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>
    <userId>
      <system value="urn:oid:2.16.756.5.30.1.127.3.10.3"/>
      <value value="761322222222222222"/>
    </userId>
    <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>