Skip to content

Delete OBR and Corresponding OBX Segments #6428

Answered by pacmano1
JJWest12 asked this question in Q&A
Discussion options

You must be logged in to vote

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]
  }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JJWest12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants