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

Transformation Before Outputting To File

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

  • Transformation Before Outputting To File

    First I would love to know if this is documented somewhere as I could not locate anything on this topic.

    However, I have a File Channel working perfectly and all I want to do is take MSH.9 and MSH.10 and output those. I am stuck with how to do this and where and if this is a transformer action or not.

    Also, is there a syntax example somewhere where I can look at the inpout and know what I need to code based on thre data?

  • #2
    Re:Transformation Before Outputting To File

    You can use a mapper transformer entry to pick out those values and assign them to a JavaScript variable. You can then use that variable in your file writer output.

    Click on your destination, then "edit transformer", and "add new step" to create the new transformer entry.

    Make up a variable name like "type", and fill in the mapping as something like:

    msg['MSH']['MSH.9']['MSH.9.1'].toString()

    or

    msg['MSH']['MSH.9']['MSH.9.1'].toString() + '-' + msg['MSH']['MSH.9']['MSH.9.1'].toString()

    to produce a string like ADT-A01.

    In your report, use either ${type}, or $(type) (I forget which it is but one should work).

    You can get Mirth to show you the odd "msg[]..." strings for data by using the build in message parser.

    On the right of the transformer screen, screen (if you are running 1.7?) there is a
    Message Template". Cut and past a sample HL7 message into that window, and then click on Message Tree, to see a tree parsing of the message. Open up the nodes of that tree until you find some data you want, and drag and drop the node from that display, over to the "Mapping" box. It will drop the code you need to reference that data in the mapping box for you.

    Comment


    • #3
      Re:Transformation Before Outputting To File

      Many thanks for the response I was able to play around with it and get it to work...

      I appreciate the assistance.

      Comment


      • #4
        Re:Transformation Before Outputting To File

        Many thanks for the response I was able to play around with it and get it to work...

        I appreciate the assistance.

        Comment

        Working...
        X