Remove Protected Data with No-code
Tags: privacy, productivity, tutorial, node
Published: 2021-11-08 17:08:26

_[remove-pii](remove-pii.com) is a no-code solution that creates shareable CSVs while removing protected data, PII and PHI with just a few clicks._

Working with third parties, contractors and partners who need access to files containing protected data means walking a tightrope between providing useful data without violating privacy, HIPAA or GDPR. 

## Start Simple
Let's remove protected data from a CSV without writing any code using [an example file](gitlab.com/dbash-public/redact-phi/-/raw/main/example/remove_pii_demo.csv?inline=false).

![Remove protected data with no code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uuzbhtrco3nrt74wz32d.jpg)

This walk-through will use [remove-pii.com](remove-pii.com). Although we're working with a website, no data is transmitted to any server; all processing is handled in the browser. An offline version is [also available](www.npmjs.com/package/redact-phi).

Now, we'll provide our CSV to the website. This will parse the headers and allow us to replace any data within the file.  Any unset columns pass through to the final file. 

![De-identifying a file with protected data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8sxlbd2h9znm0uyu1l0w.png)

## De-identification Examples
Let's set a data-replacement strategy for a column by clicking on "Set Strategy ...".  This will replace data in our document with the function we select. We can use a text search to find data-replacers or scroll through all available approaches:

### Email address:
![De-identify email address](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/021wuw6qy268e7a0maol.png)

### Phone number:
![De-identify phone number](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3zqmbvy42950xxawawqt.png)

### Credit card number:
![De-identify credit card number](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h47wstao4ugla9wwtuly.png)

### Bitcoin address:
![De-identify credit bitcoin address](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n26odlrmqqhclc7xjv1h.png)

### Order date:
![De-identify order date](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rj1ilbw7zn0ar28yo1fr.png)

Now we have strategies to replace data in our file we can **Save** the updated file and view the result:

![Protected data replaced in CSV](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6h5yha6ezptfet82t6gk.png)

**Done!** With just a few clicks we've replaced all protected data within the example file.  If we need to repeat this process on multiple files we can download the replacement strategy by clicking **Download Strategy** and use [redact PII](www.npmjs.com/package/redact-phi) offline.

## Preserve Data Relationships
What if we need to preserve the relationships within the data while replacing values? Notice that email repeats in our example file (e.g. _Nora.OReilly21 and Preston1_) but is replaced with new, different values in the final file. If we want to replace this data with the same new value we'll enable "Preserve" on this column. Now, when we save the updated file any repeated email addresses will be replaced with the same, new value.

![Preserve relationships in replaced data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/we1ufafvlwm5wtbtfhda.png)

## Need More?
For those who are (understandably) cautious: just the headers in a CSV can be provided to create a removal strategy which can be downloaded separately.  Then the [offline application](www.npmjs.com/package/redact-phi) can be used to remove protected data, PII or PHI.  If necessary, the replacement strategy can be created manually in JSON. For those interested, a dedicated version of remove-pii.com exclusive to your organization can be provided.

Please contact us at [dba.sh](dba.sh/contact) with any questions.