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

getFinalizedMatch function needs to prioritize child loops over siblings #40

Closed
nddipiazza opened this issue Oct 22, 2020 · 1 comment
Closed

Comments

@nddipiazza
Copy link
Contributor

Let's say you have this 2400 loop:

LX*3~
SV1*HC:12345:12*12*AB*1*12**1**Y~
DTP*472*D8*20000101~
REF*6R*M1~
NM1*82*1*XXXXX*XXXXXX*X**XX*XX*XXXXXXXXXXX~

While this processes through the x12 reader iterator, the NM1 NM1*82*1*XXXXX*XXXXXX*X**XX*XX*XXXXXXXXXXX~ hits the getFinalizedMatch method to see if this indicates a new loop. Which it does.

The getFinalizedMatch will check for

  • 2310B
  • 2420A

In the if check, it checks for sibling first, then parent second.

This results in 2420A never being able to be parsed.

It should prefer the parent relationship above sibling, which would resolve this problem.

@nddipiazza
Copy link
Contributor Author

nevermind - you already fixed this

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

1 participant