Add 5010 Dental (837D / X224A2) map - #1
Open
xuzahn wants to merge 1 commit into
Open
Conversation
pyx12 ships maps for 5010 Professional (X222A1) and Institutional (X223A2) but not Dental. Add the 837D X224A2 implementation-guide map and register it in maps.xml so files with GS08=005010X224A2 / GS01=HC resolve and validate. The map reuses the existing codes.xml / dataele.xml — no new code or data-element definitions are required. Coverage (both layers per project convention): - unit: map_index resolves 005010X224A2/HC -> 837.5010.X224.A2.xml / 837D - regression: simple_837d drives a clean dental claim through x12n_document; the 999 acks A (IK5*A / AK9*A*1*1*1) and the JSON output is asserted exact. Note: this map carries a few deliberate deviations from the strict X224A2 IG (SV311 loosened R->S; 2000C/2010CA patient loops, HCP, CN1 and 2010BB REF kept Situational; DN1/DN2 added to 2300) so it parses both CMS Medicare and commercial dental traffic. Documented in the map header. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add 5010 Dental (837D / X224A2) map
What
pyx12 ships 5010 maps for Professional (X222A1) and Institutional (X223A2) claims, but not Dental. This PR adds the 837D X224A2 implementation-guide map (built from the X224A2 TR3) and registers it in
maps.xml, so interchanges withGS01=HC/GS08=005010X224A2resolve and validate (and generate 999 acknowledgements) like the other 837 variants.Changes
pyx12/map/837.5010.X224.A2.xml— the new dental map (standard pyx12 map XML; reuses the existingcodes.xml/dataele.xml, so no new code or data-element definitions are required).pyx12/map/maps.xml— one new entry undericvn="00501":<map vriic="005010X224A2" fic="HC" abbr="837D">837.5010.X224.A2.xml</map>test_map_index.py—map_indexresolves005010X224A2 / HC→837.5010.X224.A2.xml/ abbr837D(default map dir + explicit map path).test_x12n_document.py+x12testdata.py— newsimple_837dfixture drives a clean dental claim end-to-end throughx12n_document; the 999 acks accepted (IK5*A/AK9*A*1*1*1) and the JSON output is asserted exact. (Sample claim is fully synthetic.)Validation
Full suite green: 604 passed.
ruff format+ruff check --select Iclean on the changed Python files.One thing worth a maintainer's eye
The map is TR3-derived. The Loop 2300 diagnosis segment
HI[ABK]is currently marked Required; the X224A2 IG treats the diagnosis HI as Situational (dental claims often carry no diagnosis). Flagging it in case you'd prefer it relaxed toSto track the IG exactly — happy to adjust.🤖 Generated with Claude Code