chop-dbhi / dicom-anon

Python DICOM Anonymizer
BSD 2-Clause "Simplified" License
66 stars 22 forks source link

Question: is it possible to anonymize the Patient's ID with a specific ID (ie. enconding) #26

Closed rmsandu closed 5 years ago

jeffmax commented 5 years ago

@raluca-san do you mean pre specify a mapping from identified patient id -> specific de-identified id for all patient ids prior to calling dicom-anon?

rmsandu commented 5 years ago

yes. I am going to re-phrase it,

so, when calling dicom_anon.py could I specify a specific patient_id/patient_name in the --spec/ opts?

jeffmax commented 5 years ago

Sorry for the late response, I was thinking that it might be possible to pre-populate the identity sqlite database with the mapping by creating the "patientid" table, but I don't think it would work because it is dependent on the study_ui_pk (https://github.com/chop-dbhi/dicom-anon/blob/master/dicom_anon.py#L433). It looks like this is not possible without modifying the code or replacing the patient ids with the mapped values prior to running the anonymizer and using a custom spec_file.