iNTERFACEWARE Products Manual > Installing and Using Chameleon > Using Python Scripting > Chameleon Python API > Value Variable > Storing and Re-emitting Parameters |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
Since variables defined in Chameleon's Python scripting language are global in scope, it makes it easy to store and re-emit specific parameters, depending on your requirements. You can actually get quite creative with the use of variables and scripts in Python. For example, let's consider the following scenario. Let's say ABC Hospital is expecting to receive three types of messages:
For each message, ABC Hospital only needs to map one Patient ID per message to their Patient Table. This means that you cannot simply map both Patient ID values to the table. Instead you can use Python to automatically detect the preferred Patient ID (in this example, PID.2), and map it accordingly. To do this, you would insert two simple Python scripts in the Inbound Script columns for PID.2 and PID.4, as shown below:
Then, you would enter the following script in the Inbound Script column for the Patient ID field in your Patient Table, as shown below:
Using the table above as reference:
|