No announcement yet.

How to separate messages coming on a single port?

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to separate messages coming on a single port?


    I am trying to achieve this using Mirth:

    On a particular port, some process is gonna send different types of HL7 messages- A04, R01, A08. I am planning to receive these messages using Mirth. Once I receive these messages, I will write each one of them to a file. To process each type of file, I will be using my custom Java applications. So App1 will process A04, App2 will process A08 and App3 will process R01. Each of these Apps will be polling a separate directory and will assume that only that type of message will be placed in that directory, which type they are expecting.

    Now, my problem is, since I am listening on only one port, is there a way by which I can look into each incoming HL7 message, identify which type it is and write it to a particular directory? I though I could do this using different 'destinations', but that did not work. It is writing each message to each destination.

    Is it even possible? I know sending each type on different port is an option, but I want to do this using just one port.


  • #2
    Repeat the following for each destination (you should one for each type in your scenario):

    Take one of your messages and paste into your Destination tab -> select a destination -> Edit Filter (left of screen) -> Message Template (right of screen) -> Inbound Message Template.

    Now go to to the Message Tree tab (right of screen) and drag the required field "value" over to the left.

    Change the radio buttons next to Condition (middle of screen) to "Equals".

    Click the New button below and to the right of the condition and add the value you wish to have go through to this destination like "A04" for the A04 destination.

    This should get you there if I understood your request.

    Frans de Wet
    Uber Operations LLC

    Phone: (850) 445-7696


    • #3
      That works perfectly.

      Thanks a lot.