iNTERFACEWARE Products Manual > Installing and Using Chameleon > Using Python Scripting > Python Scripting Examples > Message Manipulation > Changing the Order of Data in a Message > Solving the Problem with Python |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
To solve this problem, you need to use four scripts. The first step is to use the following code to pull apart the phone number in the PID 13 field. Then you need to assign the value to either the variable HomePhoneNumber or BusinessPhoneNumber. Note that the example below has initially assigned empty values to these variables:
You will notice the use of log messages throughout the script to assist in testing. These messages can be viewed in the Debug window (View > Show Debug Output) of Chameleon. The PID-14 script is very similar:
The final step is to add two simple scripts to the Patient table for the Business Phone and Home Phone fields.
|