Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement "Clean" rule type #163

Open
naglepuff opened this issue Oct 3, 2023 · 1 comment
Open

Implement "Clean" rule type #163

naglepuff opened this issue Oct 3, 2023 · 1 comment
Assignees

Comments

@naglepuff
Copy link
Collaborator

This type of redaction action is mentioned here: https://dicom.nema.org/dicom/2013/output/chtml/part15/chapter_E.html#table_E.1-1

It could be useful to allow for different redaction levels. Having a redaction method that scrubs identifying information but replaces data with a similar value would help to enable that.

@naglepuff naglepuff self-assigned this Dec 17, 2024
@naglepuff
Copy link
Collaborator Author

This type of redaction was introduced specifically for date values in #235.

In order to expand on this type of functionality, we could leverage the system of redaction profiles and rule types.

For dates, a new rule type was introduced:

class ModifyDateRule(_Rule):
    action: Literal["modify_date"]

as well as code that handles actually replacing the old data (precise date) with new data (a fuzzy date):

def _get_modified_date(self, element: DataElement) -> str | None:
	...

This could be generalized to apply to different value representations present in the DICOM standard, or analogs could be implemented for other use cases. The MetadataReplaceRule also exists as a tool that can serve implementing additional "clean" redaction profiles.

One approach to implementing the "Clean Desc. Option" from this table would be to create a rule set called e.g. clean_description_rules.yaml which uses either a new rule type or an existing rule type to replace the values as described in the linked document.

This ruleset should contain a rule for each attribute with a "C" in the cell in the "Clean Desc. Option" column. It can be used as a new profile, and also as a reference for end users who need more fine tuning for this type of redaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant