The short answer
Picture asking your EHR’s log what an AI tool changed in a chart, and getting back only screens opened and notes signed. EHR audit logs were built to answer who looked at a chart, not what an automated tool meant to do. When AI tools act in the record, the log needs both what was intended and what actually changed.
An EHR audit log, also called an event log, captures and timestamps users’ detailed interactions with the record while they’re logged in: which screen they opened, which note they viewed, which order they signed.2 It was originally designed to support access control, to answer “who looked at this chart?”.1 Researchers have since used it to study how clinicians spend their time, how care teams work together and how workflows unfold.
A 2020 systematic review of 85 such studies found the data powerful and the methods inconsistent: only 22% of studies validated their measures, and only 11% against direct observation.1 That gap matters more as AI agents start acting in the record. A log of clicks says what happened in the interface. For an agent, you also need what it was asked to do, what decided it could, and what actually changed.
Deedglass
A sealed record you can check offline
Record 1043
- What ran
- Medication order, Bed 12
- Approved by
- Dr. N. Shah
- Check
- Matches
- Time
- 09:12
- The request
- Not keptA fingerprint only: 77d2…c41a
Each record is linked to the one before
- Record 1041
- Record 1042
- Record 1043
What an audit log captures
The commentary that called audit logs “a new goldmine” for health services research describes them as a by-product of EHR adoption: granular, timestamped user activity that offers insights claims and clinical data can’t.2 Typical entries look like this:
| Field | Example |
|---|---|
| Time | 2026-10-26 09:14:03 |
| User | Dr. A, role physician |
| Patient | MRN 123456 |
| Action | Viewed problem list |
| Context | Workstation, department |
The FHIR standard has a resource for the same purpose. AuditEvent is defined as a record of an event made for maintaining a security log, with required elements for the event type, the recording time, the agent and the reporting source.3 ISO 27789 sets a minimum for health record audit trails: identify the user, the subject of care, the function performed and the time.4 In the US, HIPAA’s Security Rule requires audit controls that record and examine activity in systems containing electronic health information.5
What researchers did with them
The 2020 review by Rule, Chiang and Hribar sorted the 85 studies’ aims into examining EHR use, care team dynamics and clinical workflows, and found six recurring measures:1
- Counts of actions the log captured directly, such as “problem list viewed”.
- Counts of higher-level activities that researchers inferred, such as “chart review”.
- How long activities took.
- The order activities happened in.
- Clusters of activities that go together.
- Networks of which users work on the same records.
Measures like these let researchers ask questions that no survey answers well, such as how long a task really takes and in what order work happens. The goldmine framing is fair: the commentary argues these data offer insights claims and clinical data can’t.2
The measurement problem
The same review is blunt about the weaknesses. Preprocessing varied from study to study: how to filter out extraneous actions, how to map raw actions onto activities, how to read repeated actions or gaps.1 Only 19 studies (22%) validated their results, and only 9 (11%) by directly observing clinicians.1 Most didn’t describe their measures in enough detail to replicate.1
The root cause is that audit logs record interface events, not intentions. A gap of four minutes might be reading, a phone call, or a walk down the corridor. A “note viewed” event doesn’t say whether the note was read or the window was simply open. Researchers have to infer meaning, and different researchers infer differently.
When the user is an agent
AI agents and integrations increasingly read and write the record through APIs rather than screens. That changes what an audit log can tell you:
| Question | Human user, interface log | Agent, API log |
|---|---|---|
| Who acted? | The logged-in user | Often a service account |
| For whom? | Implicit: themselves | Usually lost unless recorded |
| What did they intend? | Inferred from clicks | Stated in the request, if kept |
| What allowed it? | Their role | A rule, an approval, or nothing |
| What actually changed? | Visible in the record | Needs checking; the request isn’t the result |
The table’s last three rows are where agents differ most. An agent’s intent is written down, in its tool call, which is better than inference from clicks, but only if someone keeps it. Approval is an event that matters and that interface logs weren’t built to hold. And a write that returned success may not have stored what was meant; our FHIR benchmark found that in 11 of 17 synthetic cases.
What to add for agent activity
For each agent action, keep alongside the usual audit entry:
- The service identity and the person it acted for. ISO 27789’s “user” needs both.4
- The request itself, or a digest of it, so intent isn’t inferred.
- The decision: the rule or approver that allowed it, or the refusal.
- The result as stored: the version id the server reported, and a read-back of it.
- Integrity protection on the log, so the agent’s own credentials can’t edit it.
FHIR gives you two places to put this: AuditEvent for the security log of each event, and Provenance for where each resource version came from. Our AuditEvent vs Provenance post shows both for one agent write, and HIPAA audit controls and AI agents lays out a field list.
A checklist
- Confirm agents have their own identities, not a shared integration account.
- Record on whose behalf each agent action ran.
- Keep the request and the decision, not only the event.
- Check results after writes and log the check.
- Protect the log from the actors it records; why logs aren’t evidence explains the difference.
- Document your measures if you analyse the logs, so others can replicate them.1
Nothing here is clinical; it’s about records. The audit trail for AI in healthcare entry gives the short version. To see actions recorded and checked on a real database in your browser, try the playground; to grade what an agent can reach on your machine, run npx deedglass scan (the grade, explained).
Written with AI assistance and checked against our claims register.