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

Destination Transformer

  • Filter
  • Time
  • Show
Clear All
new posts

  • Destination Transformer

    I'm having trouble figuring out transforming messages in the destination. What I'd like to do is take messages from a file reader, output them to different file writer destinations based on filters and transform the outputted message based on it's destination. For example for Destination1 I want to replace MSH4.1 with the static text TEST1234 and for destination2 I want to replace MSH4.1 with the data in MSH6.1.

    I know this is simple but I just can't seem to find a sample or documentation which explains it. Would I use JavaScript or a Message Builder? Any tips would be greatly appreciated. BTW I'm using 1.7.1.



    Post edited by: dbanach, at: 06/06/2008 14:45

  • #2
    Reestination Transformer

    OK, I think I've figured this out.

    To set this up for a file writer destination:

    1. Set the directory that you want your files to go to.
    2. Setup your filename and other options per your choice.
    3. Set the template as message.encodedData
    4. Click on Edit Transformer and choose new step.
    5. Double Click in the Column Type and choose JavScript
    6. I used the following to set MSH.4.1 to TEST12345:

    msg['MSH']['MSH.4']['MSH.4.1'] = 'TEST12345';

    7. Save changes and deploy your channel.