Skip to content

edi_835_parser

The API of the edi-835-parser library over oxedi. Needs pip install "oxedi[edi-835-parser]". See Migrating from edi-835-parser for the guide.

edi-835-parser's API over oxedi.

TransactionSet

One transaction (ST to SE) of one file.

interchange cached property

interchange: Optional[Interchange]

This transaction's ISA (the last one when the file has no transaction).

financial_information cached property

financial_information: Optional[FinancialInformation]

The BPR fields, or None without a BPR, as in the library.

organizations cached property

organizations: List[Organization]

The N1 loops, with an address and a location when the loop has an N3 or N4 segment; an element the segment holds empty reads "", as in the library.

serialize_service staticmethod

serialize_service(
    financial_information: FinancialInformation,
    payer: Organization,
    claim: Claim,
    service: Service,
) -> Dict[str, object]

The library's columns for one service, in its order.

to_dataframe

to_dataframe(extended: bool = False) -> pd.DataFrame

One row per service, as edi-835-parser builds it; with extended, also the rows and x_ columns that frame leaves out (claim-only and provider-adjustment rows can widen strict columns' dtypes: int to float, bool to object, and an object column holding only None to float with NaN).

TransactionSets

Every transaction of the files parsed.

to_dataframe

to_dataframe(extended: bool = False) -> pd.DataFrame

Every transaction's rows, with the numbered columns sorted last. The frames are concatenated one at a time onto an empty frame, as the library does, so empty transactions give the same dtypes. With extended, also the rows and x_ columns the frame leaves out (claim-only and provider-adjustment rows can widen strict columns' dtypes: int to float, bool to object, and an object column holding only None to float with NaN).

parse

parse(
    path: Union[str, "os.PathLike[str]"],
    debug: bool = False,
) -> TransactionSets

Parses a file path, or every .txt, .835 and .DAT file of a directory, with the same signature and behaviour as edi_835_parser.parse. Data already in memory goes through parse_bytes, parse_file_obj or parse_many.

Beyond the library: any path-like (pathlib.Path) is accepted, "" raises FileNotFoundError where the library raises IndexError, and a file whose ISA cannot be read (with no byte order mark before it) raises ParseError naming the file where the library raises IndexError.

parse_bytes

parse_bytes(
    data: BytesLike, file_path: Optional[str] = None
) -> TransactionSets

Parses one file held in bytes, bytearray or memoryview; file_path is what each TransactionSet.file_path reports.

parse_file_obj

parse_file_obj(
    file: IO[bytes], file_path: Optional[str] = None
) -> TransactionSets

Parses what file.read() returns (a binary file object).

parse_many

parse_many(
    items: Iterable[Union[BytesLike, IO[bytes]]],
) -> TransactionSets

Parses each item (bytes-like or binary file object) in order.

spec cached

spec() -> Spec

The built-in spec with the edi-835-parser tables in place of the native ones.