encapsulation and hl7 format for incoming file

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf encapsulation and hl7 format for incoming file

  • Creator
    Topic
  • #53945
    Femina Jaffer
    Participant

      Hi Team,

      I have a weird problem here and cannot figure out what is wrong.  I have an incoming ORM file from an sftp folder which I pick up and bring into CL.   Anyway, it is coming in just fine in CL inbound (ftp local SINGLE ); but having a problem coming into our application.  Just to test the translation I have a bulkcopy only, and the testing tool is coming up with this:

      0(0).MSH(0)  :  >|^~&|PracticeOne|RenalMed|TriCore|TriCore|201311141324||ORM^O01|426|P|2.3||<0xa>PID|1|37|37|103707|TEST^TC14B< 0(0).PID(0)  :  >< This Oxa character is throwing me off before the PID segment (it seems as the PID data is coming in the MSH 14, 15 …19 fields).  The incoming HL7 message looks to be correct when I look at this in the hexeditor. Please advise.  I am really baffled.  I am enclosing the incoming hl7 file for your review.  Thanks !

    Viewing 3 reply threads
    • Author
      Replies
      • #79630
        James Cobane
        Participant

          Femina,

          It would appear the file contains new-line characters (x0A) as segment separators instead of carriage-returns (x0D).  While it appears to “look” ok in your editor, if you display it in hex/binary, you’ll likely see the difference.  I suspect whatever application is creating the file is writing it out that way.

          Hope this helps.

          Jim Cobane

          Henry Ford Health

        • #79631
          Femina Jaffer
          Participant

            Thanks James for your reply.  I did  however view this in Notepad ++ hex editor – and I did not see anything unusual.  I see the xOD and xOA after each segment.  What would I tell the vendor?  

            Thanks,

            FJ

          • #79632
            Levy Lazarre
            Participant

              Femina,

              Yes, this is where your problem is. Per HL7 Standard, the segments should be separated by a carriage return only, so you should only see a 0D after each segment. 0A (line feed) is undesirable.

              It appears that you are receiving the file in DOS format (0D0A) when it should be in MAC format (0D only).

              Sometimes the ftp process itself will change the line endings. I would tell the vendor to use the “bin” command of ftp before transmitting the file. If that doesn’t help, you can put an inbound tps that would simply drop the 0A terminators and leave the segments separated by 0D only.

              If you are on Unix, you could also run a dos2mac utility on the file from the command line to fix it.

            • #79633
              Femina Jaffer
              Participant

                Thanks you so much James and Levy, this really helped.

                Thanks again for confirming the findings.

                Femina

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