iNTERFACEWARE Products Manual > Learning Center > Tutorials and Sample Scenarios > Transforming Messages > HL7 Transformation > Step 2 - Setting Up the VMD File > Creating the Segment Scripts |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
The next step of the transformation process is to write segment scripts to transform each patient name into the string fff. This enables you to hide confidential patient information. In the message you are processing, three name fields are defined, as shown in the following table:
To transform a name field, you must write a Segment Outbound script for the field. This script is written in Python. To write a Segment Outbound script for the Patient Name field in the PID segment:
This script calls a Python function named scrub_name(), which does the actual work of replacing the patient name with the string fff. The returned string is assigned to the value variable, which is a special variable that contains the value of the field. In the next step of this tutorial, you will create a Global Inbound script that contains this scrub_name() function. |