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

writing messages to a file daily

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

  • writing messages to a file daily

    I have a live hl7 feed coming into my mirth box from a neighboring hospital, currently I am writing each of these files to a folder individually. What I want to do is concatenate each days files into one large file. I see where I can append to a file but is there a way append to a different file daily?
    Regards,
    Chris

  • #2
    Re:writing messages to a file daily

    Maybe you could use this :

    In your channel, create a new destination with this type : channel writer ; then just send the raw data message to this channel.

    For your new channel :
    - Source : channel reader with hl7 message type
    - Destination 1 : a file writer with the append to file option to yes
    * choose your directory
    * in the file name, put the date or formated date of your choice ex :
    like ${DATE}.log or a timestamp : ${SYSTIME}
    * in the template area, just put like this :
    Code:
    -----------------------------${DATE}/*to separate every part*/
    ${message.rawData}
    Maybe it could be a flexible solution.

    Bye Antaris

    Comment


    • #3
      Re:writing messages to a file daily

      Thank Antaris, this does exactly what I asked. Now, is there a way to export this file from the PICO automagically.

      Comment


      • #4
        Re:writing messages to a file daily

        Hello,
        I also wanted to capture the raw messages to a file and set up the channel as described. It does write to the file, but have two issues:
        1. each message gets into a file of its own as the DATE variable has the time also in it.
        2. the message that got saved have only the OBR abd OBX segments see the example below...

        ::::::::::::::
        -----------------------------17-10-08_21-16-44.01/*to separate every part*/
        OBR||^|000006036294|MHM4691004 ^MRI, BRAIN W/O CONT W/DIFF |51347988^1^M10|
        |||200810172044|||MSPK|||||^^^ |T2658^XXXXXXX, XXXXXX ||||||200810172116|||||1^^^^^R^^ROUTINE||||D436^AC UTE BUT ILL-DEFINED CEREB
        OBX|1|TX|MHM1004GDT|| ||||||P|02^xxxxxx,xxxxxx |

        Comment

        Working...
        X