...
In Chameleon my first HL7 parser product I went to great effort to faithfully implement this part of the standard. What a waste of effort! Nowadays if I were to write an HL7 parser from scratch I wouldn’t implement this feature of HL7 as a core part of the filterparser.
Instead if a customer encountered the way that makes sense to solve the problem is just to preprocess the data with a normalization script like this:
...