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

Minor changes #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

drcandacemakedamoore
Copy link

adding a colon, noting something that could be pulled out of a loop (i moved it because it's computationally expensive!), and describing my plan

src/Anon.ts Outdated
@@ -34,6 +34,7 @@ export default function anonymize(dict) {
for(const key of Object.keys(dict)) {
// Use default action or action specified in policy
var rule = policy["default"];
//what happens if key is not in policy? ???
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rule is initially set to the default policy (the preceding line).

If there's a policy for that specific key, we use that instead.

src/Anon.ts Outdated
// TODO: Test that there's no personal data stored outside the "Value" for a
// given tag. This should be the case, and we're making the assumption that the
// user is not maliciously trying to hide data.
export default function anonymize(dict) {
var newDict = {};
for(const key of Object.keys(dict)) {
// Use default action or action specified in policy
//CONSIDER MOVING NEXT LINE OUTSIDE THE LOOP! (CMHM)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to reset rule to the default policy for each loop iteration - otherwise, the policy rule for the previous field would be used if none were defined.

// OBVIOUSLY I NEED TO CHECK that CT and MRI are not hashed or encoded or entered as Numbers or , or or,or
// // "00080016": {"action":"keep", "description":"SOP Class UID"},
// The following are additional fields to check:
// "00080060": { "description":"Modality"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is listed in the default set of policies at https://github.com/radiopaedia/dicomanon/blob/master/src/DefaultPolicy.ts#L9

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

Successfully merging this pull request may close these issues.

2 participants