Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

How to Returning Error ACK Code

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

  • How to Returning Error ACK Code

    Good morning,

    I have the next channel configurated yet:
    - Channel message: HL7 2.x messages
    - Source:
    * LLP Listener
    * Send ACK: Yes
    * Transformer: The transformer gets and save variables from messages as a channel map
    - Destination:
    * Database Writer: MySQL Connection

    It works fine, but I WANT TO SEND AN ACK WITH "ERROR ACK CODE (AE)" or "REJECTED ACK CODE (AR)" when there is an error in the channel, not only when the channel reads or transforms the message, but when there is an ERROR IN DESTINATION.

    Thank you very much

  • #2
    Originally posted by pgomez View Post
    Good morning,

    I have the next channel configurated yet:
    - Channel message: HL7 2.x messages
    - Source:
    * LLP Listener
    * Send ACK: Yes
    * Transformer: The transformer gets and save variables from messages as a channel map
    - Destination:
    * Database Writer: MySQL Connection

    It works fine, but I WANT TO SEND AN ACK WITH "ERROR ACK CODE (AE)" or "REJECTED ACK CODE (AR)" when there is an error in the channel, not only when the channel reads or transforms the message, but when there is an ERROR IN DESTINATION.

    Thank you very much
    My apologizes for up an old post , but I have the same problem and searching in the forum/wiki/doc I don't find the solution.

    Lots of thaks.
    --
    Ignacio

    Comment


    • #3
      Investigate the post-processor and its ability to set the acknowledgment.

      You'll likely have to do something like this in your post processor:
      Code:
      //determine here whether life is good or bad for this message.
      //AE, AR, AA
      
      //wrap string replacement placeholders in questionmarks for now.
      var myAckString= "MSH|^~\\&|?SendApp?|?SendFac?|?RecApp?|?RecFac?|?MsgDateTime?||ACK^A01|?NewID?|?ProcID?|?VerID?|\rMSA|?AckCode?|?ContID?|?AckMessage?|";
      
      //perform your string replacements and manipulation as you will. special attention to the ?AckCode? string replacement. AE, AR, etc.
      
      var myAckResponse = ResponseFactory.getSuccessResponse(myAckString);
      
      responseMap.put("Customized ACK", myAckResponse);
      
      return;
      and then over in the Source tab of your channel, choose Send Ack: Response From "Customized ACK"

      Bingo bango!

      Comment

      Working...
      X