From: Jim K. <ji...@ho...> - 2005-07-13 17:50:08
|
Hi Nico- Thanks for the quick reply. I'm using 0.4.3 and I'm 100% certain that there are no cr/lf characters anywhere but at the end of each segment. Hotmail garbled the sample message segments that i sent to the mailing list. Each of those segments I sent are contained on one line when sent to the interface. While digging through PipeParser I spotted this code at the end of the encode method: return stripExtraDelimiters(result.toString(), encodingChars.getFieldSeparator()); It seems like this method is pretty indescriminate, it essentially wipes out all delimiters up to the last populated field. I have a feeling that this is the source of my problem. However the real question is, what is the proper behavior according to the HL7 specification? I'm working with a CDC ELR implementation guide that specifies how to use an ORU for ELR messaging. In all the examples, if a segment terminates before exhausting all possible fields, the segment terminates with pipe+cr/lf. so: MSH|MSH.1|.....|MSH.12|<cr/lf> If the segment terminates with the last field filled then it terminates with just <cr/lf>: MSH|MSH.1|....||MSH.20<cr/lf> I noticed that the examples of HL7 vendors like Chameleon follow a similar approach. Is this approach right? I'm inclined to think it may be but I can't track down the HL7 specification that states it definitively. If the approach is right, then the stripExtraDelimiters method is a problem. |