Forgive the noobie question but this has me stumped at this point. I simply would like to remove the contents of a field and replace if sometihng is there or add something to the field if it is blank. Below is my sample message:
MSH|^~\&|Paxera|Physicians East|Insight Medical|Physicians East|20200427145126||ORU^R01^ORU_R01|20200427145126|P|2.3.1|||NE||||eng^English^ISO639|||
I would like to make MSH-9 to always be ORU^R01
I currently have:
if (source.getNode("MSH-9") == "ORU^R01^ORU_R01") {
message.setNode("MSH-9", "ORU^R01");
}
I know my issue here is it is always looking for ORU^R01^ORU_R01 hence why it isnt working every time.
Anyway, thanks in advance!