Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

How to run it?

  1.  Download the endtb-config using “wget https://github.com/Bahmni/endtb-config/archive/release-0.82.zip” and uncompress it using “unzip release-0.82.zip”

  2. Go to anonymise folder using “cd endtb-config-release-0.82/scripts/anonymise”
  3. Run the script as “./anonymise.sh” which internally executes the “deidentify_openmrs.sql” on “openmrs” database. It will prompt for mysql root password, please provide that.

What is incorporated in it?

The sql script is self-intuitive as each and every sql statement has the comment for what it does. However, here are the list of things that are incorporated as part of anonymisation script

  • Person name is anonymised to have eight random alpha numeric upper case characters.

  • Birth date is anonymised in such a way that the script will add or reduce 0-6months / 0-3months / 0-30days to the birth date if the person is more than 15years / between 5 and 15years / less than 5years old respectively. Estimated DoB will be toggled randomly to have either true or false (1 or 0).

  • Person attributes of type text will be anonymised to have eight random alpha numeric upper case characters.

  • Person attributes of type numeric (which are having form validation as numbers) will be anonymised to have random numbers with 10 digits.

  • If the patient identifier prefix (eg. ARM for Armenia)  exists in the system, EMR IDs are anonymised with a combination of random patient identifier prefix (from the list of prefixes available) and a random number (a unique autoincrement id which is given in patient table in openmrs) attached to it (eg. ARM123). If not, it will use ‘ETB’ as the prefix while generating the EMR ID (eg: ETB123).

  • Treatment IDs are anonymised to have eight random alpha numeric upper case characters.

The observations anonymisation has been commented out in the script. Once that is uncommented, it will be anonymised as follows.

  • Text fields will be anonymised to have eight random alpha numeric upper case characters.

  • Numeric fields will be anonymised to have random numbers of 8 digits.

 

How to customize it?

For person attributes:

To anonymise any text person attributes (like patient address), please add those person attribute types to the array at line #31

https://github.com/Bahmni/endtb-config/blob/release-0.82/scripts/anonymise/deidentify_openmrs.sql#L31

 

To anonymise any numeric person attributes (like telephone number), please add those person attributes to the array at Line #38

https://github.com/Bahmni/endtb-config/blob/release-0.82/scripts/anonymise/deidentify_openmrs.sql#L38

 

 For observations captured on forms:

Make sure to uncomment lines from 53 to 65 to have the observations anonymised by the script.

To anonymise any text fields, add the fully specified name of those fields (concepts) to the array at Line #57 (in place of or right after ‘Specimen Id’ having comma separated)

https://github.com/Bahmni/endtb-config/blob/release-0.82/scripts/anonymise/deidentify_openmrs.sql#L57

 

To anonymise any numeric fields, add the fully specified name of those fields (concepts) to the array at Line #64 (in place of or right after ‘Lab, Sample ID’ having comma separated)

https://github.com/Bahmni/endtb-config/blob/release-0.82/scripts/anonymise/deidentify_openmrs.sql#L64

 

  • No labels