web stats
Problem with HL7-Binary ACK response. - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 12-13-2019, 08:48 AM
fharvey fharvey is offline
What's HL7?
 
Join Date: Nov 2019
Posts: 1
fharvey is on a distinguished road
Default Problem with HL7-Binary ACK response.

Hello,

I have to process a Binary HL7 feed sent by a Cloverleaf interface.

It seem Mirth don't manage Binary HL7 on the TCP listenet out of the box.

I set Data Type to Binary but I had to do this Preprocessor Script
to properly process the entry HL7 messages.

Code:
var message_decoded;
message_decoded = FileUtil.decode(message);
var string = new java.lang.String(message_decoded, 'ISO-8859-1' );

return string;
With this I process the message Ok.

But...

The ACK messages generated end up being strange and it fill the sending interface with error messages:

Quote:
MSHIfF5+IMIRTHIITkF8VEVTVHxURVNUIwMTkxMjEyMDkzNDQz I20191212103707.665IIACKffACKI20191212103707.665IP I2.4
MSAIAAI1IMessage recu par Citadel
This seem to be a mix of text value of the variable to create the messages and BASE64 encoded values

When I try to built the ACK using Postprocessor and turning off the Auto-generate option with this script :

Code:
var stringmsg=message.getConnectorMessages().get(0).getRawData().toString().getBytes('ISO-8859-1');
var base64msg=FileUtil.encode(message.getConnectorMessages().get(0).getRawData().toString().getBytes('ISO-8859-1'));

var ackCode = 'AA';
var ackMessage = 'Message recu par Citadel';
var ackhl7 = ACKGenerator.generateAckResponse( stringmsg , ackCode, ackMessage );

return ackhl7;
I get

Quote:
MSHcdba9cMIRTHcccc20191213114222ccACKddACKc2019121 3114222cPc2.4
MSAcAAc1cMessage recu par Citadel
I have tried numerous thing and combination, scanned everything I could on this forum to no avail.

How can I produce a regular ACK message like ?

Quote:
MSH|^~\&|TEST|TEST|TEST|HNA|20191212105545.488||AC K|20191212105545.488|P|2.3
MSA|AA|Q707407300T782731569|Message recu par Citadel
thanks
Reply With Quote
  #2  
Old 12-23-2019, 05:45 PM
peterl peterl is offline
Mirth Employee
 
Join Date: Mar 2013
Posts: 14
peterl is on a distinguished road
Default

In your postprocessor script, you should be able to do
Code:
var stringMsg = message.getConnectorMessages().get(0).getProcessedRawData();
to get the already processed HL7 data instead of trying to work with the raw data again.
Reply With Quote
Reply

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 06:08 AM.


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