Redacted tag values are completely removed.
Set up the de-identification function
Adjust the de-identification function found here to suit your needs.De-identifying
The Python code below is used to add criteria and call the de-identification function.Setting evaluation criteria
Evaluation criteria are conditions that determine whether a file will be de-identified or not. Criteria can take many forms, but will always return either ‘true’ or ‘false’.All strings and inputs into the criteria functions are case-insensitive.
- “SaveDeidentifiedDicomConditionNotSubstr” will return ‘true’ if the first argument (PRIMARY in the example above), is not contained in the second argument (ImageType in the example above). In plain English, the example above checks whether the file’s ImageType doesn’t contain the word ‘Primary’, and returns ‘true’ if this condition is fulfilled.
- “SaveDeidentifiedDicomConditionIn” will return ‘true’ if the first argument ([“ct”,“pt”,“nm”,“mr”,“mg”,“pt”] in the example above) is contained in the second argument Modality. In plain English, the example above checks whether any of the strings contained in the list are contained within the file’s Modality. If any one of them is, the function returns ‘true’.
Output
This section will explain the output of the de-identification function. Click the dropdown below to see a sample output file Sample JSON
Sample JSON

