Why audit trails matter
An audit trail answers one question: who did what to which record, and when? In healthcare this supports patient trust, investigations of inappropriate access and the obligations in laws such as the DPDP Act and HIPAA. It is also what lets you tell a patient exactly who has seen their record.
What to record
- ✓Who: user ID, role and, for integrations, the system identity.
- ✓What: the action (view, create, update, delete, export, print) and the record or fields affected.
- ✓When: a trusted, synchronised timestamp.
- ✓Where from: device, IP address or service name.
- ✓Why: a stated reason for sensitive access, such as break-glass emergency access.
- ✓Consent events: consent given, changed or withdrawn, and data shared under it — including ABDM transfers. See the ABDM guide.
What not to record
Keep clinical content out of logs. Log identifiers and actions, not the diagnosis text. Debug logs that accidentally contain patient data are a common source of breaches.
Keeping logs trustworthy
- ✓Write logs to an append-only store separate from the application database.
- ✓Restrict who can read logs, and log access to the logs.
- ✓Consider hash chaining or signed batches so tampering is detectable.
- ✓Define retention periods that meet legal and operational needs, then delete on schedule.
- ✓Synchronise clocks across all systems.
Using the logs, not just storing them
- ✓Alert on unusual patterns: staff viewing records of colleagues or celebrities, large exports, access outside shift hours.
- ✓Offer patients an access report on request.
- ✓Review samples regularly and keep notes of what was checked.
Build it in from the start
Retrofitting audit trails is expensive. Plan the events during design, not after go-live. This is part of what we mean by privacy by design in our approach to security and compliance. The wider legal picture is in HIPAA vs DPDP vs GDPR.
Frequently asked questions
How long should audit logs be kept?
It depends on the laws and contracts that apply to you. Define a documented retention period and apply it consistently.
What is break-glass access?
A controlled way for authorised staff to access a record they normally could not in an emergency, with a mandatory reason and extra monitoring.
Should patients be able to see the audit trail?
Giving patients a report of who accessed their record builds trust and aligns with the transparency principles in modern privacy laws.
Need help with this in your hospital?
Tell us your systems and your goal. We'll map it to a scoped plan.
Talk to our team →This guide is general information for engineering and planning purposes. It is not legal advice, and regulations and specifications change; confirm current requirements with the relevant authority or qualified counsel.