iNTERFACEWARE Products Manual > Installing and Using Chameleon > HL7 <-> HL7 Transformation > Scripted Transformation > Example: Data Scrubbing |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
One very useful application of scripted transformation is for building a utility to remove confidential data from a set of HL7 messages. This sample VMD file is an example of how you can remove confidential data from an HL7 message. The following Python scripts are defined in this VMD file:
Here is the Transformation Script:
To use this Python script to scrub data, you must:
Each item in the list can be an entire segment (for example, PID), a field in a segment (for example, PID.3) or a subfield (for example, PID.1.1). The value of scrub_white_list_mode indicates whether this list is to be scrubbed or excluded from scrubbing. The Python code contained in the Global Inbound Script performs the actual work of data scrubbing. Alphanumeric values are replaced with X characters, and numbers are replaced with N characters.
Note that you will never need to edit the Global Inbound Script. Its operation is entirely controlled by the values of scrub_list and scrub_white_list_mode that are defined in the Transformation Script.
|