-
I am trying to write a transformer to delete an OBR and every OBX associated to it when OBR.25 = P. I am struggling to figure out the syntax for deleting the OBX segments however. What I have below is not deleting anything other than the OBR. Can someone point out what I am mssing?
|
Beta Was this translation helpful? Give feedback.
Answered by
pacmano1
Mar 17, 2025
Replies: 1 comment
-
using obr 2.1 here, but same thing. for each (obr in msg.OBR) {
if (obr['OBR.2']['OBR.2.1'].toString() == 'P') {
for each (obx in getSegmentsAfter(msg, obr , 'OBX', true)) {
delete obx[0]
}
delete obr[0]
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
JJWest12
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
using obr 2.1 here, but same thing.