iNTERFACEWARE Products Manual > Learning Center > Iguana Best Practices Guide > Designing HL7 Interfaces in Iguana > Interface Types > Generating Repeating Fields from a Table Column |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
When you are using Iguana to generate messages, you will often want to generate the contents for multiple repetitions of a field based on the data in a single table column. Lab reports, as discussed in the previous section, are a good example of this. Suppose you have lab report information in a table column and wish to send this information along in a single OBX segment. In this case, you might want to represent each line of your lab report as a repeated field in the OBX segment - field 5, for example. This can be accomplished using some simple Python code. First, you map the field that you want to repeat (ex. OBX-5) to the table column that contains the data you want to split up. Then all you have to do is modify the Outbound Script for the repeating field to contain the Python code necessary to split up the table data and populate repeats of the field. The code would look something like this:
|