Tool for removing identifiable information from an OpenMRS database
Sometimes you need to share a database containing patient data in order to debug an issue. Databases containing data that can be used to identify patients should NEVER be shared. Instead, use the script in this repository to remove any identifiable information first.
First make sure you have a database backup, since this script will make irreversible changes to your database:
mysqldump -u <USER> -p openmrs > openmrs-backup-`date +%d-%m-%y_%Hh%Mm%Ss`.sql
Replace <USER>
with your database username and openmrs
with your database name if you are using a custom database name.
Run the script in the MySQL console or some other way:
mysql> source de-id-patients.sql
-
given_name
-
middle_name
-
family_name
-
family_name2
-
address1
-
city_village
-
county_district
-
concept_id=2927
-
concept_id=2928
-
concept_id=2298
-
concept_id=2299
-
identifier
-
name
-
description
-
address2
-
state_province
-
country
-
county_district
-
address6
-
name
-
description