Announcement

Collapse

NextGen (Mirth) Connect 3.10.0 Released!

NextGen (Mirth) Connect 3.10.0 is now available as an appliance update and on our GitHub page. This release includes better SQL Server database support, security improvements through fixes and library updates, and improvements for the Advanced Clustering plugin with a focus on improving performance of many of the tasks that are carried out on a frequent interval. 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

HL7->SOAP

Collapse
X
 
  • 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
    PV1|1|O|^108^B^^^H^1043^4
    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="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:wi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:wd="http://www.w3.org/2001/XMLSchema">
    <env:Body>
    <m:admitPatient xmlns:m="schemas-whatever-com">
    <patient>
    <identification>
    <idType>MR</idType>
    <idValue>A74329</idValue>
    </identification>
    <identification>
    <idType>SSN</idType>
    <idValue>999 99 999</idValue>
    </identification>
    <name>
    <firstName>Simon</firstName>
    <lastName>Smith</lastName>
    </name>
    </patient>
    <diagnosis>
    <code>451.2</code>
    <description>Phlebitis And Thrombophlebitis</description>
    </diagnosis>
    <diagnosis>
    <code>550.00</code>
    <description>Unilateral Inguinal Hernia</description>
    </diagnosis>
    </m:admitPatient>
    </env:Body>
    </env:Envelope>

    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
    Re:HL7->SOAP

    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.

    Comment


    • #3
      Re:HL7->SOAP

      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.

      Thanks.

      Comment


      • #4
        Re:HL7->SOAP

        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:
        W1)
        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...)

        W2)
        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']").


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

        Hope this somehow could help
        Bye
        Stefano
        Stefano Mastrogiacomo

        Comment


        • #5
          Re:HL7->SOAP

          For w2 -

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

          See other post for W1 solution.
          Chris Lang

          Comment


          • #6
            Re:HL7->SOAP

            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:

            <HL7Message>
            <MSH>
            <MSH.1>|</MSH.1>

            <MSH.2>^~&</MSH.2>

            <MSH.3/>

            <MSH.4>

            <MSH.4.1>.</MSH.4.1>

            </MSH.4>

            <MSH.5/>

            <MSH.6/>

            <MSH.7>

            <MSH.7.1>199908180016</MSH.7.1>

            </MSH.7>

            <MSH.8/>

            <MSH.9>

            <MSH.9.1>ADT</MSH.9.1>

            <MSH.9.2>A04</MSH.9.2>

            </MSH.9>

            <MSH.10>

            <MSH.10.1>ADT.1.1698593</MSH.10.1>

            </MSH.10>

            <MSH.11>

            <MSH.11.1>P</MSH.11.1>

            </MSH.11>

            <MSH.12>

            <MSH.12.1>2.1</MSH.12.1>

            </MSH.12>

            </MSH>

            <PID>

            <PID.1>

            <PID.1.1>1</PID.1.1>

            </PID.1>

            <PID.2/>

            <PID.3>

            <PID.3.1>777777777</PID.3.1>

            </PID.3>

            <PID.4/>

            <PID.5>

            <PID.5.1>Julia</PID.5.1>

            <PID.5.2>ADRIAN</PID.5.2>

            <PID.5.3>K</PID.5.3>

            <PID.5.4/>


            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

            Comment

            Working...
            X