Originally posted by: jlanglois
Hi, I'm a newbie to WTX and I have a question that I hope someone can help with. I am in the process of creating a map to transform a healthcare eligibility 270 request from XML to X12. The problem I'm running into relates to the mapping of data into the REF segments of my X12 output.
I have anywhere from zero to nine possible ID values that may appear in the XML input in any order to be mapped to X12 REF segments. The incoming ID's can have any one of fifteen types, as shown in the example below:
<id T="1C">1111111</id>
<id T="1J">222222</id>
<id T="CT">33333333</id>
<id T="EL">4444</id>
<id T="EO">555555555</id>
<id T="JD">6666666</id>
<id T="N7">77777777777</id>
<id T="SY">111223333</id>
<id T="TJ">444556666</id>
Since the REF segment in the output is represented by a choice group, I have indexed the REF into nine different output elements. In each of these I have placed rules to evaluate each incoming ID and execute a different functional map depending on the ID type that is being evaluated. The result I'm getting is an output of nine iterations of only the first ID evaluated, as shown below:
REF*1C*1111111
REF*1C*1111111
REF*1C*1111111
REF*1C*1111111
REF*1C*1111111
REF*1C*1111111
REF*1C*1111111
REF*1C*1111111
REF*1C*1111111
Obviously the rule I've written keeps evaluating the same input object, rather than evaluating the first one and then moving on to the next. I've tried including an index of the input objects in my output rules, but when I add this my map either fails to evaluate the input altogether (resulting in no output) or WTX finds error with the syntax of my rule (depending on where I've tried to reference the input index).
How can I get my map to move on to subsequent iterations of the same element rather than continuing to evaluate only the first iteration?
I've scoured the help documentation present in WTX (I'm using v8.3.0.2 by the way) and other threads already present in this forum and have experimented with the EXTRACT and LOOKUP functions in my output rules to no avail, so any help that you can offer this newbie would be greatly appreciated. Thanks in advance!
#DataExchange#IBM-Websphere-Transformation-Extender#IBMSterlingTransformationExtender