Announcement

Collapse
No announcement yet.

Recovering messages not filtered

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

  • Recovering messages not filtered

    Hi all
    I have done a channel which filter messages. I have 23000 messages processed ok, and 30 that have been stopped by the filter. Is it possible to recover those 30 messages in a directory for example?
    Thanks
    Vero

    MIRTH 3.5

  • #2
    export the source message.
    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
      Hello,

      or on your Channel Filter you can mention that if it is filtered then write in a file on a specific directory.
      Just select JavaScript type and you can put something like this example:

      Code:
      if (msg['MSH']['MSH.9']['MSH.9.1'].toString() != "ADT") 
      {
          FileUtil.write('D:\\Test\\message_' + msg['MSH']['MSH.10']['MSH.10.1'].toString() + '.hl7', false, connectorMessage.getRawData());
          return false;
      }
      else
          return true;
      Best Regards,
      Alex Neiva

      Comment


      • #4
        Hello Alex
        thanks for the reply. Unfortunately, the code I added is not working, nothing appears in the directory. The test is on the presence of the patient name :
        if (msg['PID']['PID.5']['PID.5.1'].toString().length > 0)
        {
        return true;
        }
        else
        {
        FileUtil.write('F:\\LOGICIELS\\Mirth\\ERROR\\messa ge_' + msg['MSH']['MSH.10']['MSH.10.1'].toString() + '.hl7', false, connectorMessage.getRawData());
        return false;
        }

        Comment


        • #5
          Hello,


          that is strange because i just test with your code and it changes perfectly!
          This path exists? F:\\LOGICIELS\\Mirth\\ERROR
          Best Regards,
          Alex Neiva

          Comment


          • #6
            It might be cleaner to set up a second destination with a file writer to write the files only when the name does not exist than to do it in a filter.

            You could have a DestinationSet filter that only runs the relevant destination based on the presence of the name.

            Comment


            • #7
              Hi Alex
              the code is working. It's another part of the code that was blocking the process.
              And you are right @agermano. I changed that too
              Many thanks for the help !
              VĂ©ronique

              Comment

              Working...
              X