Skip to main content

A comprehensive set of tools for working with X12 EDI files

Project description

X12 EDI Tools

X12 EDI Tools Logo Python

A comprehensive Python library for working with X12 EDI (Electronic Data Interchange) files, commonly used in healthcare for claims processing, eligibility verification, and other administrative transactions.

Installation

Install the X12 EDI Tools library using pip:

pip install x12-edi-tools

Key Components

X12Parser

Parses X12 files into Python objects.

from x12_edi_tools.x12_parser import X12Parser

parser = X12Parser()
parsed_data = parser.parse("path/to/x12_file.edi")
print(parsed_data)

X12Generator

Generates X12 files from Python objects.

from x12_edi_tools.x12_generator import X12Generator

generator = X12Generator()
x12_content = generator.generate(data_dict)
with open("output.edi", "w") as f:
    f.write(x12_content)

X12Validator

Validates X12 files against standard formats and custom rules.

from x12_edi_tools.x_12_validator import X12Validator

validator = X12Validator()
is_valid, errors = validator.validate("path/to/x12_file.edi")
if not is_valid:
    print("Validation errors:", errors)

DentalClaimProcessor

Processes dental claims (837D transactions).

from x12_edi_tools.dental_claim_processor import DentalClaimProcessor

processor = DentalClaimProcessor()
claims = processor.process("path/to/837D_file.edi")
for claim in claims:
    print(f"Claim ID: {claim.claim_id}, Patient: {claim.patient_name}")

EligibilityChecker

Handles eligibility inquiries and responses (270/271 transactions).

from x12_edi_tools.eligibility_checker import EligibilityChecker

checker = EligibilityChecker()
request = checker.create_270_request(patient_data)
response = checker.process_271_response(response_data)
print(f"Patient eligible: {response.is_eligible}")

RemittanceAdviceParser

Parses remittance advice (835) transactions.

from x12_edi_tools.remittance_advise_parser import RemittanceAdviceParser

parser = RemittanceAdviceParser()
remittance = parser.parse("path/to/835_file.edi")
print(f"Total paid: ${remittance.total_paid}")

X12Converter

Converts X12 data to and from other formats like JSON and CSV.

from x12_edi_tools.x_12_converter import X12Converter

converter = X12Converter()
json_data = converter.to_json("path/to/x12_file.edi")
csv_data = converter.to_csv("path/to/x12_file.edi")

X12Encryptor

Encrypts and decrypts X12 data for secure transmission and storage.

from x12_edi_tools.x_12_encryptor import X12Encryptor

encryptor = X12Encryptor("your-secret-key")
encrypted_data = encryptor.encrypt("path/to/x12_file.edi")
decrypted_data = encryptor.decrypt(encrypted_data)

X12DatabaseIntegrator

Facilitates integration of X12 data with databases.

from x12_edi_tools.x_12_database_integrator import X12DatabaseIntegrator

integrator = X12DatabaseIntegrator("database_connection_string")
integrator.store_transaction("path/to/x12_file.edi")
transactions = integrator.retrieve_transactions(date_range)

X12Logger

Provides detailed logging of X12 operations for auditing and troubleshooting.

from x12_edi_tools.x_12_logger import X12Logger

logger = X12Logger("path/to/log/directory")
logger.log_parse("837", "path/to/837_file.edi", parse_result)
logger.log_generate("835", "path/to/835_file.edi", generation_data)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Contact

Don Johnson - dj@codetestcode.io

Project Link: https://github.com/donjohnson/x12-edi-tools

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

x12_edi_tools-0.1.2.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

x12_edi_tools-0.1.2-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file x12_edi_tools-0.1.2.tar.gz.

File metadata

  • Download URL: x12_edi_tools-0.1.2.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for x12_edi_tools-0.1.2.tar.gz
Algorithm Hash digest
SHA256 36ca105b9802161a2cd23c4a4f5fd6185bdcad8afc031599722e2701ee7df55f
MD5 33a8c0c929353f737c85f0175f40ca66
BLAKE2b-256 ad8f494edc0b8c5607d6ca02ea8baed94ca721adf429204c76d8818f00ee0356

See more details on using hashes here.

File details

Details for the file x12_edi_tools-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for x12_edi_tools-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 947501f3505be00a41021aebd05461eb338b9ac3f76dcffe5733e82ede080f76
MD5 aab1156c5514fb47c6ec01ddbee6260a
BLAKE2b-256 e1da35f50ed8b6627fb091c5d6708b9b568a3bdf7cbad55f2cffbd62e4f99305

See more details on using hashes here.

Supported by

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