1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
1.0K views
by michael-h-5027 (14.8k points)

1 Answer

0 votes

You can use a custom mapping that has a removeAllNodes and specifies the group to remove.

 

message.removeAllNodes('OBR[group=!OBR;/OBX-5=*]');

 

OBR[group=!OBR is used to select the the nodes including OBR OBX NTE until the next OBR.

; can be used once within the brackets [ ]  adn is used to add another set of criteria.

/OBX selects any OBX segment after the OBR node.

 

If you have multipe OBR groups then the OBR, OBX, and NTE will be removed of any OBR with OBX-5 = *

by michael-h-5027 (14.8k points)
edited by gary-t-8719
...