Hashing identity solves this.
All of the data can be anonymized while retaining the linkage of measurements and procedures performed on the same subject.
e.g. We don't know who this guy is, but we do know that every measurement of him was linked to this same enormous random string.