Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@briangow
Copy link
Collaborator

This PR adds code to create a mixing function as part of the setup step in the workflow. The new obf_id function produces:

  • Deterministic outputs
  • Positive, 32-bit integer values
  • Reversible mappings

The goal is to use this in place of FARM_FINGERPRINT, which produces a signed 64-bit integer. In OMOP, we prefer unsigned 32-bit integers for IDs when possible. The reversibility of obf_id is not a concern, as it operates on already de-identified data. The goal is to generate unique, transformed (not anonymized or confidential) values for OMOP IDs.

Copy link
Collaborator

@atsvetkova-ody atsvetkova-ody left a comment

Choose a reason for hiding this comment

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

Mixing function is more elegant than FARM_FINGERPRINT(). I have a small concern, because system generated id fields in event tables (for example, measurement_id) do not fit int32 quite often. But while it fits, it is good.

@briangow
Copy link
Collaborator Author

@atsvetkova-ody , I agree that we will need a 64 bit option for certain IDs. I've updated the obf_id function to produce 32 or 64 bits, as set by the user.

@briangow
Copy link
Collaborator Author

I've added a similar function that can deterministically obfuscate strings since some of the IDs should be deterministic based on string values.

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