Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

Code Block
languagelua
function HL7Normalize(Msg)
   local Result = Msg
   -- Get the | delimiter
   local D= Msg:sub(4,4)
   Result:gsub(D, "|")
   -- Repeat for the other 4 delimeters
   return Result
end

Solve a one off uncommon problems with a one off simple solutions - see separation of concerns.

In Iguana X the normalization can be done in a ‘neuron’ to handle this special edge case.