Skip to main content

HIPAA X12 validator, parser and converter

Project description

Pyx12

Build Status

Pyx12 is a HIPAA X12 document validator and converter. It parses an ANSI X12N data file and validates it against a representation of the Implementation Guidelines for a HIPAA transaction. By default, it creates a 997 response for 4010 and a 999 response for 5010. It can create an html representation of the X12 document or can translate to and from an XML representation of the data file.

Usage

As a command line X12 validator

x12valid.exe <filename>

Fixes common X12 structural errors. Can add or remove line breaks. Can fix loop and segment counting.

x12norm.exe --fix --eol <filename>

Code Examples

Iterate over a loop.  Alter children. Show changes
    src = pyx12.x12context.X12ContextReader(param, errh, fd_in)
    for datatree in src.iter_segments('2300'):
        # do something with a 2300 claim loop
        # we have access to the 2300 loop and all its children
        for loop2400 in datatree.select('2400'):
            print(loop2400.get_value('SV101'))
            # update something
            loop2400.set_value('SV102', 'xx')
            # delete something
            if loop2400.exists('PWK'):
                loop2400.delete('PWK')
        # iterate over all the child segments
        for seg_node in datatree.iterate_segments():
            print(seg_node.format())

Install

uv pip install pyx12

Licensing

Pyx12 uses a BSD license. The full license text is included with the source code for the package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyx12-3.1.0rc3.tar.gz (529.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyx12-3.1.0rc3-py2.py3-none-any.whl (616.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pyx12-3.1.0rc3.tar.gz.

File metadata

  • Download URL: pyx12-3.1.0rc3.tar.gz
  • Upload date:
  • Size: 529.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyx12-3.1.0rc3.tar.gz
Algorithm Hash digest
SHA256 a07c15cc2ddc60efc98233f84d902a60f16bc1eeb776af1c5e6895b155b19aac
MD5 85168d16ffa26c56e8258723491c0a72
BLAKE2b-256 4f9c68a2448a99095ee2a7c992783c8cb7139049d24adb4ed0d597eff2135d65

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyx12-3.1.0rc3.tar.gz:

Publisher: release.yml on azoner/pyx12

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyx12-3.1.0rc3-py2.py3-none-any.whl.

File metadata

  • Download URL: pyx12-3.1.0rc3-py2.py3-none-any.whl
  • Upload date:
  • Size: 616.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyx12-3.1.0rc3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 df1210aa741599d1d315704200199872661bae79ce53ae28cacbce302d8c6bcd
MD5 d18d0975b636fa4c57c6f6370bd83512
BLAKE2b-256 0b5102c06ee4cae93fb0f74107e6243eae90c019150dd12ac710c45d5736b213

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyx12-3.1.0rc3-py2.py3-none-any.whl:

Publisher: release.yml on azoner/pyx12

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page