From 3b32f53bbd9dea008cec924e164effd40ac93429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20B=C3=B6rner?= Date: Thu, 1 Apr 2021 16:46:48 +0200 Subject: [PATCH] Update Readme --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c58297c..ce4ac4e 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ # Healex.HL7v2Anonymizer -This console application allows you to anonymize HL7v2 messages. +This console application allows you to anonymize HL7v2 messages. The standard configuration anonymizes all identifiable data in HL7 v2 messages and hashes fields that include an ID. ## Motivation -The project was built to enable data stewards and scientists to share HL7v2 sample messages without identifiable data. +The project was built to enable anyone to share HL7v2 sample messages without identifiable data. ## How to use? @@ -16,6 +16,8 @@ The project was built to enable data stewards and scientists to share HL7v2 samp 2. Unzip it. 3. Run the application and enter the path to your v2 messages. Make sure to back them up prior to runing the application since the original messages will be overwritten. +## Configuration + This application will use the `appsettings.json` to read the values that are to be replaced for each segments and their corresponding subsegments. A segment is recognized by its `"Segment"` property. Each segment contains an array of replacements. A segment's subsegment can be identified by its `"Path"` property inside the replacements array. Subsegments will also have a value property that contains the value by which a value inside a HL7v2 message is to be replaced. @@ -36,6 +38,22 @@ Say for instance, you want to replace the value that is currently assigned for t } ``` +Use the "HASH" keyword to generate persistent, pseudonymized IDs. This function will always generate the same anonymized ID for a given ID in the HL7 v2 message. The hash function is one-way, so there is no way of reversing the pseudonymized ID back to its original ID. + +```json + { + "Segment": "PID", + "Replacements": [ + // ommited + { + "Path": "PID.1.1", + "Value": "HASH" <---- The value in PID.1.1 will be hashed, not overwritten + }, + // omitted + ] + } +``` + Adding additional segments works in a similar manner. Simply add a new segment to the `appsettings.json` after `"Segment": "IN2"`. Make sure to add a comma to the closing brace of this segment so the JSON file remains valid, then use this template to add a new segment. ```json