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

Moving messages to different folders

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

  • Moving messages to different folders

    I've searched the forums and I'm having a hard time finding an example of moving a file to a different folder based on a filter. I want to move all lab results that do not contain a patient ID into a different folder than the labs with a patient ID included. I have the filter working properly, but I can't figure out how to send the file somewhere else, it always goes into the same folder as the rest. Anyone have a good example?

    Thanks,
    Jeff

  • #2
    Re:Moving messages to different folders

    You can use a file writter, and a variable defined in the transformer with the desired destination.

    Comment


    • #3
      Re:Moving messages to different folders

      Hey Jeff ,
      I think its better you add some filters (JavaScript) in the destinations too. After the source transforms, when you mention the destinations, you can write your filters and then can route the files to different folders.
      Code:
      In the source filter:
         if (value of PID.2 ==""«») then channelMap.put('route',true)
                else
         channelMap.put('route',false).
      
      In the Destination filter,
        if (channelMap.get(route)=='true') then 
             return true
         else
                 return false
      Its just a structure, just use proper syntax. Hope this helps.
      Regards,
      Kurian.

      Comment

      Working...
      X