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

Transformer message template

  • Filter
  • Time
  • Show
Clear All
new posts

  • Transformer message template


    I am testing out Mirth v1.7 but am having some issues when combining variables in the transformer....

    i have dphysf and dphysl as connector map steps pointing to the obr fields.

    in my javascript step i have

    var dphys_name_full;
    var dphys_f = $('dphysf');
    var dphys_l = $('dphysl');

    dphys_name_full=dphys_f + " " + dphys_l;


    when i run a file through nothing prints in obr5.1

    when i change the destination template to $('dphysf') the physician first name prints... I dont get it... Im fairly new the javascript and programming in general so im sure its something simple.

    Thanks in advance


    Post edited by: daveylin, at: 06/24/2008 12:20

  • #2
    Re:Transformer message template

    okay so figured out the variable problem and now realize the second problem has to do with the transformer message template...

    it is copying whatever i have in the outbound message template and not refresshing in obr 32... it is refreshing for other fields, i dont quite understand.

    any ideas?

    Post edited by: daveylin, at: 06/24/2008 12:21


    • #3
      Re:Transformer message template

      I have facing exactly same problem.
      Its copying from the outbound message template instead of the input for me.

      Appreciate any help on this.

      Thanks much


      • #4
        It is always going to copy from the xml file represented by the variable tmp. Many example I have seen don't even use the output area. They just do this
        tmp = msg; Now you can use the same exact mappings you see in your input area.

        Drag from your input template. It will look like this.

        Now you can use it as the output map like this:

        tmp['MSH']['MSH.3']['MSH.3.1'] = 'MIRTH';

        This also copies the input message over to your out and completely eleminates
        those output template values.

        You can also do this if you don't want alll the segments:

        tmp['MSH'] = msg[MSH]
        tmp['EVN'] = msg['EVN'];

        just copy the ones you need or want. tmp is alway the output xml variable used\
        by the encoded message and msg is always the input