Records
Every record is hashed over its study, subject, form and version, visit, date, sequence number, who entered it and when, its source, and the values as first entered, with the hash of the record before it. Change one answer, one date or one name, and that record stops matching. Re-hash it to hide the change, and the next record no longer points at it.
Audit trail
Every create, change, signature, export and sign-in is an entry with its actor, before and after values, reason and time, hashed together with the entry before it. Corrections never overwrite: they add an entry, and the record keeps every version.
The lock
Locking a study signs one fingerprint over every record, consent and signature made before it. A record added, removed or re-hashed after the lock changes the fingerprint, and the export says so.
Where the export comes from: a study’s Settings, then Exports, then JSON bundle. Owner names and contact details are left out unless an identifying export is asked for, with a reason, and that request is on the audit trail too.