help with HL7 Transformation
Hi,
I'm new to IS and the HL7 transformations using the DTL. I need some clarification on the foreach action.
I want to iterate over IN1 segments, and output only segments that contain certain allergy types in IN1-2 with foreach. Inside the foreach block, I check for allergy type "FA" in IN1-2 and, if found, send the segment with only the required fields (fields #1, #2, #3, and #5 to be exact). Please see the foreach block below:
I'm puzzled how come I'm getting field repetitions in the fields I populate within the foreach block Here are the AL1 segments in the source message
AL1|1|DA~FA|NOCHOC^CHOCOLATE FLAVOR^FOODELG|Low|Itching|20220126|||Allergy
AL1|2|FA|OFOOD^OTHER (FOOD)^EXTELG|Low|Dermatitis|20220316
AL1|3|EA~DA|NOBANA^OTHER^EX|Hi|Dermatitis|20230316
AL1|4|EA~FA|NOBANA^OTHER^EX|Hi|Dermatitis|20240316
and here are the AL1 segments in the target message
5 | * | AL1 |
|
||||||||||||||||||||||||||||
6 | * | AL1 |
|
||||||||||||||||||||||||||||
7 | * | AL1 |
|
I do not expect to have repeated field values in field #1, #2, #3 and #5, and it is strange that the number of field repetitions increasing progressively.
Wai
In all set actions remove k1 from the Key (last column in the screenshot) and put "" (not empty) instead (that's the default when you insert a set action).
Then try again.
Thanks Enrico, it worked!
Do you know why the output AL1 segments have an asterisk at the front in the TEST TRANSFORMATION output message box?
Regards,
Wai
I think it means that that particular segment has been modified