In my transformer I have a javascript step that is using a IF statement to populate the PV1.3.4 field in my HL7 message. I need the step to look at the PV1.2 field for a certain value and then populate the PV1.3.4 field based on that value. Below is the code that I am using.
if (msg['PV1']['PV1.2'].toString() == "E") {
msg['PV1']['PV1.3']['PV1.3.4'] = "WITHAM MEM ED";
} else {
msg['PV1']['PV1.3']['PV1.3.4'] = "WITHAM MEM";
}
When I send a message the transformed message tab shows the if statement working, but the encoded message does not have the PV1.3.4 field being populated. Any help would be appreciated.
Post edited by: pfrey, at: 02/15/2008 07:55
if (msg['PV1']['PV1.2'].toString() == "E") {
msg['PV1']['PV1.3']['PV1.3.4'] = "WITHAM MEM ED";
} else {
msg['PV1']['PV1.3']['PV1.3.4'] = "WITHAM MEM";
}
When I send a message the transformed message tab shows the if statement working, but the encoded message does not have the PV1.3.4 field being populated. Any help would be appreciated.
Post edited by: pfrey, at: 02/15/2008 07:55
Comment