web stats
Returning Connection refused to sender - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 07-05-2015, 06:55 PM
RussellMcDonell RussellMcDonell is offline
What's HL7?
Join Date: Jul 2015
Location: Melbourne, Australia
Posts: 1
RussellMcDonell is on a distinguished road
Default Returning Connection refused to sender

I'm using Mirth and I suspect this has been answered, but I can't find it using any of the keywords that seem obvious to me.

I have a channel (MLLP receiver) with a destination (MLLP) with no queuing and not ACK processing [pass through]. And it works.

However, the target system (Destination 1) is know to be unreliable. When it is down I would like to return the 'Connection refused' Java error as an HL7 NACK. The rest of the time I want to return the ACK from the target system.

Currently, when the target system is down, Mirth returns the three characters <VT><FS><CR> - an empty MLLP packet. I'm not sure how to interpret this, and I'm not sure how my sending system would interpret it (at ISO Level 7 the application receives the 'null' string??). I have attached my channel export.
Attached Files
File Type: xml HL7v2In.xml (21.7 KB, 3 views)
Russell McDonell,
Senior Technology Specialist, eHealth
Reply With Quote
Old 07-06-2015, 08:00 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road

The response that the TCP Listener sends back is whatever you have selected in the Response drop-down menu in the Source Settings section. So if your destination doesn't return any response (as in the case of a connection refusal), then an empty response will be sent back to the originating system.

You can instead choose Postprocessor from that list, and then use the postprocessor script to dynamically generate whatever response you want and return it.

Another option is to use "Auto-generate (Destinations completed)". That will auto-generate an ACK/NACK based on the status of your destinations. So if you have one destination and its status is SENT, then it will generate an AA ACK. If its status is ERROR, then it will generate an AE NACK. You can change the HL7 v2.x response generation properties in the Set Data Types dialog.

If you want to return either the destination's actual response or an auto-generated response based on whether the destination failed or not, then you'll have to use the postprocessor script as I explained above. Look in the User API and/or auto-completion menu; the ACKGenerator utility class makes that easy.
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.

- How do I foo?
- You just bar.
Reply With Quote

connection, passthrough, refused

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 01:54 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation