Source: https://quadevs.com/insights/fhir-auditevent/

Title: FHIR AuditEvent: an audit trail built for review | quadevs

[Home](https://quadevs.com/)/ [Insights](https://quadevs.com/insights/)/ FHIR AuditEvent: an audit trail that passes review

# FHIR AuditEvent: an audit trail that passes review

AuditEvent records who touched which resource, when and under which authority. Many teams find its gaps during an info-blocking review, the costliest moment to find them.

Published 2026-08-27 Updated 2026-11-16 7 min read

**FHIR AuditEvent** is the resource that records security-relevant activity on a FHIR server: who accessed what, when, from where, with which outcome and under which authority. It is the FHIR way to build the access trail that HIPAA audit controls, info-blocking reviews and partner security assessments all examine.

Many teams discover the requirements in reverse order: an external review finds that the trail cannot answer basic questions, and the fixes turn out to be architectural. That was the state of the platform before we built its [FHIR interoperability layer](https://quadevs.com/case/fhir-tefca-uscdi/). PHI appeared in the logs of three subsystems, and reads were not tied to the consent that allowed them. The rebuilt audit layer passed the next external review with no remediation, because the trail was designed as a system of its own.

## What AuditEvent records

An AuditEvent instance holds a security event as structured data: the action type and subtype (read, create, update, query, export), the outcome, the time, the agents involved (user, app, system, network address), the source that reported it and the entities touched, usually references to the resources read or written.

Because actor, action, entity and time are fields, "who read this record" becomes a query. Application logs can answer the same question only after a long search and with some luck. The structure also lets partners and review tools consume your trail without learning a private log format.

Three rules keep the resource useful. Record reads as well as writes, including searches that returned nothing, since access reviews care mostly about reads. Record failures, because a denied request is often the most telling security event. And record system actors: batch jobs and background services touch more PHI than any person, so a trail limited to interactive users is incomplete.

## AuditEvent vs Provenance

FHIR has two resources with similar names. **AuditEvent** records access, meaning who touched a resource. **Provenance** records origin, meaning where a resource came from and what changed it. An Observation imported from a partner EHR should carry a Provenance saying so, and each later read of that Observation should produce an AuditEvent.

Different reviewers use them. A data-quality investigation follows Provenance to learn why a value looks the way it does; a security review follows AuditEvents to learn who saw it. A complete platform emits both. If the work has to be sequenced, start with AuditEvent, since review findings nearly always concern access.

Each read and write produces an AuditEvent that references its authorizing Consent; hash links make any edit visible.

## Linking access to Consent

A complete trail ties every access to the authority that allowed it. On a FHIR server that authority can be a Consent resource, and the AuditEvent for a read can reference the Consent under which it was permitted.

With that link, "show every access to this patient's record and the basis for each" is a join. It also changes code upstream: if writing an audit event requires naming the consent, the authorization logic must actually find one, and requests that ran on assumption become visible. On our platform the external review checked exactly this property, every read and write scoped to its Consent.

## Keeping PHI out of the trail

An audit trail must prove access to sensitive data without holding a copy of it. A trail that quotes names, diagnoses or document text is a PHI store in its own right, with retention, access control and breach exposure to match, and it is usually readable by more internal staff than the data it describes.

The answer is to store references. Entities point to resources by opaque ID, a generated request ID ties related events together, and the actor is a user or client identifier. Enforce this in code: in our build a redaction filter sits in the log enricher, so PHI cannot reach a log line even when a developer forgets a rule.

The same applies outside the FHIR server. Our [HIPAA audited file proxy](https://quadevs.com/case/hipaa-file-proxy/) writes one record per read, expiry and token use, and our [automated reporting system](https://quadevs.com/case/medical-reporting/) records who generated which report from which source query, in both cases without copying patient content into the log.

## Tamper evidence and replay

A trail that can be edited without a trace proves little. Hash-linking fixes that cheaply: each record carries the hash of the one before it, so any change or deletion breaks the chain, and the chain lives in write-once (WORM) storage. To alter one event, an attacker would have to rewrite every later record in storage built to refuse rewrites.

The chain also has to be exercised. We replay it in CI on every release, so each build proves the history still verifies end to end. HIPAA controls that are never tested decay like any other untested code.

The decisions are few: structured events, reads and writes both recorded, consent links, references in place of content, hash-linked storage and replay in CI. Taken early, each is a small design choice; taken during a review, each becomes a migration. The standards around this trail are covered in [TEFCA vs FHIR](https://quadevs.com/insights/tefca-vs-fhir/) and [USCDI and FHIR](https://quadevs.com/insights/uscdi-and-fhir/).

1. [What AuditEvent records](https://quadevs.com/insights/fhir-auditevent/#what-auditevent-records)
2. [AuditEvent vs Provenance](https://quadevs.com/insights/fhir-auditevent/#auditevent-vs-provenance)
3. [Linking access to Consent](https://quadevs.com/insights/fhir-auditevent/#consent-linkage)
4. [Keeping PHI out of the trail](https://quadevs.com/insights/fhir-auditevent/#phi-free-logging)
5. [Tamper evidence and replay](https://quadevs.com/insights/fhir-auditevent/#tamper-evidence)

## Common questions

Is AuditEvent required for HIPAA compliance?

HIPAA requires audit controls without naming a resource. On a FHIR server, AuditEvent is the native way to meet that requirement, and the same trail serves debugging and forensics in a format reviewers and partners already read.

   How is AuditEvent different from Provenance?

AuditEvent records access: who read or wrote a resource and when. Provenance records origin: where a resource came from and what transformed it. A complete platform emits both, and review findings usually concern AuditEvent.

   Should audit logs contain PHI?

No. The trail proves access through opaque resource IDs, request IDs, actor identities and the Consent reference. On our FHIR platform a redaction filter in the log enricher keeps PHI out of every log line, which also makes the chain safe to retain and replay.

   What does tamper-evident mean for an audit trail?

Each event carries the hash of the previous one, so an edit or deletion breaks the chain where anyone can see it. Store the chain in write-once storage and replay it in CI, and the trail stays verifiable between audits.

## We built this in production

[### FHIR · TEFCA · USCDI integration

Healthcare · interop  FHIR R4 · SMART v2.1 · TEFCA · USCDI v3 · Da Vinci · CARIN BB · US Core View case](https://quadevs.com/case/fhir-tefca-uscdi/)   [### HIPAA audited file proxy

Healthcare · secure delivery  .NET · token auth · audit log View case](https://quadevs.com/case/hipaa-file-proxy/)   [### Automated medical reporting

Healthcare · reporting  .NET · PDF · LeadTools · MSSQL View case](https://quadevs.com/case/medical-reporting/)

## Keep reading

[### TEFCA vs FHIR: what each one does

 Interop · 8 min read Read](https://quadevs.com/insights/tefca-vs-fhir/)   [### USCDI and FHIR: data classes and the API that carries them

 Interop · 8 min read Read](https://quadevs.com/insights/uscdi-and-fhir/)

Service [TEFCA and FHIR integration](https://quadevs.com/healthcare/fhir-tefca-integration/)

Practice [Healthcare software development](https://quadevs.com/healthcare/)

[Send a brief. Reply within 1 business day](https://quadevs.com/contact/)  [or email hello@quadevs.com](mailto:hello@quadevs.com)
