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

End of line character problem

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

  • End of line character problem

    Hi Guys,

    I have a channel that reads HL7 files that use hex 0D as the end of line character. Suddenly, I am getting files that use hex 0A instead. The channel moves the new files to the Move-to Directory but does not record anything in the Dashboard (UNKNOWN, FILTERED, ERROR, etc. are all zero).

    I have the Inbound Message Template set to Convert LF to CR.

    Do I need to replace 0A with 0D in the Preprecessor? If so, how do I script it? I've tried the following with no success:

    Code:
    return message.replace(/%0A/g,"%0D"«»);
    Thanks!

    Post edited by: skrugg, at: 04/07/2008 10:52

    Post edited by: skrugg, at: 04/07/2008 10:53

  • #2
    Re:End of line character problem

    I've found the following javascript replace works for those special characters:
    Code:
    return message.replace(/\\x0A/g,"\\x0D");
    Post edited by: jacobb, at: 04/07/2008 11:12
    Jacob Brauer
    Director, Software Development
    NextGen Healthcare

    sigpic

    Comment


    • #3
      Re:End of line character problem

      Also, if you are ALWAYS going to be receiving hex 0A, you can change the character in the LLP Receiver settings.
      Jacob Brauer
      Director, Software Development
      NextGen Healthcare

      sigpic

      Comment


      • #4
        Re:End of line character problem

        Thanks, Jacob!

        Actually, it turns out that the messages with hex 0A line endings weren't even making it to the preprocessor. (I tested it with a logger.info statement.) However, when I turn off "Process Batch Files", the messages, which currently arrive one per file, process as expected.

        I'm assuming the Mirth chokes on these files in batch mode because they only have hex 0A characters after each line, and nothing to denote the end of the message.

        Can you think of a way to get Mirth to accept and preprocess such messages in batch mode so that the channel could handle files with multiple messages?

        Thanks!

        Comment


        • #5
          Re:End of line character problem

          Has there been a resolution to this? I'm having the same issue. Seemed to work fine in 1.6.1.

          Comment

          Working...
          X