dib0 / HL7Fuse

HL7Fuse is a "Swiss pocketknife" for your HL7 development needs in the .Net framework. HL7Fuse is based on SuperSocket in combination with NHapi and NHapiTools. This combination provides a powerful and solid base to build you HL7 application or HL7 test framework. In fact, if you use HL7Fuse as is, it can function as a mesasge hub, so you can receive one message and send this (using filters) to many client systems.
MIT License
78 stars 49 forks source link

Segment separator issue /x0A/ #13

Closed JohnCrichton81 closed 7 years ago

JohnCrichton81 commented 7 years ago

Hello,

I am doing some tests by receiving HL7 messages (in MLLP TLS mode) and I am receiving for ACK :

MSH|^~\&|HL7Fuse|Development|TLS_TOOL|IL_LAB_BRK|201702231109||ACK^SLI^QBP_Q11|627498221219696500|D|2.5|||||ITA||EN\X0A\QPD|SLI^Specimen Labeling Instructions^IHE_LABTF|QRY68751825846181340|||PG2^OP^OID^ISO||||\X0A\RCP|I||R MSA|AA|627498221219696500

I don't understand why i am receiving this "LF" encoded in text. I am probably missing something ?

dib0 commented 7 years ago

Hi,

I don't know how you handle the receiving messages. In HL7Fuse I use NHapi to decode and encode the messages. Which characters do you use as segment delimiters? The default use in NHapi is by adding a '\n', so it will be CR/LF at the end (so X0D and X0A). If you just check for CR (X0D) the X0a is left.

Does that help you any further?

JohnCrichton81 commented 7 years ago

Thanks. I just did a simple replace : message.Replace("\n", "\r\n") juste before calling the parser and then everything went well. It's not the best way, but it's ok for the moment :)