<?xml version="1.0" encoding="UTF-8"?>

  <!--  could include an .entity of the patient if possible  -->
<AuditEvent xmlns="http://hl7.org/fhir">
  <id value="example-search"/>
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/audit-event-type"/>
      <code value="rest"/>
      <display value="Restful Operation"/>
    </coding>
  </type>
  <subtype>
    <coding>
      <system value="http://hl7.org/fhir/restful-interaction"/>
      <code value="search"/>
      <display value="search"/>
    </coding>
  </subtype>
  <action value="E"/>
  <recorded value="2015-08-22T23:42:24Z"/>
  <outcome>
    <code>
      <system value="http://terminology.hl7.org/CodeSystem/audit-event-outcome"/>
      <code value="0"/>
      <display value="Success"/>
    </code>
  </outcome>
  <agent>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/extra-security-role-type"/>
        <code value="humanuser"/>
        <display value="human user"/>
      </coding>
    </type>
    <who>
      <identifier>
        <value value="95"/>
      </identifier>
      <display value="Grahame Grieve"/>
    </who>
    <requestor value="true"/>
  </agent>
  <agent>
    <!--  Source active participant, the software making the . AlternativeUserId - Process ID  -->
    <extension url="http://hl7.org/fhir/StructureDefinition/auditevent-AlternativeUserID">
      <valueIdentifier>
        <type>
          <text value="process ID"/>
        </type>
        <value value="6580"/>
      </valueIdentifier>
    </extension>
    <type>
      <coding>
        <system value="http://dicom.nema.org/resources/ontology/DCM"/>
        <code value="110153"/>
        <display value="Source Role ID"/>
      </coding>
    </type>
    <who>
      <identifier>
        <system value="urn:oid:2.16.840.1.113883.4.2"/>
        <value value="2.16.840.1.113883.4.2"/>
      </identifier>
    </who>
    <requestor value="false"/>
    <networkString value="Workstation1.ehr.familyclinic.com"/>
  </agent>
  <source>
    <observer>
      <display value="hl7connect.healthintersections.com.au"/>
    </observer>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/security-source-type"/>
        <code value="3"/>
        <display value="Web Server"/>
      </coding>
    </type>
  </source>
  <entity>
    <!--  HTTP GET encoded in base64Binary  -->
    <!--  orignal example encoded here is  -->
    <!--  "http://fhir-dev.healthintersections.com.au/open/Encounter?participant=13"  -->
    <role>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/object-role"/>
        <code value="24"/>
        <display value="Query"/>
      </coding>
    </role>
    <description value="http://fhir-dev.healthintersections.com.au/open/Encounter?participant=13"/>
    <query value="aHR0cDovL2ZoaXItZGV2LmhlYWx0aGludGVyc2VjdGlvbnMuY29tLmF1L29wZW4vRW5jb3VudGVyP3BhcnRpY2lwYW50PTEz"/>
  </entity>
</AuditEvent>