Mirth Connect 4.1.0 Released!

Mirth Connect 4.1.0 is now available as an appliance update and on our GitHub page. Mirth Connect 4.1.0 includes new features such as new event log messages, additional fields to the Welcome to Mirth Connect screen, new information included in alerts as well as many smaller changes, updates, and improvements. This release also contains several 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


  • Filter
  • Time
  • Show
Clear All
new posts

  • HL7->SOAP

    I'm new to Mirth and I have about 100 questions, so I'll just summarize all my questions into one:

    I want to receive an HL7 message on LLP Listener like the one below:

    MSH|^~\\&|NIST Test Sending Application|NIST Test Facility|NIST Test Receiving Application|NIST Test Facility|20060207125135||ADT^A01^ADT_A01|MSG.0|D|2 .4
    PID|1||A74329^^^^MR~999 99 999^^^^SSN||Smith^Simon
    DG1|1||451.2^Phlebitis And Thrombophlebitis^I9
    DG1|2||550.00^Unilateral Inguinal Hernia^I9

    and call a web service (through SOAP Sender I suppose) that exposes a method admitPatient as described below:

    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env=""
    <m:admitPatient xmlns:m="schemas-whatever-com">
    <idValue>999 99 999</idValue>
    <description>Phlebitis And Thrombophlebitis</description>
    <description>Unilateral Inguinal Hernia</description>

    My guess before trying Mirth was that there was a way to simply use XSLT on the xml encoded HL7 message to generate the soap envelope, but it looks like some kind of javascript transformer would need to be used + how do we handle repetable segments and fields (DG1 and PID-3 in my example) + any namespace issues, do I need to create one different javascript variable per value that I want to put in the soap envelope template generated by Mirth (Channel destination tab, SOAP Sender connector type)...

    It sounds trivial, but I wasn't able to find documentation nor any tutorial about sending SOAP messages with Mirth, a detailed explanation on how to accomplish the above would probably answer all the questions I have at once + it could really be a nice SOAP Sender tutorial

    Thanks and good work guys, this product looks really cool!

  • #2

    This is simple:

    1. Create a channel with an llp reader and a SOAP Sender
    2. Use transformer steps to get each one of the variables you need from the HL7 message
    3. At the soap sender, post the wsdl location, push "Get Methods", select the method you want and then, drop into each ws holder the mapped variable from the tranformer.


    • #3

      Thanks for you reply, I tried this solution but how do we handle fields repetition? In my example I have to pass to the web service (see the soap envelope in my previous post) a list of <Identification>. How do we populate the <Identification> list in the soap envelope when we don't know in advance e.g. how many repetition of PID-3 are in the HL7 message? Do we need some kind of javascript transformer to do this e.g.

      for each (var patientIDElement in msg['PID'][PID.3'])
      // Output <Identification>
      // Output <IdType>patientIDElement[PID.3.5]</IdType>
      // Output <IdValue>patientIDElement[PID.3.1]</IdValue>
      // Output </Identification>

      i.e. I can't just map 1 different named variable per value in transformer since I don't know in advance how many values I will have. So I need some direction on how to do this.



      • #4

        Hi ,

        I'll tell you my experience in a very similar situation

        The sample Output message seems to be very important.

        Here's my workaround test:
        I've a fixed number of repetition (one single sublevel) so I put a sample Output xml message with all possible repetition (blanked value) lets say 10 repetition of an element.
        Then I set the tag value with a "for each" cycle.
        Let's say it cycle 4 times.
        Then I try to delete remaining xml tag (but i think there's some bug here as I've posted #2953 and waiting...)

        Otherwise you can delete all tags and try to ad single sub-tag as needed by your nested cycle
        (but I don't know how to create e new tag like "new msg['element']" or "add msg['element']").

        W1 is a bad workaround and seems bugged.
        W2 is not closed yet...

        Hope this somehow could help
        Stefano Mastrogiacomo


        • #5

          For w2 -

          msg['element'] = "<tag>something</tag>";
          You can create new xml elements directly.

          See other post for W1 solution.
          Chris Lang


          • #6

            I want to know that how can i pass the entire XML to the web service through SOAP sender connector type.

            Scenario is like:

            Step 1: Get HL7 message through LLP listener.
            Step 2: Convert it to custom XML format.
            Step 3: Send out this xml to a web service (accepting this Xml as a string parameter) through Soap sender connector type.How can we achieve this?

            Xml structure is as follows:









































            Post edited by: varun, at: 09/10/2008 07:36

            Post edited by: varun, at: 09/14/2008 22:31

            Post edited by: varun, at: 09/14/2008 22:35