Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser does not allow some permissible IN1 and IN2 field repetitions for HL7 v. 2.3 #191

Closed
afaonline opened this issue Mar 22, 2021 · 5 comments · Fixed by #192
Closed
Assignees
Labels
defect A deviation from the Requirements / Specification. help wanted
Milestone

Comments

@afaonline
Copy link

I've noticed that parser does not allow repetitions for IN1.3 "Insurance Company ID", while repetitions of this field is permitted by HL7 2.3. Also repetitions should be allowed for the IN1 fields 4–7, 9–11, 16, 19, 44, and 49.

By comparing the /src/NHapi.Model.V23/Segment/IN2.cs file and text of HL7 2.3 standard I can suppose that some IN2 fields also should be allowed to repeat. At the same time IN3 has all repetition flags set correctly according to HL7 v. 2.3 standard.

@milkshakeuk
Copy link
Member

@afaonline I have looked at the HL7 v2.3 specification for IN1 (section 6.4.6) and it looks like you are correct.
I also looked at the database that is used to generate the classes and I think I can see why this is happening:

Section 6.4.6 on the HL7 v2.3 specification
image

Query from the HL7 database
image

It looks at first glance like the database doesn't align with the specification... but it could also just be the query used to pull this information is incorrect, I have reached out to the maintainer of the database to see if this a query mistake or a database mistake.

@milkshakeuk milkshakeuk added defect A deviation from the Requirements / Specification. and removed awaiting review labels Mar 23, 2021
@milkshakeuk
Copy link
Member

@afaonline I have had a response from the database maintainer and this looks as though this is a database issue.

@milkshakeuk
Copy link
Member

@afaonline this defect is up for grabs, if you would like to create a PR to fix those IN1 and IN2 classes for the V2.3 models we would be more than greatfull.

afaonline pushed a commit to afaonline/nHapi that referenced this issue Mar 24, 2021
Due to errors in normative database for HL7 v. 2.3, IN1 and IN2 segments had incorrect repetition flags
@afaonline
Copy link
Author

I am not sure that it is OK to make changes in generated code, but I've created a pull request that fixes IN1 and IN2 field repetitions for HL7 v. 2.3

@milkshakeuk
Copy link
Member

@afaonline you are correct to be concerned about making changing to generated code however, the maintainer of the database isn't going provide an updated version in the immediate future.

Your PR will enable this fix to go out with the V3 release of nHapi, rather than wait for the next run of the source code generator.

The next planned re-run of the source code generator will be for V4 of nHapi (we already have a newer version of the database but it doesn't yet have the fixes described in this issue), at that time we will also be discontinuing support for .Net Framework 3.5 and only target netstandard2.0 and beyond (which covers .Net Framework 4.6.1 and above, Mono 4.6 and above, dotnet core 2.0 and above and of course .net5 and above)

@milkshakeuk milkshakeuk added this to the v3.0.0.0 milestone Mar 24, 2021
@milkshakeuk milkshakeuk added this to To Do in NHapi Kanban via automation Mar 24, 2021
afaonline pushed a commit to afaonline/nHapi that referenced this issue Mar 24, 2021
NHapi Kanban automation moved this from To Do to Development Done Mar 24, 2021
milkshakeuk added a commit that referenced this issue Mar 24, 2021
Update HL7 v. 2.3 IN1 and IN2 repeat flags for some fields, fixes #191
@milkshakeuk milkshakeuk moved this from Development Done to In Pre-Release in NHapi Kanban Jun 2, 2021
@milkshakeuk milkshakeuk moved this from In Pre-Release to Released in NHapi Kanban Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A deviation from the Requirements / Specification. help wanted
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants