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

HL7 Field-to-Field Copying

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

  • HL7 Field-to-Field Copying

    Hi All!

    I was wondering if there is any way (or if anyone has developed a technique) to copy an HL7 field from the inbound message to the same HL7 field in the outbound message without resorting to copying each and every sub-field? Let me explain a bit more ...

    For example, say one wanted to copy verbatim the entire PID-11 (patient address) from the inbound message to PID-11 in the outbound message.

    When I try that now I end up with XML formatted data embedded in the outbound HL7 message and end up having to do a sub-field by sub-field copy. I know that there's a "Convert XML to HL7" function that comes with Mirth but it appears to require the strict parser which I simply can't use for this particular interface.

    Anyway, I know this has to come up with other folks when building an HL7 to HL7 interface.

    Any hints, suggestions, or other assistance would be most appreciated.

    Bob Dilworth
    University of Toledo Medical Center
    Toledo, Ohio
    [email protected]
    Bob Dilworth
    University of Toledo Medical Center
    Toledo, Ohio

  • #2
    Re:HL7 Field-to-Field Copying

    Are you doing this in javascript or in a message builder step?
    Jon Bartels

    Zen is hiring!!!!
    http://consultzen.com/careers/
    Talented healthcare IT professionals wanted. Engineers to sales to management.
    Good benefits, great working environment, genuinely interesting work.

    Comment


    • #3
      Re:HL7 Field-to-Field Copying

      It's in javascript right now but it doesn't have to be - especially if you have a solution!

      Bob D.
      Bob Dilworth
      University of Toledo Medical Center
      Toledo, Ohio

      Comment


      • #4
        Re:HL7 Field-to-Field Copying

        bdilworth wrote:
        It's in javascript right now but it doesn't have to be - especially if you have a solution!

        Bob D.
        Use a message builder, just drag and drop PID 11 from your source into the replacement field and PID 11 from your outbound template in the other field. The message builder takes care of the XML conversions for you.
        Jon Bartels

        Zen is hiring!!!!
        http://consultzen.com/careers/
        Talented healthcare IT professionals wanted. Engineers to sales to management.
        Good benefits, great working environment, genuinely interesting work.

        Comment


        • #5
          Re:HL7 Field-to-Field Copying

          Hmmmm. That didn't work. I'm still getting the encoded XML data inserted into the outbound HL7 message. Here's what I did (in case I did it wrong):

          1. I set up a Message Builder step in my transformer.

          2. In the box labeled Message Segment I inserted tmp['PV1']['PV1.11'] by dragging the field into the box from the outbound message tree.

          3. In the box labeled Mapping I inserted msg['PV1']['PV1.11'].toString() by dragging the field into the box from the inbound message tree.

          4. I left the remaining boxes empty.

          When I tested the transformer with a message PV1-11 in the outbound hL7 message contained XML encoded data:

          ||<PV1.11><PV1.11.1>1234 ANY ST</PV1.11.1><PV1.11.2>APT 27</PV1.11.2> etc., etc., etc.

          Thoughts????
          Bob Dilworth
          University of Toledo Medical Center
          Toledo, Ohio

          Comment


          • #6
            Re:HL7 Field-to-Field Copying

            Remove the toString
            Jon Bartels

            Zen is hiring!!!!
            http://consultzen.com/careers/
            Talented healthcare IT professionals wanted. Engineers to sales to management.
            Good benefits, great working environment, genuinely interesting work.

            Comment


            • #7
              Re:HL7 Field-to-Field Copying

              jbartels wrote:
              Remove the toString
              Hi Jon!

              Nah - that didn't work either. I'm still getting the XML encoded data in PV1-11.

              The two message trees are not standard HL7 2.2; in other words I'm not using the strict parser if that makes a difference.

              Any other Thoughts????
              Bob Dilworth
              University of Toledo Medical Center
              Toledo, Ohio

              Comment


              • #8
                Re:HL7 Field-to-Field Copying

                Try using a JavaScript step instead, with the next code:

                Code:
                tmp['PV1']['PV1.11']=msg['PV1']['PV1.11'];

                Comment


                • #9
                  Re:HL7 Field-to-Field Copying

                  albertosaez wrote:
                  Try using a JavaScript step instead, with the next code:

                  Code:
                  tmp['PV1']['PV1.11']=msg['PV1']['PV1.11'];
                  YAAAAAY!!!!!. That one worked! Cool! I guess we have to use a javascript step to do this.

                  Thanks tons for all the help guys!!!

                  Bob D.
                  Bob Dilworth
                  University of Toledo Medical Center
                  Toledo, Ohio

                  Comment

                  Working...
                  X