web stats
Mirth Community - View Single Post - Retrieve Segment Value in Preprocessor
View Single Post
  #1  
Old 01-22-2014, 11:10 AM
skekasaurus skekasaurus is offline
OBX.3 Kenobi
 
Join Date: Dec 2013
Posts: 145
skekasaurus is on a distinguished road
Default Retrieve Segment Value in Preprocessor

I have a channel with multiple destinations that needs a value from the incoming HL7 message. I've gone through a couple threads and from what I've read it looks like the msg isn't available in the preprocessor.

So I'm wondering how can I get the value from the incoming message? Say like the Control ID from MSH-10.


This is what I have so far in the preprocessor:

Code:
var xmsg = new XML(SerializerFactory.getHL7Serializer().toXML(message));
var msgid = xmsg[MSH][MSH.10][MSH.10.1].toString;
But the validator says I'm missing a bracket (]) in index expression. Not sure what this error means.
Reply With Quote