Closed giannisptr closed 2 years ago
@giannisptr having had a quick look at the hl7 V2.5 specification QPD-3
is not repeatable.
@giannisptr you can have multiple QPD
segments though, have you tried that?
@giannisptr this could still be a valid issue, the hapi test panel seems to parse the message correctly.
@giannisptr looks like this is the line causing your issue: https://github.com/nHapiNET/nHapi/blob/fc250def8435142d9e79043c47faaa090b7c4018/src/NHapi.Base/Model/AbstractSegment.cs#L170
seems that hapi doesn't do this max repetition check, I tested removing this check in nHapi and it seemed to work fine.
Looks like hapi had the max repetition check in the code base but commented out until this commit on 6 Aug 2012 when they just removed the commented out max repetition check altogether.
@giannisptr this can be fixed but will require a new version of nhapi which will require you to update past v2.5.0.6.
Yes no problem i can go to the lattest version. So are you going to provide an updated version? I will get it from nuget?
@giannisptr before I go ahead with this, I am going to do some more digging around QPD-3 as I'm still not convinced its repeatable.
Based on the IHE TF (https://www.ihe.net/uploadedFiles/Documents/ITI/IHE_ITI_TF_Rev10.0_Vol2a_FT_2013-09-27.pdf) it should be. It defines for ITI-21 transaction that: "Field QPD-3-Demographics Fields consists of one or more repetitions, each of which contains two components that together contain the name and value of a distinct parameter to the query. "
@giannisptr I have included a unit test in the PR, I may still go ahead just to be in line with hapi, but I'm just reaching out to some people to see if according to the hl7 v2.5 specification its repeatable.
I checked the specification pdf but it's not clear.
@giannisptr in case you're interested on the outcome of my digging you should be able to see it here: https://chat.fhir.org/#narrow/stream/229447-V2
I have evaluated this also with IHE tools and it is successful with repeatable QPD-3 as you can see here: https://gazelle.ihe.net/EVSClient/hl7v2Result.seam?&oid=1.3.6.1.4.1.12559.11.1.2.1.4.1664549
@giannisptr I have published the changes in nuget package v3.1.1, when you update you might have to fix some namespaces specifically the validation namespace which has been case corrected.
There is a newer version of nhapitools also which supports nhapi v3.X.
ok thank you very much
When sending an ITI-21 PDQ message with multiple query parameters in QPD-3 field i receive the following exception when parsing the message:
Can't get repetition 2 from field 3 - maximum repetitions is only 1 reps.: Segment: QPD (rep 0) Field #3
Base on PDQ definition this should be allowed
Sample code
Sample HL7
Versions nHapi version: v2.5.0.6 NHapiTools version: v1.11.0.5
How can i solve this problem?