IDENTIFIERS = [ "PatientName", "PatientID", "PatientBirthDate", "PatientSex", "InstitutionName", "ReferringPhysicianName", "StudyDate", "StudyTime", "AccessionNumber" ] for tag in IDENTIFIERS: if tag in ds: ds[tag].value = "" # Records that an identity-removal process was performed. # This field alone does not make the dataset de-identified. ds.PatientIdentityRemoved = "YES"