X12::Parser::Readme 0.08 review

by rbytes.net on

X12::Parser::Readme is a Perl module for understanding configuration (cf) files for X12::Parser. X12 transactions ASC X12 standar

License: Perl Artistic License
File size: 19K
Developer: Prasad Poruporuthan
0 stars award from rbytes.net

X12::Parser::Readme is a Perl module for understanding configuration (cf) files for X12::Parser.

X12 transactions
ASC X12 standards define commonly used EDI transactions. The standards define a structure/format for exchange of EDI data.

Each transaction type is called a "transaction set". The smallest data item in a transaction is called an "element". Groups of related elements form a data segment. A data element separator separates the elements within a segment. A segment starts with a element which is called the segment ID, and ends with a segment terminator.

Logical groups of segments are called loops. There are some segments, which are used only to identify the beginning of a loop, these are called as control segments. A logical set of loops together form a "transaction set".

Similar transaction sets can be lumped together by enclosing them in data segments that are known as functional group headers and trailers. Functional groups are grouped together using interchange control headers and trailers.

Unlike XML/HTML parsers which relies on "" tags to determine start and end of data blocks, X12 transactions rely on pre-defined values (segment IDs) to indicate start and end of related data blocks (loops). Developing a parser that would work for all X12 transactions poses a challenge in this respect, as each transaction has its own hierarchy of loops and start/end indicators.

This lead to the development of the X12 configuration file (cf) specification. The cf specification is created to specify details regarding the blocks/loops and start/end information in a common format. Cf files can be created for the different transaction sets. (see section Building a cf file).
Now you can parse your EDI data file by invoking the X12::Parser specifying the cf file to use. This allows you to parse any X12 transaction data files just by building the cf file for that transaction type.

Cf file specification for X12::Parser
The cf file specifies any transaction in a hierarchical form. It identifies the loops and segments in a transaction. This information is used to parse the transaction file. The X12::Parser uses the X12::Parser::Cf module to read the cf file information before parsing a transaction file. Since the X12::Parser parses files based on the cf file it allows the user to parse different X12 transaction types just by using the appropriate cf file. The user can use the cf files that are bundled with this package or create new cf files. The cf provided with this package is for the HIPAA X12 Ver 4010 X12 transactions.

A cf file has two types of information: section and key=value pairs. A section contains information in key=value pairs.


X12::Parser::Readme 0.08 search tags