<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="NHSEngland-AuditEvent-GenomicsPARS" />
  <url value="https://fhir.nhs.uk/StructureDefinition/NHSEngland-AuditEvent-GenomicsPARS" />
  <version value="0.3.0" />
  <name value="NHSEngland_AuditEvent_GenomicsPARS" />
  <title value="NHSEngland AuditEvent GenomicsPARS" />
  <status value="active" />
  <date value="2026-04-16" />
  <publisher value="NHS England" />
  <contact>
    <name value="NHS England" />
    <telecom>
      <system value="email" />
      <value value="interoperabilityteam@nhs.net" />
      <use value="work" />
      <rank value="1" />
    </telecom>
  </contact>
  <description value="This profile defines the Genomics constraints and extensions on the NHS England Patient Audit and Record Service FHIR resource [PARS AuditEvent](https://fhir.nhs.uk/England/StructureDefinition/England-AuditEvent-PARS)." />
  <purpose value="Created by the central GMS infrastructure on any CRUD event.&#xD;&#xA;&#xD;&#xA;Can be searched on for auditability and obtaining status history for Tasks (as an alternative to the Task _history option).&#xD;&#xA;&#xD;&#xA;It is not expected or permitted that a client system would update or post AuditEvents to the central service.&#xD;&#xA;&#xD;&#xA;AuditEvents are expected to be created for any CRUD events which affect resources on the server. Where resources do not exist on the server, e.g. empty SearchSets or failed POSTs, no AuditEvents will be created. Failed updates may still trigger creation of AuditEvent resources but the outcome.code will record that the event was unsuccessful.&#xD;&#xA;&#xD;&#xA;AuditEvents for resources created by the server will record the server identity within the who element.&#xD;&#xA;&#xD;&#xA;The below profile is therefore provided to support parsing for clients if returned through a GET request." />
  <copyright value="Copyright © 2026+ NHS England Licensed under the Apache License, Version 2.0 (the \\\&quot;License\\\&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \\\&quot;AS IS\\\&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at  https://www.hl7.org/fhir/license.html." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="AuditEvent" />
  <baseDefinition value="https://fhir.nhs.uk/England/StructureDefinition/England-AuditEvent-PARS" />
  <derivation value="constraint" />
  <differential>
    <element id="AuditEvent.action">
      <path value="AuditEvent.action" />
      <definition value="SHALL be present. Code from base HL7 resource, only C (create), R (read) and U (update) would usually be expected." />
    </element>
    <element id="AuditEvent.agent">
      <path value="AuditEvent.agent" />
      <definition value="SHOULD be present for any user initiated actions. Reference to the user or system that triggered the creation/read/update. Identity SHOULD be determined through the appropriate authentication token within the request header, e.g. CIS2 auth token." />
    </element>
    <element id="AuditEvent.entity">
      <path value="AuditEvent.entity" />
      <definition value="SHOULD be present where the resource exists on the server. Reference to the resource which was affected by the event." />
    </element>
  </differential>
</StructureDefinition>