Skip to content

Conversation

@dmendelowitz
Copy link
Contributor

Summary

The previous mask fields of 'gender' and 'birthSex' have been merged into a new 'genderAndSex' mask field which masks both as well as the legal sex and sex for clinical use fields used by Epic.

New behavior

Gender, birth sex, legal sex and sex for clinical use are now all masked by a single option, 'genderAndSex'

Code changes

  • The mask fields of 'gender' and 'birthSex' in maskPatientData() have been replaced with 'genderAndSex' which masks all sex and gender related fields (gender, birthsex, legal sex, and sex for clinical use)
  • patientUtils.test.js updated to work with the new fields

Testing guidance

  • Ensure that gender and birth sex are still masked correctly when the 'genderAndSex' mask field is specified
  • Test from the E-MEF and see that the additional fields of legal sex and sex for clinical use are properly masked

@jafeltra jafeltra self-assigned this Oct 26, 2021
Copy link
Contributor

@jafeltra jafeltra left a comment

Choose a reason for hiding this comment

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

This looks really good and I tested it with the E-MEF and everything is masked as expected now! I just had one suggestion to add to the tests. Let me know what you think.

const bundle = _.cloneDeep(examplePatient);
maskPatientData(bundle, [
'gender',
'genderAndSex',
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it might be good to include thew two new extensions that genderAndSex now mask on the examplePatient bundle, and then include the masked properties in the exampleMaskedPatient, just to ensure we don't accidentally break the masking of these fields in the future.

Copy link
Contributor

@jafeltra jafeltra 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!

@dmendelowitz dmendelowitz merged commit cb629d2 into develop Oct 27, 2021
@dmendelowitz dmendelowitz deleted the mask-birthsex-variants branch October 27, 2021 13:49
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.

3 participants