Efferent-Health/HL7-dotnetcore

Escape Character Issue

ljs8985 opened this issue · 7 comments

Whenever I attempt to parse a message where there is an escape character "\E\ " specifically at the end of a field, I get an error:

Failed to parse the message with error - Failed to serialize parsed message with error - Failed to serialize the message with error - Index was outside the bounds of the array.

Is this intended behavior? If so it would help me out a lot if it could be explained.

Please provide a sample message

Apologies. I've taken a sample HL7 message from online and inserted "\E\ ".

MSH|^~\&|ADT1|MCM|FINGER|MCM|198808181126|SECURITY|ADT^A01|MSG00001|P|2.3.1 EVN|A01|198808181123 PID|1||PATID1234^5^M11^ADT1^MR^MCM~123456789^\E\^^USSSA^SS||SMITH^WILLIAM^A^III||19610615|M||C|1200 N ELM STREET^^JERUSALEM^TN^99999?1020|GL|(999)999?1212|(999)999?3333||S||PATID12345001^2^M10^ADT1^AN^A|123456789|987654^NC NK1|1|SMITH^OREGANO^K|WI^WIFE||||NK^NEXT OF KIN PV1|1|I|2000^2012^01||||004777^CASTRO^FRANK^J.|||SUR||||ADM|A0

This message fails to parse. This is an example of what I am dealing with in regards to the messages I've been given.

ok, I will examine that

Hi Jaime, just checking in. Any developments with this?

Hi @jaime-olivares can you review this and see if this resolves this issue:

#115

I'm also having the same issue.

Hi @zeWizard is this going to be merged anytime soon? We are encountering the same issue.