x12 835 and 837 parser into JSON format (sqlite or mongodb) and export into any relational database with appropriate relationships
Go to file
Steve L. Nyemba ce7e3943dd urgh console output removing 2020-08-21 07:38:15 -07:00
healthcareio urgh console output removing 2020-08-21 07:38:15 -07:00
LICENSE Initial commit 2019-11-06 14:36:32 -06:00
README.md Update 'README.md' 2019-11-12 11:51:22 -06:00
setup.py tested on python 3.7 with adjustments 2020-08-21 07:28:24 -07:00

README.md

About Parse-Edi

parse-edi is an Electronic Data Interchange (EDI) parser developed at Vanderbilt University Medical Center during Khanhly Nguyen's summer internship 2019. Built in a healthcare setting, the parser focuses (for now) on x12 claims (837) and remittances (835)

This code is intended to extract x12 837 and 835 and format them into portable and human readable format (JSON). This allows the claims to be stored in document data stores such as Mongodb, couchdb or databases that have support for JSON like PostgreSQL

We wrote this frame to be used in both command line or as a library within in your code. The framework is driven by configurations that derviced from X12 standards.

Installation

pip install git+https://hiplab.mc.vanderbilt.edu/git/lab/parse-edi.git

Usage

Commandline :

    python edi --config <path> --folder <path> --store <[mongo|disk|couch]> --<db|path]> <id|path>

    with :
        --scope     <claims|remits>
        --config    path of the x12 to be parsed i.e it could be 835, or 837
        --folder    location of the files (they must be decompressed)
        --store     data store could be disk, mongodb, couchdb
        --db|path    name of the folder to store the output or the database name

Embedded in Code :

Use parse-edi within your code base as a library and handle storing data in a data store of choice

import edi.parser
import json
import os


ROOT = 'data'
CLAIMS_FOLDER = os.sep.join([ROOT,'837'])   #-- data/837    contains all 837 formatted files
CONFIG_FOLDER = os.sep.join([ROOT,'config'])#-- data/config contains 837.json or 835.json


files       = os.listdir(CLAIMS_FOLDER)
filename    = os.sep.join([CLAIM_FOLDER,files[0]]) #-- selecting the first file in the folder (it's an example)
conf        = json.loads(open( os.sep.join([CONFIG_FOLDER,'837.json']) ).read())
info        = edi.parser.get_content(file,conf) #-- array of objects claims/remits

Credits