Announcement

Collapse
No announcement yet.

Outbound Message Templates not working as expected

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

  • Outbound Message Templates not working as expected

    I am a new to Mirth Connect and trying to understand more about how Outbound Message Templates work when configuring a source transformer.

    I am attempting to take a source HL7 v2.4 message and make one transformation using a JavaScript transformer with below:

    tmp['SCH']['SCH.8']['SCH.8.1'] = msg['AIS']['AIS.3']['AIS.3.1'].toString();

    I wish to have all other segments/fields in the HL7 message remain the same as my Inbound (source) message. However, when I use an Outbound Message Template, the other fields that in my transformed message contain the same exact data as was in the sample message content from the outbound message template. Does each field need to be transformed in order to use an Outbound Message Template?

  • #2
    Anything you put in the outbound template will be in the message unless you overwrite it.

    In this scenario, I would not use an outbound message template.
    Best,

    Kirby

    Mirth Certified|Epic Bridges Certified|Cloverleaf Level 2 Certified

    Appliance Version 3.11.4
    Mirth Connect Version 3.8.0
    Java Version 1.6.0_45-b06
    Java (64 bit) Version 1.6.0_45-b06
    Java 7 (64 bit) Version 1.7.0_151-b15
    Java 8 (64 bit) Version 1.8.0_181-b13
    PostgreSQL Version 9.6.8

    Comment


    • #3
      To expand on what Kirby said, when you do not use an outbound template, you make changes to msg directly, rather than the tmp variable.

      Code:
      msg['SCH']['SCH.8']['SCH.8.1'] = msg['AIS']['AIS.3']['AIS.3.1'].toString();

      Comment

      Working...
      X