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

Repetitions Used sometime 1 instead of 0 #16

Open
kyra-diablo opened this issue Mar 25, 2015 · 2 comments
Open

Repetitions Used sometime 1 instead of 0 #16

kyra-diablo opened this issue Mar 25, 2015 · 2 comments

Comments

@kyra-diablo
Copy link

Even if a message does not contain a segment, the repetitions used property can be still 1.

E.g. in the test called TestOBR5RepeatingValuesMessage (in ParserTest.cs), the ORU message does not contain NK1 segments, but adding the following assert fails the test:
Assert.AreEqual(0, oru.GetPATIENT_RESULT(0).PATIENT.NK1RepetitionsUsed);

I have the problem with all sort of messages (2.4 version too).

@duaneedwards
Copy link
Collaborator

This seems like a pretty deep problem within the code generator / parser when handling groups. The behaviour is that for a group (i.e. in this case the ORU_R01_Patient group), all of it's known message structures get added (regardless of whether or not they exist), and then parsed into / extra segments created as needed.

So you'll always get a count of at least 1 for segments in a group, whether they exist or not. And since there is no easy way to determine if a segment is actually populated ... this can't be easily resolved.

@milkshakeuk
Copy link
Member

@duaneedwards I think this is something that likely isn't going to be fixed any time soon, maybe we mark this with a wontfix label and close for now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants