Access EVERY instance of a repeating OBR Segment

mercredi 27 août 2014

I know that I can access the FIRST instance of a repeating OBR segment by the following usage:



"msg['OBR'][0]['OBR.2']['OBR.2.1'].toString()"



Is there a way to access/reference EVERY INSTANCE of a repeating OBR segment?



In the example I have to work with, I have the following:



OBR|1|55555||||||||

OBR|2|55555||||||||

OBR|3|55555||||||||



I want to transform the value in OBR.2.1 to say OBR.9.1. The value in each OBR.2.1 segment will be the SAME value, but one message may have only one OBR segment while others may have 2 or 3 OBR segments. Is there a way to transform ALL repeating segments regardless of the repeating count?



The desired outcome would be as follows:





OBR|1|55555|||||||55555|

OBR|2|55555|||||||55555|

OBR|3|55555|||||||55555|



Currently using Mirth Connect 2.2.2.





Access EVERY instance of a repeating OBR Segment

0 commentaires:

Enregistrer un commentaire