Closed ghost closed 2 years ago
@IanGralinski-Invetech thank you for this, I will look into this as soon as I can.
@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 NonGreedyMode
to 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 I may have some time to pick this feature up in November, but may get delayed until December/January.
@milkshakeuk I have started looking into fixing this issue.
Do I need permissions to be able to push changes to this repo? Or is there a different process for creating pull requests?
@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.
Describe the bug When using the
PipeParser
to parse anOML_O33
message with ORDER group repetitions, the repetitions are not in the parsed message structure. Only the first ORDER group is present.To Reproduce
Expected behaviour Expect that
orderReps
is 2, and that bothORC
andOBR
segments can be queried.Actual behaviour
orderReps
is 1, and only the firstORC
andOBR
segments exist.Sample HL7
Environmental Details (please complete the following information):
Additional context It looks like this problem also existed for the Java implementation (https://sourceforge.net/p/nhapi/discussion/569648/thread/3e0c39b1/).