edi-cli

The modern, open-source EDI toolkit

A developer-first toolkit for parsing, validating, and transforming Electronic Data Interchange (EDI) files.
Built with Python, FastAPI, and Pydantic

Getting Started

Parse EDI 835 healthcare claims in minutes with comprehensive examples

1. Installation
$ pip install edi-cli
# Installs core library with 835 parser
2. Basic Parsing
from packages.core.transactions.t835.parser import Parser835
parser = Parser835()
result = parser.parse(edi_content)
t835 = result.interchanges[0]
.functional_groups[0].transactions[0].transaction_data

📋 Extract Payer & Payee Information

# Access payer details
print(f"Payer: {t835.payer.name}")
print(f"Payer ID: {t835.payer.identification}")
# Access payee details
print(f"Payee: {t835.payee.name}")
print(f"Total Paid: ${t835.financial_information.total_paid}")
Payer: AETNA BETTER HEALTH
Payer ID: 12345
Payee: ACME MEDICAL CENTER
Total Paid: $15,432.50

💰 Process Individual Claims

# Iterate through all claims
for claim in t835.claims:
print(f"Claim ID: {claim.claim_id}")
print(f"Patient: {claim.patient_name}")
print(f"Claim Total: ${claim.total_paid}")
print(f"Date of Service: {claim.service_date}")
# Process service lines
for service in claim.services:
print(f" Procedure: {service.procedure_code}")
print(f" Paid: ${service.paid_amount}")
Claim ID: 12345678
Patient: JOHN DOE
Claim Total: $250.00
Procedure: 99213
Paid: $125.00

⚖️ Financial Balancing & Validation

# Check financial balance
bpr_total = t835.financial_information.total_paid
claims_total = sum(claim.total_paid for claim in t835.claims)
plb_total = sum(adj.amount for adj in t835.provider_adjustments)
if bpr_total == claims_total + plb_total:
print("✅ Financial totals balance")
else:
print("❌ Out of balance detected")
✅ Financial totals balance
BPR Total: $15,432.50
Claims Total: $14,932.50
PLB Adjustments: $500.00

📄 Export to JSON for Modern APIs

import json
# Convert entire 835 to JSON
json_data = t835.to_dict()
print(json.dumps(json_data, indent=2))
# Save to file for API integration
with open("claims_data.json", "w") as f:
json.dump(json_data, f, indent=2)
{
"payer": {"name": "AETNA BETTER HEALTH"},
"total_paid": 15432.50,
"claims_count": 42
}

🛡️ Robust Error Handling

try:
parser = Parser835()
result = parser.parse(edi_content)
# Check for parsing errors
if result.errors:
for error in result.errors:
print(f"Error: {error.message}")
except Exception as e:
print(f"Parsing failed: {e}")
✅ Parsed successfully with dynamic delimiter detection
✅ All segment validations passed
✅ Financial totals verified

Ready for production with 100% test coverage and comprehensive segment support

BPR • TRN • DTM • N1 • NM1 • PER • REFCLP • CAS • SVC • SVD • PLB • LX

Why Choose edi-cli?

Everything you need for enterprise EDI processing

Healthcare EDI Focus

Production-ready parser for EDI 835 (Healthcare Claim Payment/Advice) with comprehensive segment support and financial balancing.

Developer-First Design

Intuitive Python API, comprehensive test coverage (100%), and detailed documentation for seamless integration.

Production Ready

Robust error handling, dynamic delimiter detection, and validation engine for enterprise-grade EDI processing.

JSON Native

Convert EDI to JSON seamlessly, enabling modern API integration and data manipulation workflows.

Advanced Validation

HIPAA compliance validation, business rule engine, and custom validation rules with YAML configuration.

Open Source

MIT licensed with active development roadmap covering healthcare claims, logistics, and enterprise features.

Ready to Transform Your EDI Workflow?

Join developers who are modernizing healthcare and logistics with edi-cli. From parsing EDI 835 claims to building enterprise integrations.

v0.3.0
Latest Release
100%
Test Coverage
MIT
Open Source