parser/healthcareio/x12/plugins/default/header.py

45 lines
1.3 KiB
Python
Raw Permalink Normal View History

2023-05-18 14:22:48 +00:00
"""
This file contains parsing functions for a claim header, the functions are built within class (Object Orientation)
The intent to leverage Object Orientated designs is to easily support multi-processing
"""
import numpy as np
import json
# from . im common
from .common import X12DOCUMENT
class HEADER (X12DOCUMENT):
# @staticmethod
def ISA(self,**_args):
_columns = ['mode','version','date','time']
_index = [15,12,9,10]
return self.parse(_columns,_index,**_args)
# @staticmethod
def GS(self,**_args):
"""
Expected Element GS
"""
_columns = ['type','sender','receiver','date','time','version']
return self.parse(_columns,[1,2,3,4,5,8],**_args)
# @staticmethod
def ST(self,**_args):
"""
Expected Element ST
According to {x12} standard ST will take precedence over GS
"""
_columns = ['type','control_number','version']
return self.parse(_columns,[1,2,3],**_args)
# @staticmethod
def BHT (self,**_args):
"""
Expected Element BHT
This functiion will process header submitted (receiver,claim_type,)
"""
_columns= ['app_id','date','time','type']
return self.parse(_columns,[3,4,5,6],**_args)
2023-11-21 18:56:35 +00:00
#
# let us perform this