I’m wondering if anyone has a script, that they could please make available to me, to do the following action, or provide the instructions to meet the need.
I have a working script where I locate and removing qualifying OBX’s from a result message. I’ve been given a twist where they (now) also want ALL the NTE’s removed related to those same OBX’s being removed. I haven’t been able to target just those NTE – but instead, find that I’m just wiping out all the NTE in the entire message (not good) while I’m within the Foreach where I’m tapping out the OBX. I keep getting stuck in thinking Xlate and iteration mode with TCL and not coming up with a solution.
The messages I work with may look like this for example –
ORC |1
OBR|1
OBX|1
OBX|2
OBX |3 <<< targeted for removal
NTE |1 <this should go
NTE |2 <this should go
NTE|3 <this should go
OBX |4
NTE|1
OBX |5 <targeted for removal
NTE |1 <this should go
NTE |2 <this should go
NTE| 3 <this should go
OBX |6
NTE |1
NTE |2
NTE| 3
The message should end up like this :
ORC |1
OBR|1
OBX|1
OBX|2
OBX |4
NTE|1
OBX |6
NTE |1
NTE |2
NTE| 3
Thanks for any assistance you all may be a able to provide me.
Lawrence Nelson
Lawrence Nelson
System Architect - MaineHealth IT