-
Notifications
You must be signed in to change notification settings - Fork 41
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
CLM is never in a 2300 loop but should always be. #53
Comments
I wasn't able to reproduce this. Here is the code from the unit test I wrote. I put the data you provided in the test.txt file. ` URL url = this.getClass().getResource("/837_5010/test.txt");
|
In my case the code isn't explicitly looking for the 2300 loop, Instead, once the 837 is loaded, it starts at the top and goes through each loop, segment, element and value and they are loaded into a Java data model. Does the 2300 loop not show up when using methods like |
Here are some examples that might help: This gets the top of the overall structure Now lets get the first loop 2000B in the structure If you do loop2000B.getLoops() it will return Loop 2300 since it is a direct child loop of Loop 2000B. getLoops() won't return Loop 2400 directly since it is one level down and a child loop of Loop 2300. You will need to call getLoops() on the 2300 loop object to get to the Loop object for 2400. To get loop 2400 directly from loop 2000B (or any other loop higher than loop 2400) you can do something like this: Hopefully this helps answer your question. |
Closing this as not-a-bug. It turns out in our document builder code, we were not restoring the parent loop when descending into child loops. The 2300 loops was the symptom that made this error apparent. Thanks for the great library! |
According to the 837 technical references such as this [1] the CLM segment should be in the 2300 loop. However, using the X12 parser library I'm consistently seeing it being in the 2400 loop when present.
My code is using the ANSI837_5010_X222 file type.
[1] https://ushik.ahrq.gov/ViewItemDetails?&system=apcd&itemKey=196746000
Below is a sample 837 that I've hopefully correctly scrubbed without damaging the content:
When parsed by the X12 library the patient MRN (OPI56804) is reported as being in the 2400 loop when it should be in the 2300 loop.
The text was updated successfully, but these errors were encountered: