Hi,
I'm pretty new to Mirth and am having some trouble setting up a channel to cleanup HL7 messages. I'm using the latest 1.6.1.2750.
I'd like to setup Mirth to receive incoming MLLP messages, remove/cleanup some subcomponents and route them through to an MLLP destination. I've found partial documentation in a number of places, but have not been successful in hooking it up together.
How can I setup this kind of behavior?
Here's what I've done so far:
[ul][li]Create a channel with a LLP Listener as source connector[/li][li]Add a transformer to the source with a single Javascript step[/li][li]Add a LLP Sender destination connector, with the default template ${message.encodedData}[/li][/ul]
It seems that my Javascript is not working, since the message is routed untransformed.
Is this the correct Javascript for a source transformer:
Is the msg object the right one? I've also seen message and messageObject being used.
Should the transformer return the msg object, or is this piece of code enough?
Any help is appreciated.
I'm pretty new to Mirth and am having some trouble setting up a channel to cleanup HL7 messages. I'm using the latest 1.6.1.2750.
I'd like to setup Mirth to receive incoming MLLP messages, remove/cleanup some subcomponents and route them through to an MLLP destination. I've found partial documentation in a number of places, but have not been successful in hooking it up together.
How can I setup this kind of behavior?
Here's what I've done so far:
[ul][li]Create a channel with a LLP Listener as source connector[/li][li]Add a transformer to the source with a single Javascript step[/li][li]Add a LLP Sender destination connector, with the default template ${message.encodedData}[/li][/ul]
It seems that my Javascript is not working, since the message is routed untransformed.
Is this the correct Javascript for a source transformer:
Code:
delete msg['MSH']['MSH.4']['MSH.4.2']; msg['MSH']['MSH.5']['MSH.5.1'] = 'FORINDEX'; msg['MSH']['MSH.6']['MSH.6.1'] = 'LOCAL';
Should the transformer return the msg object, or is this piece of code enough?
Any help is appreciated.
Comment