mirth

How to load static data in Mirth, avoid many roundtrips to a database

Mirth is a broker to help with healthcare application HL7 message integration. My question is about saving yourself the trouble of hitting your own datastore everytime you want to do a lookup on some data contained within the HL7. Scenario: for each message received by the channel, I want to find the facility's mnemonic/code/ID and get...

Mirth: sharing the SOAP response between Destinations in the same channel

Consider a scenario where a Mirth channel has one or more Destinations. In this scenario, there are 4 Destinations. The channel's Source Type is LLP Listener with incoming datatype as HL7 v2.x. The channel's Destinations are as follows: File Writer - Write the message to disk. Really this is just for development purposes. Javascript...

Mirth: calling an SSL SOAP web service with a client certificate

The scenario is around calling an external SSL SOAP web service from within Mirth. The web service is requires an SSL/TLS connection along with a client certificate. The intention is to use the built-in SOAP Sender Destination to call the remote secure web service, and somehow include that client certificate. I understand that you fir...

Mirth: Inbound Message Template that is NOT the same as the channel source type

The problem is that the Inbound Message Template is expecting different type than I want to specify or work with. The requirement is to have a SINGLE channel convert HL7 v2 to v3, call a web service, then convert the SOAP resulting XML, and convert that to HL7 v2.x and send it back to the original caller. This must be done asynchronously...

Mirth: dynamically determine which SOAP method to call

Consider a Mirth channel with a Destination of a SOAP Sender. The WSDL is successfully loaded and has more than one method available. Each method would take a different number of arguments. Example methods: AddPerson() UpdatePerson() DeletePerson() MergePerson() UnmergePerson() Given the set of HL7 message event types, i.e. A28 = ...

Count the number of nodes in an XML snippet using Javascript/E4X

Consider this problem: Using Javascript/E4X, in a non-browser usage scenario (a Javascript HL7 integration engine), there is a variable holding an XML snippet that could have multiple repeating nodes. <pets> <pet type="dog">Barney</pet> <pet type="cat">Socks</pet> </pets> Question: How to get the count of the number of pet ...

JavaScript / Rhino: Can I use a regular expression in an E4X query to select certain nodes only?

Hi! I'm working on Rhino (Mirth), and I've got to process / parse an XML with the following structure: <root> <row> <foo-1 /> <foo-2 /> <foo-3 /> <foo-4 /> ... <bar-1 /> <bar-2 /> <bar-3 /> <bar-4 /> ... <something-else-1 /> <something-else-2 /> </row> </root> I want to get all the "foo" nodes only, avoiding the use of loops if possi...

Mirth: How to get source file directory from file reader channel

I have a file reader channel picking up an xml document. By default, a file reader channel populates the 'originalFilename' in the channel map, which ony gives me the name of the file, not the full path. Is there any way to get the full path, withouth having to hard code something? ...

Use Javascript E4X to selectively rename XML tags

I am using javascript to manipulate XML in a non-browser context (no DOM), and am looking for an E4X expression to rename a list of tags. For any given tag, I don't necessarily know ahead of time what it is called, and I only want to rename it if it contains a given substring. As I very contrived example, I may have: someXML = <Favouri...

Mirth: overwriting msg object with contents in an XML object

The task is to send an XML object from Channel-A to Channel-B <MyMessage> <ID>42</ID> <hl7v2> MSH|^~\&|LAB|.... PID|1|.... </hl7v2> </MyMessage> The steps of the channel communication: in the Channel-B's source transformer, extract the HL7v2 contents OVERWRITE the current msg object in Channel-B with the extracted contents c...

Mirth Connect: javascript to call a webservice

Hello, I'm trying to call a web service from a Mirth Channel transformer javascript using apache axis library (which it's supposed to be deployed with Mirth). I've tried using the following java script, but it does not work: /*importPackage(java.net); importPackage(org.apache.axis.client.Call); importPackage(org.apache.axis.client.Serv...

Mirth: Soap sender persistent queues

I have a soap sender with the "User persistent Queues" set to yes. I'm still getting errored messages in the channel where the error is: ERROR-404: HTTP connector error ERROR MESSAGE: Fault occurred while processing. So my question is, under what error conditions will the persistent queue be used, and why do these messages error out...

Mirth Transformer Error

I'm getting the following error when trying to convert HL7v3 to HL7v2 The message passed in is: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"&gt; <S:Body> <PRPA_IN201306UV02 xmlns="urn:hl7-org:v3" xmlns:ns2="urn:gov:hhs:fha:nhinc:common:nhinccommon" xm...

Mirth: Transforming a response message in a separate Channel and returning it to original channel

I have a channel that takes HL7v2 message and converts it to HL7v3. It invokes a SOAP web service and receives a response in HL7v3. I need to convert that response back to HL7v2. Currently: I "Send Response to:" my second channel. That can convert it fine back to HL7v2, but it doesn't seem to return a response message. I want that seco...

Overwrite msg in mirth

I have two destinations now and the first calls a SOAP webservice. I want to take the response of that destination by: msg = new XML(responseMap.get('Destination1').getMessage()); and convert it to a mutable XML object. Doing: logger.error(msg); <S:Body><PRPA_IN201306UV02> ... </PRPA_IN201306UV02></S:Body> Shows the valid msg as I...

How does this method give me a -61 Error?

This is in an application I am using called Mirth, but it appears to be coming from inside an Apache Commons library from a method that checks if something is indeed Base64 encoded or not. All of the docs say the only return is true or false, so how am I getting -61? -61 org.apache.commons.codec.binary.Base64.isBase64(Base64.java:137) ...

Testing database connection Using Javascript in outbound database connector in Mirth

I have database handle in channelMap (for 1 connection for all messages) and I reuse the connection for all messages. Now, before performing inserts (to a MySQL database), I want to test if the connection still exists. How do I perform this test? ...

How to programatically clear residual ack messages from a channel destination before processing a message in Mirth?

I'm working in the Mirth environment. I have identified a bug where acknowledgements from messages already processed will be lingering around when a new message arrives. The lingering ack will then be treated as an ack for the new message. Hopefully the bug will be fixed in an upcoming version of Mirth, but in the meantime, I'm trying t...

Mirth: How to send ACK message to sender host and port

I am receiving lab HL7 messages from a static host and a dynamic port. For each message received I need to send a ACK message back to this host and port. I have a destination TCP Writer channel with the correct message in there. Though the port number has to be fixed. How do I tell Mirth to send this message to the sending host and p...

How to get HL7 templates for Mirth Connect?

Hi Friends, I'm new to this HL7 standard, but earlier I worked on NCPDP standard. Now I'm trying to explore Mirth Connect open source tool. When I'm trying to configure as per the documentation(User Guide) which is provided in http://www.mirthcorp.com/community/wiki/display/mirthuserguidev1r8p0/Message+Builder URL, but in this documenta...