Skip to content

bodharma/edi_reader

Repository files navigation

EDI Reader

License: MIT Python 3.8+

A Python toolkit for parsing and converting healthcare EDI 837 (Professional Claims) files to JSON format.

Overview

EDI Reader simplifies working with complex EDI X12 837 healthcare claims files by converting them into easily readable JSON structures. Built for healthcare developers, data engineers, and QA teams who need to parse, validate, or analyze EDI claim data.

Current Status: Early development (~30% complete) - Basic ISA/GS/ST segment parsing is functional.

Quick Start

Installation

Environment setup is managed by Poetry:

# Install Poetry
curl -sSL https://install.python-poetry.org | python3 -

# Install dependencies
poetry install

Basic Usage

from edi_parser import EDI

# Parse an EDI file
with open('claim.edi', 'r') as f:
    data = f.read()

edi = EDI(data)
edi.isa_parser()
edi.gs_parser()
# ... more parsing

# Output to JSON
with open('output.json', 'w') as out:
    json.dump(edi.data, out, indent=2)

Key Features

  • ISA Segment Parsing - Interchange control headers
  • GS/GE Segment Parsing - Functional group headers/trailers
  • ST/SE Segment Parsing - Transaction set headers/trailers
  • 🚧 BHT, NM1, N3, N4 - In development
  • 📋 Full 837 Support - Planned for Phase 1

Documentation

For detailed information, see our comprehensive documentation:

Use Cases

  • Healthcare IT Development - Debug and validate EDI claim processing
  • Data Engineering - Build ETL pipelines for claims analytics
  • QA & Testing - Automated testing of EDI generation systems
  • Compliance Auditing - Parse and analyze claims for regulatory compliance
  • Education - Learn EDI X12 837 format structure

Related Projects

This project works seamlessly with clinical-data-generator to enable round-trip testing:

  • clinical-data-generator creates EDI 837 files
  • edi_reader parses them back to JSON
  • Together they provide complete test coverage and validation

Roadmap

Phase 1 (Current) - Core Parser

  • Complete all EDI 837 segment parsers
  • Comprehensive test suite
  • Basic CLI interface

Phase 2 - Enhanced Features

  • Multiple format support (835, 270/271)
  • Validation engine
  • REST API

Phase 3 - Advanced Capabilities

  • Web UI
  • Batch processing
  • Performance optimization

See PROJECT_ANALYSIS.md for the complete roadmap.

Contributing

Contributions are welcome! This project is in early development and needs help with:

  • Implementing segment parsers
  • Writing tests
  • Documentation improvements
  • Use case examples

Please read our Contributing Guidelines for details on our code of conduct, development process, and how to submit pull requests.

By contributing, you agree that your contributions will be licensed under the MIT License.

Resources

License

This project is licensed under the MIT License - see the LICENSE file for details.

Attribution

If you use this project in your work, please include the following attribution:

EDI Reader - https://github.com/bodharma/edi_reader
Copyright (c) 2026 bodharma

When using this library in documentation or derivative works, a link back to this repository is appreciated.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages