ADT^A31 v2.5 message gets parsed as ADT^A05 v2.5 #598
|
Describe the bug To Reproduce Expected behaviour Sample HL7 Environmental Details (please complete the following information):
Additional context |
Replies: 12 comments 1 reply
|
I've created a fork to investigate this issue: https://github.com/eloekset/nHapi/tree/feature/issue-597-investigate-parsing I had to upgrade .NET and various packages to be able to run tests in VS2022, so I did that in a separate commit before adding the unit test used to debug as shown in the screenshot above. |
|
@eloekset hello, thanks for raising an issue, have you read the wiki page about event mapping? The reason why is because this is how the Java hapi library works of which this is a port, they have a Faq with a question covering this here. the event mapping for 2.5 maps A31 to A05 accoring to the map Please let me know if I have missunderstood. |
|
there is a section in the wiki which explains how this can be done There is also a unit test showing this in action: |
|
I created a new branch instead of rebasing, since the NUnit stuff was already updated for VS2022. I've pushed my latest attempt here: https://github.com/eloekset/nHapi/tree/feature/issue-597-investigate-parsing-2
|
|
the |
|
did you see this bit in the wiki when parsing? var parser = new PipeParser();
var parsed = parser.Parse(message, "2.2.CustomZ");Notice the second argument, it tells the parser to use the custom version when parsing. |









did you see this bit in the wiki when parsing?
Notice the second argument, it tells the parser to use the custom version when parsing.