You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current parser behavior is to fill in any missing MSH-2 delimiters with the standard ones
According to the HL7 2.3 spec though
At any given site, the subset of the possible delimiters may be limited by negotiations between applications. This
implies that the receiving applications will use the agreed upon delimiters, as they appear in the Message Header
segment (MSH), to parse the message.
So it should be valid to use less delimiters. The issue is that by assuming the standard delimiters, python-hl7 will incorrectly split fields when parsing if a standard delimiter character (such as "&") is used in the content.
The text was updated successfully, but these errors were encountered:
I think the ideal behavior would be to raise an error if there aren't 4 delimiters, and provide a way for callers to specify the delimiters to fallback to (so they can opt in to the existing behavior if they want).
https://github.com/johnpaulett/python-hl7/blob/6d85f25d678e366d2617690d4ee1216bb8027db1/hl7/parser.py#L351-LL370
According to the HL7 2.3 spec though
So it should be valid to use less delimiters. The issue is that by assuming the standard delimiters, python-hl7 will incorrectly split fields when parsing if a standard delimiter character (such as "&") is used in the content.
The text was updated successfully, but these errors were encountered: