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

Saving a modified message

  • Filter
  • Time
  • Show
Clear All
new posts

  • Saving a modified message

    I have just loaded version 1.2 and have been running a transform which I wrote for vers 1.1

    Under 1.1 I was able to save a transformed message with:

    hl7_xml = new_msg;

    under 1.2 it appears this no longer works. Is there another method to save a modified message under 1.2?


  • #2
    Re: Saving a modified message

    If you modify the "msg" XML in the transformer, Mirth will automatically use this to generate the message.encodedData value.

    hl7_xml is now "message.transformedData" (or message.getTransformedData() from JS).

    The "msg" Javascript variable is the transformed data in XML format. (Same as hl7_xml was in 1.1.x).

    Let me know if this helps!
    Chris Lang


    • #3
      Re: Saving a modified message

      I have the same problem (1.1 to 1.2).

      I need more examples. I missing something.

      The explication from Chrisl is not enough for me.

      Where I can find the full description of all methods ?

      I try to change de version number, 2.4. to 2.3.
      In Transformed message, a can seen de change.
      But in Encoded message, the field is empty

      Code to change JS:
      msg['MSH']['MSH.12']['VID.1'] = '2.3';
      message.transformedData = msg;


      Transformed message

      Encoded message

      Thank you.


      • #4
        Re: Saving a modified message

        Gilbert -

        Your issue is due to the fact that HL7 v2.3 stores the version in a different field than HL7 v2.3.1, 2.4 and 2.5.


        msg[&#039;MSH&#039;][&#039;MSH.12&#039;] = &#039;2.3&#039;;
        message.transformedData = msg;

        The VID.1 type was defined in 2.3.1 and subsequent versions.

        Chris Lang


        • #5
          Re: Saving a modified message

          Thanks Chris,

          I have the transforms working again.