sub-component separator Help

jeudi 5 mars 2015

We have a customer that is sending in an '&' character in

msg['PID']['PID.11']['PID.11.1']

(I do not want to change the detection settings, but for this field we want to ignore the character.)

and this is causing Mirth to detect a sub-component separator.

And create XML for those sub fields...



msg['PID']['PID.11']['PID.11.1']['PID.11.1.1']

msg['PID']['PID.11']['PID.11.1']['PID.11.1.2']



and in addition they have repeating fields too, so I have to use index [0] etc.



The following code is my attempt to make our code work normally and when this happens. But the normal data is now blank. Can anyone see what I have wrong in the following code...



(msg['PID']['PID.11'][0] ?

(

msg['PID']['PID.11'][0]['PID.11.1']['PID.11.1.1'] ?

(msg['PID']['PID.11'][0]['PID.11.1']['PID.11.1.1'].toString()+

(msg['PID']['PID.11'][0]['PID.11.1']['PID.11.1.2'] ? msg['PID']['PID.11'][0]['PID.11.1']['PID.11.1.2'].toString():"")

)

:msg['PID']['PID.11'][0]['PID.11.1'].toString()

)

:"")





sub-component separator Help

0 commentaires:

Enregistrer un commentaire