Announcement

Collapse
No announcement yet.

Problem with HL7-Binary ACK response.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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:

    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

    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 ?

    MSH|^~\&|TEST|TEST|TEST|HNA|20191212105545.488||AC K|20191212105545.488|P|2.3
    MSA|AA|Q707407300T782731569|Message recu par Citadel
    thanks

  • #2
    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.

    Comment

    Working...
    X