3r3-31. When you create an application that actively interacts with third-party services and systems, it is often required to provide information exchange with them, one-way or two-way.
At the same time, the third-party service often provides the only format and data structures for such an interaction.
One of these electronic document management formats is EDI ANSI ASC X12 , a sufficiently detailed description of which is given by reference.
CDR was taken from 3r317. of this site
Below the cut is a simple X12 parser algorithm and Clojure code that implements the parser and an example ...