Skip to content

Conversation

@dmendelowitz
Copy link
Contributor

Summary

Since the MRN is used as an ID on the patient resource, it appears as a reference in other resources. Now when masking the MRN, all of those references will also be masked by replacing the MRN with a hash of the MRN after extraction is completed.

New behavior

If the MRN is specified as a field to be masked, in addition to masking the MRN in the Patient resource, there is an additional masking step after extraction is finished. All references to the MRN as an ID will be replaced by a hashed version of the MRN. Right now, the only places I found the MRN being used as an ID are in the id and fullUrl fields of the Patient resource and 'subject' and 'individual' objects in other resources.

Code changes

  • patientUtils.js now has a maskMRN function that takes a bundle as input, modifies the bundle to replace the MRN with a hashed version as the ID of the Patient resource, and then replaces every reference in other resources with the same hash
  • app.js will check the config to see if the MRN needs to be masked and will perform the masking after extraction is completed
  • patientUtils.test.js now contains tests for the maskMRN function

Testing guidance

  • Run the program with "mask": ["mrn"] in the constructorArgs of the patient extractor
  • Make sure that when MRN is specified to be masked, there are now no references to the MRN anywhere in the output bundle
  • Check to see if the MRN is used in any locations that I missed
  • Make sure all tests pass and the program runs as expected

@Dtphelan1 Dtphelan1 changed the base branch from master to develop March 29, 2021 13:27
@mgramigna mgramigna self-assigned this Mar 29, 2021
Copy link
Contributor

@mgramigna mgramigna left a comment

Choose a reason for hiding this comment

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

Overall the masking changes work/look great! I just have a few small comments and suggestions that I made inline

Copy link
Contributor

@mgramigna mgramigna left a comment

Choose a reason for hiding this comment

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

Looks great!

@julianxcarter julianxcarter self-assigned this Mar 29, 2021
Copy link
Contributor

@julianxcarter julianxcarter left a comment

Choose a reason for hiding this comment

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

Looks good to me and works well. Nice job!

@julianxcarter julianxcarter merged commit 45af086 into develop Mar 29, 2021
@julianxcarter julianxcarter deleted the mask-mrn-references branch March 29, 2021 20:21
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.

4 participants