My Case:
I'm working on a system that will need to create various X12 files for health care (insurance) transactions and inquiries (Specifically 270 Eligibility and 837 Claim).
I know there are good tools out there (pyx12 specifically) for converting between XML and X12, and actually I've gone as far as importing some components from pyx12 to actually create/manipulate x12 data.
Even considering that, after researching the formats a bit, I'm starting to believe that I could have an easier time generating these formats using a template language. I think that it would be a matter of defining for
loops for any segments&loops that need to be repeated per portion claim/inquiry, and the header regions are going to be somewhat static besides whatever element values that could be easily updated by my context.
Almost all of my records are coming out from sqlalchemy so it should be easy enough to loop through my records in the database where relations are very well defined and mapped.
My questions:
- I suppose this is less of a question and more of a quest for advice & insight, so feel free to shoot with all of that. IE, Do you think this is a good idea or a waste of time?
- For any die-hard x12 people, what kind of problems have you run into building x12 from scratch? What should I watch out for?
- Has this style of implementation been done before? Are there examples of specific X12 format templates available, from any language? (I did look with little success)
Just a side note:
We're already working with python and django, so that template language is available to us. If we need to do these things as a background process we'll either do the hacky config environment tricks to get django templates to work outside of our django project or else use jinja instead--which is nearly interchangeable.