12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- """
- This file serves as the interface (so to speak) to the x12 parser, plugin interface, We implement default plugins that will handle parsing,
- In addition to the allow custom plugins to be written/loaded and these will be given priority over the default ones+6+++++++++++++++++++++++++++++++++++++++++++++++++
- @TODO:
- - How to write custom plugin
- - Provide interface for meta-data (expected)
- - Support configuration specification
- """
- import os
- import sys
- # from . import common
- # from . import header
- # from . import body
- import importlib as IL
- # import imp
- from .. import parser
- # from .claims import *
- # from .remits import *
- # EDI = body.BODY
- # X12Handler = body.BODY
- from healthcareio.x12.plugins.default import claims
- from healthcareio.x12.plugins.default import remits
- # import .remits
- @parser(element='ISA',x12='837',field='header', map={15:'mode',12:'version',9:'date',10:'time'})
- def ISA(**_args):
- """
- :row raw {x12} row
- :data parsed data
- :meta elements containing map {index:field_name}
- """
- pass
-
- @parser(element='GS', map={1:'type',2:'sender',3:'receiver',4:'date',5:'time',8:'version'},field='receiver')
- def GS(**_args):
- pass
- @parser(element='ST', x12='837', field='header', map={1:'x12',2:'control_number'})
- def ST(**_args):
- """
- :row raw {x12} row
- :data parsed data
- :meta elements containing map {index:field_name}
- """
- pass
-
- @parser(element='BHT',field='header',map={3:'app_id',4:'date',5:'time',6:'type'})
- def BHT (**_args):
- """
- :row raw {x12} row
- :data parsed data
- :meta elements containing map {index:field_name}
- """
- pass
|