How to Anonymize and de-Anonymize Patient Details?


Is there a way to anonymize and de-anonymize patatient details in orthanc using python?


You can anonymize data by calling the REST API of Orthanc, which can evidently be done from a Python script:

Regarding “de-anonymization”, the purpose of anonymization is precisely to be non-reversible. You’ll have to modify the anonymized study by yourself, depending on the re-identification information available elsewhere:


Sorry this will be absolutely no help from a technical point of view but just to clarify terminology if you pursue question further. Anonymization is as Sébastien indicated designed to be irreversible. What you want to do in this case is normally referred to as pseudonymization which means you alter data enough that it does not allow patient to be identified but by use of separate data can be re-identified when needed. Usually it means keeping a separate key somewhere secure to allow reverting. Not sure if Orthanc has this built in but figured I would throw in the terminology again in case you decide to keep digging for possible solution.

Best Regards,