nextgenhealthcare / connect

The swiss army knife of healthcare integration.
Other
907 stars 274 forks source link

Support HL7 Enhanced Acknowledgement Mode for TCP Sender #2414

Closed rbeckman-nextgen closed 3 years ago

rbeckman-nextgen commented 4 years ago

In "Enhanced Mode", two ACKs are received by the client: the Accept ACK and the Application ACK. In this case, Accept ACK codes use C[AER], while the Application ACK codes use A[AER].

Since this is data type specific, it would probably require us to allow destinations to return a Response with a list of messages, rather than just a single message.

Imported Issue. Original Details: Jira Issue Key: MIRTH-2478 Reporter: narupley Created: 2013-04-04T08:11:58.000-0700

rbeckman-nextgen commented 4 years ago

HL7 Standards v2x HL7 has two modes for ACK messages. Original Mode and Enhanced Mode. Original Mode one acknowledgment message is sent in Enhanced Mode two acknowledgment messages are sent. One acknowledgment is the receiving system is able to take custody of the message and the second message states whether the receiving system as able to process the information in the message.

Imported Comment. Original Details: Author: spencerr Created: 2013-04-04T12:46:45.000-0700

rbeckman-nextgen commented 4 years ago

Another thread this morning dealing with this: [http://www.mirthcorp.com/community/forums/showthread.php?t=10939]

Imported Comment. Original Details: Author: narupley Created: 2014-06-18T08:53:16.000-0700

rbeckman-nextgen commented 4 years ago

Would the development team consider bringing this forward? We do a lot of work pathology for community mental health that have a managed service where the interface protocol only supports enhanced acks. I feel I am letting the organisation down by not being able to set up an interface with them.

Imported Comment. Original Details: Author: seaston Created: 2014-07-15T23:27:14.000-0700

rbeckman-nextgen commented 4 years ago

Simon, There's a temporary workaround in the post Nick linked to.

Imported Comment. Original Details: Author: smittex Created: 2014-07-16T05:48:42.000-0700

rbeckman-nextgen commented 4 years ago

Thanks Bryan - you obviously have this working successfully?

Imported Comment. Original Details: Author: seaston Created: 2014-07-16T05:53:32.000-0700

rbeckman-nextgen commented 4 years ago

I have a largely upgraded version of that channel working. Unfortunately, I'm unable to share the finished channel, but I can tell you how I did it. There is one input channel that is setup to respond with an Accept Ack immediately. When your message is processed, route the message to the Application Ack channel that creates the message, converts the message into a Java Byte array (this was the tricky part), sets up a TCP connection to the destination, and streams the ByteArray with the MLLP bytes, if necessary.

Here's how you can convert the JS array to a Java ByteArray:

var jArr = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, bytes.length); for (var i = 0; i < bytes.length; i++) { jArr[i] = bytes[i]; }

Imported Comment. Original Details: Author: smittex Created: 2014-07-16T06:10:37.000-0700

rbeckman-nextgen commented 4 years ago

I see Bryan. What I am wanting to do is the other way round. I need to be client, sending an ORU^R01 result message, then listen for two acks to be returned on the same socket. I shall have to give this some thought. I'd still like to see development bring this forward!

Imported Comment. Original Details: Author: seaston Created: 2014-07-16T06:17:54.000-0700