Announcement

Collapse
No announcement yet.

Mirth 1.3.1 - "Process messages in order received" does not work as expected

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

  • Mirth 1.3.1 - "Process messages in order received" does not work as expected

    Environment:
    ************
    Mirth 1.3.1, Java 1.5 Update 9, Windows 2000 Server SP4 w/ latest updates

    Mirth Administrator Setting
    =====================
    Channel: File Reader to Database

    Summary Tab:
    ==========
    "Process messages in order received": Checked

    Source Tab:
    ========
    Directory-to read: <Network share folder>

    Move-to Directory: <Folder on C: Drive>

    Move-to FileName: ${ORIGINALNAME}

    Delete File After Read: No

    Sort Files By: Date
    =================

    The "Process messages in order received" option does not appear to be processing the files by "Date Modified".

    Test Sequence:
    ===========

    1. Open Windows Explorer. Copy about 25 files to the "Directory-to read" folder.
    NOTE: Make sure the "Date Modified" of the files have different time stamp (Same date but different time).

    Click on ?Date Modified? to view the files in sorted order. Take a screen shot of "Directory-to read:" (INBOUND) folder with files sorted in ascending order. Note the file name and Date Modified.

    2. Open another Windows Explorer window. Browse to "Move-to Directory" folder.

    3. Start Mirth 1.3.1

    4. Observe "Move-to Directory". Check the file name and Date Modified columns of the files.
    The files that get moved by Mirth after processing are not in "Date Modified" ascending order as expected.

    Repeat the steps above and each time the processed files that get moved are in different order.

    Appreciate any help to resolve this problem.

    Thanks in advance.

  • #2
    Re: Mirth 1.3.1 - &quot;Process messages in order received&quot; does not work as expected

    Can you add this to the JIRA? Thanks for the detailed report!
    Chris Lang

    Comment


    • #3
      Re: Mirth 1.3.1 - &quot;Process messages in order received&quot; does not work as expected

      Chris,

      I think the reason why the files in "Move-to" folder are in different order is because of threading. Internally Mirth is processing the messages in the order received but when it writes the file out (move after processing), the threads write them out in different order.

      Test Case To Verify
      ===================

      1. Select about 10 patient records
      2. In the host application, change the patient address, say, city to "Dayton"

      3. Host HL7 will send the message files
      (A08 and A31 for each patient record change - total of 20 files)

      4. Rename the message files in the format below:
      ================
      01_A08_PatAccount_381_City_Dayton.HL7
      02_A31_PatAccount_381_City_Dayton.HL7

      03_A08_PatAccount_382_City_Dayton.HL7
      04_A31_PatAccount_382_City_Dayton.HL7
      ...
      ...
      19_A08_PatAccount_390_City_Dayton.HL7
      20_A31_PatAccount_390_City_Dayton.HL7
      ================

      5. Change the patient address to, say, "Orlando" for the same 10 patients in the host application

      6. Rename the HL7 message files sent by host as
      (A08 and A31 for each patient record change - total of 20 files)

      ================
      21_A08_PatAccount_381_City_Orlando.HL7
      22_A31_PatAccount_381_City_Orlando.HL7

      23_A08_PatAccount_382_City_Orlando.HL7
      24_A31_PatAccount_382_City_Orlando.HL7
      ...
      ...
      39_A08_PatAccount_390_City_Orlando.HL7
      40_A31_PatAccount_390_City_Orlando.HL7
      ================

      7. You should now have 40 message files (with same date but different time for "Date Modified")

      8. Copy the 40 files to "Directory to read" folder (INBOUND folder)

      9. Start Mirth 1.3.1

      10 Observe the "Move-to Directory". Files will be in different order.

      11. Check the Patient table in the destination database.
      The 10 patient records have City set as "Orlando" as expected.

      ===========
      CONCLUSION:

      The verification process to check, "Process messages in order received" option should be based on checking the data in the destination and not by the order in which files are moved to the "Move-to Directory".
      ==========

      If my assumption on threading and the test process is correct I&#039;ll go ahead and close the issue. Please let me know.

      Appreciate your help.

      Thanks in advance.

      Comment


      • #4
        Re: Mirth 1.3.1 - &quot;Process messages in order received&quot; does not work as expected

        Excellent write-up - very detailed! You are correct with regards to the threading. Mirth will read in the files on a single thread and dispatch to each destination on that same thread, however the process of moving the files that have been processed is not under the same synchronous constraint. If you feel this behavior is acceptable then feel free to close the issue.

        Thank you!
        -Chris
        Chris Lang

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎