web stats
Mirth Community - View Single Post - Create NTE after all OBX's following OBR if it meets criteria
View Single Post
  #2  
Old 07-10-2017, 05:02 AM
Thoughts_Shared Thoughts_Shared is offline
OBX.2 Kenobi
 
Join Date: Dec 2016
Posts: 64
Thoughts_Shared is on a distinguished road
Default

From what I understand if you encounter OBR.4.1 = "CD FLD" then create NTE after every OBX for that OBR. You can try this:

Code:
if (OBR4.1 == 'CD FLD') {
		for each (obx in getSegmentsAfter(msg, msg.OBR[0],'OBX')) {
			
			// Create the NTEs
		}
}
For the given example, it will create 10 NTEs - one after every OBX

Last edited by Thoughts_Shared; 07-10-2017 at 05:02 AM. Reason: I
Reply With Quote