-
Notifications
You must be signed in to change notification settings - Fork 95
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
834 5010 LS/LE (Loop 2700/2750) Additional Reporting Categories not correct #42
Comments
Thanks for the detail. I will update the 834 5010 E1 map to reflect the changes. The LS and LE segments are situational, unless there are 2700 loops, in which case they are required. I have code to handle these odd X12 structures - just have to test. Do you have any test 834 files? If not, I can create some simple examples. Will need to do regression tests against some currently valid 834 files. The validation script (x12valid.py) can be passed an alternate path to a set of X12 map files. The script looks in that path for the 'maps.xml' file - which is a lookup from the Interchange Control Version Number (ISA12), Functional Identifier Code (GS01), and Version / Release / Industry Identifier Code (GS08) fields to a xml map filename for that transaction. You can copy the map folder to another location and test your v2 maps from there. |
Here is a sample 834 (de-identified of course) - that should serve as a good test dataset for handling LS/LE.
Thanks for the tip on the x12valid.py. Does that mean the modules: x12xml.py and xmlx12.py currently do not implement using specific map versions or modified maps? Or am I to interpret that the procedure is as follows:
Much appreciated, great library - if I can understand it better, I might be able to contribute more... |
Is this still an issue? I was thinking of using this library for an 834 file. Appreciate the work so far! |
I don't think I completed this. I started work on a branch nine months ago. I'll take a look at where it is now. https://github.com/azoner/pyx12/tree/fix-834-LS-2700-loop |
Appreciate it! At the moment, the 834 file/generation service I am testing passes...so I am not sure if the spec is wrong or what. Ill have to double check. The package is working on all the other validation scenarios which is great (thanks!). |
I am persistently running into errors with the LS segment. Here is a snippet from my output when calling 2018-06-13 14:28:56,450 DEBUG X12 control file: x12.control.00501.xml
2018-06-13 14:28:56,450 DEBUG Looking for map file 'x12.control.00501.xml' in pkg_resources
2018-06-13 14:28:56,451 DEBUG Create map from x12.control.00501.xml
2018-06-13 14:28:56,451 DEBUG Looking for codes file 'codes.xml' in pkg_resources
2018-06-13 14:28:56,457 DEBUG Looking for data element definition file 'dataele.xml' in pkg_resources
2018-06-13 14:28:56,460 DEBUG Looking for map index file 'maps.xml' in pkg_resources
2018-06-13 14:28:56,462 DEBUG Looking for map file '834.5010.X220.A1.xml' in pkg_resources
2018-06-13 14:28:56,462 DEBUG Create map from 834.5010.X220.A1.xml
2018-06-13 14:28:56,467 DEBUG Looking for codes file 'codes.xml' in pkg_resources
2018-06-13 14:28:56,473 DEBUG Looking for data element definition file 'dataele.xml' in pkg_resources
2018-06-13 14:28:56,484 DEBUG Map file: 834.5010.X220.A1.xml
2018-06-13 14:28:56,499 ERROR Line:34 SEG:1 - Segment LS*2700 not found. Started at /ISA_LOOP/GS_LOOP/ST_LOOP/DETAIL/2000/2300/REF[17]
2018-06-13 14:28:56,500 ERROR Line:36 SEG:3 - Mandatory segment "Provider Name" (NM1) missing
2018-06-13 14:28:56,501 ERROR Line:40 SEG:4 - Loop 2750 exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,502 ERROR Line:43 SEG:5 - Segment LX exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,503 ERROR Line:44 SEG:4 - Loop 2750 exceeded max count. Found 3, should have 1
2018-06-13 14:28:56,504 ERROR Line:47 SEG:5 - Segment LX exceeded max count. Found 3, should have 1
2018-06-13 14:28:56,504 ERROR Line:48 SEG:4 - Loop 2750 exceeded max count. Found 4, should have 1
2018-06-13 14:28:56,505 ERROR Line:51 SEG:5 - Segment LX exceeded max count. Found 4, should have 1
2018-06-13 14:28:56,506 ERROR Line:52 SEG:4 - Loop 2750 exceeded max count. Found 5, should have 1
2018-06-13 14:28:56,506 ERROR Line:54 SEG:5 - Segment LX exceeded max count. Found 5, should have 1
2018-06-13 14:28:56,507 ERROR Line:55 SEG:4 - Loop 2750 exceeded max count. Found 6, should have 1
2018-06-13 14:28:56,508 ERROR Line:58 SEG:5 - Segment LX exceeded max count. Found 6, should have 1
2018-06-13 14:28:56,508 ERROR Line:59 SEG:4 - Loop 2750 exceeded max count. Found 7, should have 1
2018-06-13 14:28:56,509 ERROR Line:61 SEG:5 - Segment LX exceeded max count. Found 7, should have 1
2018-06-13 14:28:56,509 ERROR Line:62 SEG:4 - Loop 2750 exceeded max count. Found 8, should have 1
2018-06-13 14:28:56,510 ERROR Line:65 SEG:5 - Segment LX exceeded max count. Found 8, should have 1
2018-06-13 14:28:56,511 ERROR Line:66 SEG:4 - Loop 2750 exceeded max count. Found 9, should have 1
2018-06-13 14:28:56,512 ERROR Line:69 SEG:5 - Segment LX exceeded max count. Found 9, should have 1
2018-06-13 14:28:56,513 ERROR Line:70 SEG:4 - Loop 2750 exceeded max count. Found 10, should have 1
2018-06-13 14:28:56,514 ERROR Line:74 SEG:3 - Mandatory segment "Additional Reporting Categories" (LS) missing
2018-06-13 14:28:56,521 ERROR Line:93 SEG:1 - Segment LS*2700 not found. Started at /ISA_LOOP/GS_LOOP/ST_LOOP/DETAIL/2000/2300/REF[17]
2018-06-13 14:28:56,522 ERROR Line:95 SEG:3 - Mandatory segment "Provider Name" (NM1) missing
2018-06-13 14:28:56,523 ERROR Line:99 SEG:4 - Loop 2750 exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,524 ERROR Line:102 SEG:5 - Segment LX exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,524 ERROR Line:103 SEG:4 - Loop 2750 exceeded max count. Found 3, should have 1
2018-06-13 14:28:56,525 ERROR Line:106 SEG:5 - Segment LX exceeded max count. Found 3, should have 1
2018-06-13 14:28:56,526 ERROR Line:107 SEG:4 - Loop 2750 exceeded max count. Found 4, should have 1
2018-06-13 14:28:56,527 ERROR Line:110 SEG:5 - Segment LX exceeded max count. Found 4, should have 1
2018-06-13 14:28:56,527 ERROR Line:111 SEG:4 - Loop 2750 exceeded max count. Found 5, should have 1
2018-06-13 14:28:56,528 ERROR Line:115 SEG:3 - Mandatory segment "Additional Reporting Categories" (LS) missing
2018-06-13 14:28:56,546 ERROR Line:152 SEG:1 - Segment LS*2700 not found. Started at /ISA_LOOP/GS_LOOP/ST_LOOP/DETAIL/2000/2300/2310/PER
2018-06-13 14:28:56,547 ERROR Line:154 SEG:3 - Mandatory segment "Provider Name" (NM1) missing
2018-06-13 14:28:56,548 ERROR Line:158 SEG:4 - Loop 2750 exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,549 ERROR Line:161 SEG:5 - Segment LX exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,550 ERROR Line:162 SEG:4 - Loop 2750 exceeded max count. Found 3, should have 1
2018-06-13 14:28:56,551 ERROR Line:165 SEG:5 - Segment LX exceeded max count. Found 3, should have 1
2018-06-13 14:28:56,551 ERROR Line:166 SEG:4 - Loop 2750 exceeded max count. Found 4, should have 1
2018-06-13 14:28:56,552 ERROR Line:169 SEG:5 - Segment LX exceeded max count. Found 4, should have 1
2018-06-13 14:28:56,553 ERROR Line:170 SEG:4 - Loop 2750 exceeded max count. Found 5, should have 1
2018-06-13 14:28:56,553 ERROR Line:173 SEG:5 - Segment LX exceeded max count. Found 5, should have 1
2018-06-13 14:28:56,554 ERROR Line:174 SEG:4 - Loop 2750 exceeded max count. Found 6, should have 1
2018-06-13 14:28:56,555 ERROR Line:177 SEG:5 - Segment LX exceeded max count. Found 6, should have 1
2018-06-13 14:28:56,555 ERROR Line:178 SEG:4 - Loop 2750 exceeded max count. Found 7, should have 1
2018-06-13 14:28:56,556 ERROR Line:181 SEG:5 - Segment LX exceeded max count. Found 7, should have 1
2018-06-13 14:28:56,557 ERROR Line:182 SEG:4 - Loop 2750 exceeded max count. Found 8, should have 1
2018-06-13 14:28:56,558 ERROR Line:186 SEG:3 - Mandatory segment "Additional Reporting Categories" (LS) missing
2018-06-13 14:28:56,569 ERROR Line:217 SEG:1 - Segment LS*2700 not found. Started at /ISA_LOOP/GS_LOOP/ST_LOOP/DETAIL/2000/2300/REF[17]
2018-06-13 14:28:56,570 ERROR Line:219 SEG:3 - Mandatory segment "Provider Name" (NM1) missing
2018-06-13 14:28:56,571 ERROR Line:223 SEG:4 - Loop 2750 exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,572 ERROR Line:226 SEG:5 - Segment LX exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,573 ERROR Line:227 SEG:4 - Loop 2750 exceeded max count. Found 3, should have 1
2018-06-13 14:28:56,574 ERROR Line:230 SEG:5 - Segment LX exceeded max count. Found 3, should have 1
2018-06-13 14:28:56,574 ERROR Line:231 SEG:4 - Loop 2750 exceeded max count. Found 4, should have 1
2018-06-13 14:28:56,575 ERROR Line:234 SEG:5 - Segment LX exceeded max count. Found 4, should have 1
2018-06-13 14:28:56,576 ERROR Line:235 SEG:4 - Loop 2750 exceeded max count. Found 5, should have 1
2018-06-13 14:28:56,577 ERROR Line:238 SEG:5 - Segment LX exceeded max count. Found 5, should have 1
2018-06-13 14:28:56,577 ERROR Line:239 SEG:4 - Loop 2750 exceeded max count. Found 6, should have 1
2018-06-13 14:28:56,578 ERROR Line:242 SEG:5 - Segment LX exceeded max count. Found 6, should have 1
2018-06-13 14:28:56,579 ERROR Line:243 SEG:4 - Loop 2750 exceeded max count. Found 7, should have 1
2018-06-13 14:28:56,580 ERROR Line:246 SEG:5 - Segment LX exceeded max count. Found 7, should have 1
2018-06-13 14:28:56,580 ERROR Line:247 SEG:4 - Loop 2750 exceeded max count. Found 8, should have 1
2018-06-13 14:28:56,581 ERROR Line:250 SEG:5 - Segment LX exceeded max count. Found 8, should have 1
2018-06-13 14:28:56,581 ERROR Line:251 SEG:4 - Loop 2750 exceeded max count. Found 9, should have 1
2018-06-13 14:28:56,583 ERROR Line:255 SEG:3 - Mandatory segment "Additional Reporting Categories" (LS) missing
2018-06-13 14:28:56,596 ERROR Line:288 SEG:1 - Segment LS*2700 not found. Started at /ISA_LOOP/GS_LOOP/ST_LOOP/DETAIL/2000/2300/REF[17]
2018-06-13 14:28:56,597 ERROR Line:290 SEG:3 - Mandatory segment "Provider Name" (NM1) missing
2018-06-13 14:28:56,598 ERROR Line:294 SEG:4 - Loop 2750 exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,599 ERROR Line:297 SEG:5 - Segment LX exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,600 ERROR Line:298 SEG:4 - Loop 2750 exceeded max count. Found 3, should have 1
2018-06-13 14:28:56,601 ERROR Line:301 SEG:5 - Segment LX exceeded max count. Found 3, should have 1
2018-06-13 14:28:56,601 ERROR Line:302 SEG:4 - Loop 2750 exceeded max count. Found 4, should have 1
2018-06-13 14:28:56,602 ERROR Line:305 SEG:5 - Segment LX exceeded max count. Found 4, should have 1
2018-06-13 14:28:56,603 ERROR Line:306 SEG:4 - Loop 2750 exceeded max count. Found 5, should have 1
2018-06-13 14:28:56,604 ERROR Line:309 SEG:5 - Segment LX exceeded max count. Found 5, should have 1
2018-06-13 14:28:56,604 ERROR Line:310 SEG:4 - Loop 2750 exceeded max count. Found 6, should have 1
2018-06-13 14:28:56,605 ERROR Line:313 SEG:5 - Segment LX exceeded max count. Found 6, should have 1
2018-06-13 14:28:56,605 ERROR Line:314 SEG:4 - Loop 2750 exceeded max count. Found 7, should have 1
2018-06-13 14:28:56,606 ERROR Line:317 SEG:5 - Segment LX exceeded max count. Found 7, should have 1
2018-06-13 14:28:56,607 ERROR Line:318 SEG:4 - Loop 2750 exceeded max count. Found 8, should have 1
2018-06-13 14:28:56,608 ERROR Line:321 SEG:5 - Segment LX exceeded max count. Found 8, should have 1
2018-06-13 14:28:56,608 ERROR Line:322 SEG:4 - Loop 2750 exceeded max count. Found 9, should have 1
2018-06-13 14:28:56,610 ERROR Line:326 SEG:3 - Mandatory segment "Additional Reporting Categories" (LS) missing
2018-06-13 14:28:56,617 ERROR Line:346 SEG:1 - Segment LS*2700 not found. Started at /ISA_LOOP/GS_LOOP/ST_LOOP/DETAIL/2000/2300/REF[17]
2018-06-13 14:28:56,618 ERROR Line:348 SEG:3 - Mandatory segment "Provider Name" (NM1) missing
2018-06-13 14:28:56,619 ERROR Line:352 SEG:4 - Loop 2750 exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,620 ERROR Line:355 SEG:5 - Segment LX exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,621 ERROR Line:356 SEG:4 - Loop 2750 exceeded max count. Found 3, should have 1
2018-06-13 14:28:56,622 ERROR Line:359 SEG:5 - Segment LX exceeded max count. Found 3, should have 1
2018-06-13 14:28:56,622 ERROR Line:360 SEG:4 - Loop 2750 exceeded max count. Found 4, should have 1
2018-06-13 14:28:56,623 ERROR Line:363 SEG:5 - Segment LX exceeded max count. Found 4, should have 1
2018-06-13 14:28:56,624 ERROR Line:364 SEG:4 - Loop 2750 exceeded max count. Found 5, should have 1
2018-06-13 14:28:56,625 ERROR Line:368 SEG:3 - Mandatory segment "Additional Reporting Categories" (LS) missing
2018-06-13 14:28:56,635 ERROR Line:395 SEG:1 - Segment LS*2700 not found. Started at /ISA_LOOP/GS_LOOP/ST_LOOP/DETAIL/2000/2300/REF[17]
2018-06-13 14:28:56,636 ERROR Line:397 SEG:3 - Mandatory segment "Provider Name" (NM1) missing
2018-06-13 14:28:56,637 ERROR Line:401 SEG:4 - Loop 2750 exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,639 ERROR Line:405 SEG:3 - Mandatory segment "Additional Reporting Categories" (LS) missing
2018-06-13 14:28:56,645 ERROR Line:423 SEG:1 - Segment LS*2700 not found. Started at /ISA_LOOP/GS_LOOP/ST_LOOP/DETAIL/2000/2300/REF[17]
2018-06-13 14:28:56,645 ERROR Line:425 SEG:3 - Mandatory segment "Provider Name" (NM1) missing
2018-06-13 14:28:56,647 ERROR Line:429 SEG:4 - Loop 2750 exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,648 ERROR Line:433 SEG:3 - Mandatory segment "Additional Reporting Categories" (LS) missing
2018-06-13 14:28:56,654 ERROR Line:451 SEG:1 - Segment LS*2700 not found. Started at /ISA_LOOP/GS_LOOP/ST_LOOP/DETAIL/2000/2300/REF[17]
2018-06-13 14:28:56,655 ERROR Line:453 SEG:3 - Mandatory segment "Provider Name" (NM1) missing
2018-06-13 14:28:56,656 ERROR Line:457 SEG:4 - Loop 2750 exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,658 ERROR Line:461 SEG:3 - Mandatory segment "Additional Reporting Categories" (LS) missing
2018-06-13 14:28:56,664 ERROR Line:479 SEG:1 - Segment LS*2700 not found. Started at /ISA_LOOP/GS_LOOP/ST_LOOP/DETAIL/2000/2300/REF[17]
2018-06-13 14:28:56,665 ERROR Line:481 SEG:3 - Mandatory segment "Provider Name" (NM1) missing
2018-06-13 14:28:56,666 ERROR Line:485 SEG:4 - Loop 2750 exceeded max count. Found 2, should have 1
2018-06-13 14:28:56,667 ERROR Line:489 SEG:3 - Mandatory segment "Additional Reporting Categories" (LS) missing
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/x12html", line 11, in <module>
load_entry_point('pyx12==2.3.3', 'console_scripts', 'x12html')()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyx12-2.3.3-py2.7.egg/pyx12/scripts/x12html.py", line 121, in main
fd_997=None, fd_html=fd_html, fd_xmldoc=None, map_path=args.map_path)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyx12-2.3.3-py2.7.egg/pyx12/x12n_document.py", line 194, in x12n_document
valid &= node.is_valid(seg, errh)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyx12-2.3.3-py2.7.egg/pyx12/map_if.py", line 992, in is_valid
(subele_node.name, subele_node.refdes)
AttributeError: 'NoneType' object has no attribute 'name' It looks like it is looking for the LS*2700 segment to be in the 2300 loop and since its not there, throws an error, but I am not entirely sure. Been trying to debug this for some time now, any help would be greatly appreciated. |
The test file provided by ddw360 recreates this error. I will work on a solution. |
@azoner thank you for the heads up, happy to help if needed. |
I originally converted the 834 map from 4010 to 5010 by hand. I probably
just missed a change in those loops.
On Sun, Jun 17, 2018 at 9:24 AM John Cade ***@***.***> wrote:
@azoner <https://github.com/azoner> does this have anything to do with #44
<#44>? What do you think needs
addressing? Im going to start working on a fix.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA4s7DUOyNz_SInIwmXTY6H15ePAHiD8ks5t9oLOgaJpZM4GTiOJ>
.
--
---------------------
John Holland
a <[email protected]>[email protected]
|
@azoner appears that composite segments fail as well. |
@azoner @johncade Summation of Errata (version 5, revision 1 aka 005010X220A1)
Hope that helps. |
https://screenpresso.com/=YcPDg assume inside of loop 2000, typically after Loop 2300LS*2700~ |
The update fixes the issue with 2700. The test file posted by @ddw360 now passes. |
@azoner Hi John - it has been a while - but I am encountering an issue with a new submitter that technically falls into "standards" (834 005010X220A1). I wonder if this Issue should be re-opened or we need to file a new issue. It is definitely related however to Loop 2700 logic. It seems there is an issue where if LX01 values outside of a LS2700/LE2700 (Loop 2700 wrapper) are the same as LX01 values inside the LS2700/LE2700 (Loop 2700 wrapper) - that we get an issue: See pastebin link for an example file that should be considered valid for 834 005010X220A1 processing. What should happen is the LX segments where the LX01 value matches an LX01 value in the LS/LE Loop 2700 envelope - should not be colliding. It looks like they are in somehow. Another possibility - if collision of LX01 values is not the issue - is that the LX01 values are being expected to be 100% sequential and contiguous within the LS/LE Loop 2700, but all that is required is that they be unique and sequential - but not necessarily contiguous. So basically:
|
The 005010X220A1-834 Benefit Enrollment and Maintenance TR3 Errata report published June 2010, specifies corrections to handling of LS/LE Loop envelope for Additional Reporting Categories.
See for reference sample data structure to use to test:
Click Link Here
Changes that needed to be addressed:
Recommended change to V2 map (not tested, still trying to figure out how to have library force use of correct map!!): 834.5010.X220.A1.v2.xml
The text was updated successfully, but these errors were encountered: