This is a very common flat-file format. I have it in several varieties as well, from several different hospitals.
They are just groupings of records that make 1 patient record, and all lines in the file are LF for UNIX, and CRLF for dos.
Essentially the previous method of programming used 01 (in this case) to indicate that a new patient record is beginning (much like MSH indicates a new message)….and also qualified each individual record with an account number in each.
Based on your last suggestion, I tried to convert all LF to CR, but that didn’t improve things. I think I’ll write a pre-pass script to place a special character before the 01, then remove all LF, then change the special character to LF. I think this will put an end to it.