Audit trail for AI in healthcare

Last checked · 3 min read

An audit trail for AI in healthcare is a lasting record of each action an AI system takes on health data. It shows what acted and for whom, which record it touched, which rule allowed it, who approved it, and what the system really saved. It is built so that changes show, and so an auditor can check it later.

What health standards already ask an audit trail to hold

Audit trails in health records are not new. ISO 27789:2021 is the second edition of the ISO standard on audit trails for electronic health records. It says each audit record should at least name the user, the patient, the action and the date and time.1 India’s EHR Standards say every action on health information, including viewing, should be recorded. They point to ISO 27789 for audit trails, and separately ask for SHA-256 or stronger hashing to protect data.2 The NABH Digital Health Standards include an element for a digital system that “captures the audit trails of each transaction”.3 In the US, the HIPAA Security Rule asks for audit controls that record and examine activity in systems that hold electronic protected health information (ePHI).4

Those rules were written with people in mind: a nurse opens a chart, a coder edits a claim. When the actor is an AI agent, the same questions need a few more answers.

What changes when the actor is an AI agent

  • Two actors, not one. An agent acts for someone: a clinician, a coder, a patient. The record has to name the agent, and the software key it used, and the person it acted for. Otherwise nobody can say later whose decision it was.
  • The agent’s summary isn’t the record. Agents report what they did in their own words. A pilot published in 2026 reviewed 356 notes drafted by an AI scribe that listens to the visit. It found omissions in 18% and made-up content in 11.5%, and 5.3% of notes held an error rated as a serious or immediate risk.5 That study is about clinical content, which a person has to review. The same caution applies to an agent’s report of its own writes.
  • Writes, not just suggestions. Epic says its AI Charting drafts the clinician’s note and “queues up orders”.6 Once agents put entries into orders, notes and claims, the trail needs to show who signed off before each one took effect.
  • What was saved. After a problem, the useful question is what the system holds now. A trail that records only the agent’s request can’t answer it. A trail that also records a read-back, or the database’s own change log, can.

Formats: AuditEvent, BALP and Provenance

FHIR has two resources for this. AuditEvent is “a record of an event made for purposes of maintaining a security log”.7 Provenance describes who and what took part in making a resource, with roles such as author, verifier and assembler.12 IHE’s Basic Audit Log Patterns (BALP) 1.1.4 set out how to use AuditEvent for create, read, update, delete and search, each with a version for a single patient.8 HL7’s AI Transparency on FHIR guide went to its first ballot in January 2026 and isn’t published yet. It adds an AI Provenance profile for marking data an AI system influenced.9

Six things to record for each agent action

  1. Who acted and for whom: the agent, its key, and the person it acted for.
  2. What it asked for: the tool, the kind of record and its id, and a fingerprint of the request.
  3. Which rule decided: allowed, refused or held, and why.
  4. Who approved: the named people, when, and what they saw.
  5. What the system saved: the check of the record after the write, and whether it matched.
  6. A seal: a signature and a link to the record before it, so a changed or missing entry shows.

What an audit trail can’t do

An audit trail records what passed through it. It doesn’t judge whether a dose, a code or a diagnosis was right. That stays with clinicians. It doesn’t see actions taken by other routes into the same system. And it should not become one more copy of patient data. Record ids and fingerprints, and keep any full requests for the shortest time that works (see PHI and health data).

An example

An agent's FHIR write as an R4 AuditEvent, digests instead of content (illustration)json
{
  "resourceType": "AuditEvent",
  "type": { "system": "http://terminology.hl7.org/CodeSystem/audit-event-type", "code": "rest" },
  "subtype": [{ "system": "http://hl7.org/fhir/restful-interaction", "code": "create" }],
  "action": "C",
  "recorded": "2026-10-19T09:14:07Z",
  "outcome": "0",
  "agent": [
    { "who": { "display": "triage-agent (OAuth client)" }, "requestor": false },
    { "who": { "display": "on behalf of usr_01j9…" }, "requestor": true }
  ],
  "source": { "observer": { "display": "gateway in front of the FHIR server" } },
  "entity": [
    { "what": { "reference": "Observation/4821/_history/1" } },
    { "detail": [{ "type": "request-digest", "valueString": "sha256:5b7a…" }] }
  ]
}

How Deedglass uses it

Deedglass seals a signed record of each action that anyone with the public key can check offline.10 The record holds ids, digests, decisions and times, not the request or the result.10 Each record also carries the check of what the system saved. Since v0.3.0, those records export as FHIR R4 AuditEvent, shaped to the IHE Basic Audit Log Patterns profiles, and Provenance, shaped to the HL7 AI Transparency on FHIR ballot's AI Provenance profile, with ids and digests instead of clinical content.11

Related on this site

Sources

  1. 1ISO 27789:2021, Health informatics: audit trails for electronic health records (summary page) · iso.org · checked 19 October 2026
  2. 2NRCeS: EHR Standards for India · nrces.in · checked 19 October 2026
  3. 3NABH: Digital Health Standards for Hospitals, 2nd Edition · nabh-portal-live.s3.ap-south-1.amazonaws.com · checked 19 October 2026
  4. 4eCFR: 45 CFR 164.312, Technical safeguards · ecfr.gov · checked 19 October 2026
  5. 5Taylor et al., JMIR Medical Informatics 2026: quality of clinical notes created by ambient listening generative AI · doi.org · checked 19 October 2026
  6. 6Epic: Epic AI Charting rolls out · epic.com · checked 19 October 2026
  7. 7HL7 FHIR R4: AuditEvent · hl7.org · checked 19 October 2026
  8. 8IHE: Basic Audit Log Patterns (BALP) 1.1.4 · profiles.ihe.net · checked 19 October 2026
  9. 9HL7: AI Transparency on FHIR (STU1 ballot) · hl7.org · checked 19 October 2026
  10. 10Deedglass docs: Records and the record chain · docs.deedglass.com · checked 19 October 2026
  11. 11Deedglass docs: Exports, records as FHIR AuditEvent and Provenance · docs.deedglass.com · checked 19 October 2026
  12. 12HL7 FHIR R4: Provenance · hl7.org · checked 19 October 2026

Last checked 19 October 2026. We re-check the glossary every month. If something here is wrong, write to hello@deedglass.com.