getting the values of a message in a query

mardi 7 octobre 2014

ok this is way newbie but I've not used Mirth to actually look at HL7 segments.



I am seeing a lot of "msg['MSH']['MSH.12'].tostring();" in the forums but I cannot for the life of me get the actual value.



I have an Oracle query to get the CLOB data which contains the HL7 message. In my Destination I have a javascript writer to simply write a logger message with the value of the MSH.12 segment.





for each (seg in msg.children()) {

if (seg.name().toString() == "MSH") {if (seg['MSH.12'].toString().length > 0) {

var Message_Version = seg['MSH.12'].toString();

} else {

var Message_Version = 'NONE';



}

}

}



logger.info(Message_Version);





This errors for not declaring the "msg" variable. I don't know what I am missing.



Thanks in advance!!





getting the values of a message in a query

0 commentaires:

Enregistrer un commentaire