-
Notifications
You must be signed in to change notification settings - Fork 2
Mask MRN when used as the ID of a Patient resource #98
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
Conversation
mgramigna
left a comment
There was a problem hiding this 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
Co-authored-by: Matthew Gramigna <[email protected]>
Co-authored-by: Matthew Gramigna <[email protected]>
mgramigna
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
julianxcarter
left a comment
There was a problem hiding this 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!
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
idandfullUrlfields of the Patient resource and 'subject' and 'individual' objects in other resources.Code changes
patientUtils.jsnow has amaskMRNfunction 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 hashapp.jswill check the config to see if the MRN needs to be masked and will perform the masking after extraction is completedpatientUtils.test.jsnow contains tests for themaskMRNfunctionTesting guidance
"mask": ["mrn"]in theconstructorArgsof the patient extractor