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
{{ message }}
HL7 2.5.1: Failure to parse ORDER group repetitions in OML_O33 #232
Describe the bug
When using the PipeParser to parse an OML_O33 message with ORDER group repetitions, the repetitions are not in the parsed message structure. Only the first ORDER group is present.
It seems that this is due to the message structure and ambiguous choice of where nhapi should put a segment, the java hapi library uses a configuration option NonGreedyMode to deal with these messages which have ambiguous message structures.
We could look to bring that configuration into hapi. I don't suppose you are interested or have time to contribute to nhapi and maybe pick this feature up?
Activity
milkshakeuk commentedon Sep 23, 2021
@iangralinski-invetech thank you for this, I will look into this as soon as I can.
milkshakeuk commentedon Oct 4, 2021
@iangralinski-invetech I think this and #65 are related.
It seems that this is due to the message structure and ambiguous choice of where nhapi should put a segment, the java hapi library uses a configuration option
NonGreedyModeto deal with these messages which have ambiguous message structures.See hapi docs here.
We could look to bring that configuration into hapi. I don't suppose you are interested or have time to contribute to nhapi and maybe pick this feature up?
milkshakeuk commentedon Nov 9, 2021
@iangralinski-invetech hi, same process as most repos i.e. fork the repo then create a pull request.
I think we should follow the pattern of newtonsoft or the new System.Text.JSON as an example in terms of how nhapi should do "settings" or "options".
Then over time we can add more options nhapi doesn't have which hapi does.
There can be global (default) settings and ones you choose at Parse time for circumstances like the one you mentioned.
Issue nHapiNET#232 (HL7 2.5.1: Failure to parse ORDER group repetitio…
* Changed Parsers so that ParserConfiguration is passed in when calli…
Changed default arguments to use overloading to address static analys…
Added default ParserConfiguration as a static member of ParserBase.
Updated PipeParser to throw an exception if the provided ParserConfig…
Added unit test to check that exception is thrown when provided Parse…
Copied two PipeParser unit tests from HAPI.
Renamed ParserConfiguration to ParserOptions.
Renamed parameters/variables to follow change of ParserConfiguration …
Moved test data messages for non-greedy mode to a separate file.
Changed Environment.NewLine to explicit "\r\n" since the text file re…
Updated test to use pattern-based switch statement.
Merge pull request #240 from IanGralinski-Invetech/issue232_failure_t…