Problems with sample files in the Testing Tool

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Problems with sample files in the Testing Tool

  • Creator
    Topic
  • #53221
    John Stafford
    Participant

      I’ve been having a hard time getting test files appropriately formatted for use in the Testing Tool. All of the messages I copy and paste, or otherwise create, have unacceptable formatting. Many times I’ll only get the MSH segment, though, sometimes, I don’t get anything at all.

      My guess is that most text editors use newlines instead of carriage returns, throwing off the parser. What is the easiest way to make sure that the message that I am using to test has the appropriate encoding characters?

    Viewing 1 reply thread
    • Author
      Replies
      • #76966
        David Barr
        Participant

          I can think of a couple options. First you could use Emacs as a text editor. It doesn’t have problems handling files with a mixture of CR segment terminators and LF message terminators.

          Another option is to use LF or CR-LF to separate all of your segments and then use a script to replace the the LF characters with CR unless it is followed by MSH or at the end of the file.

          You could also try using an editor designed for HL7 like HL7 Notepad or QuickViewHL7. I haven’t tried either of these. I found them through an internet search.

        • #76967
          Nate Kruse
          Participant

            I use WinVi. It’s a simple, free application. I basically open the file in hex mode and search/replace all 0a’s with nothing. Then if you have multiple messages in the file, search/replace 0d 4d 53 48 with 0d 0a 4d 53 48 to insert the 0a between messages. Also make sure that the last message in the file ends with 0d 0a. Every segment ends with 0d so that is why it is easy to remove all 0a’s first, then put them back where needed. After you do it a few times, it gets to be a very quick and easy routine.

            Good luck!

            Nate

        Viewing 1 reply thread
        • The forum ‘Cloverleaf’ is closed to new topics and replies.