Hacker News new | ask | show | jobs
by bena 1320 days ago
EDI is a bitch. X12 is not great. IIRC, and it's been a while, so I may not, it's essentially a positional Character Separated Value stream. You basically build a string and fill in data or nothing as appropriate. For example the result looks something like

*START*VALUE1*10.00*BOB*DOLE*100*ADDRESS*STREET*

Where the double asterisk is where a blank value is.

However, it is a standard. It is knowable. You can get the ANSI X12 standard for whatever industry you're in and implement this.

And let's be clear, you still have to do the dirty work with these guys. You still have to map values to fields, which is the hard part of working with the format. Once you have that, you can knock this together fairly simply.

1 comments

It's definitely possible to write simple EDI transactions (no HL loops, etc) with a couple of trading partners using something akin to mustache templates – many of our customers come to us after getting something basic like this up and running in a day or two, and then hitting complexity.

It's difficult to use the method you're describing to write a transaction like this, particularly when the receiver's system can fall over due to a single character out of place: https://www.verizon.com/business/support/vec/onlinehelp/dam/...

(I'm the CEO of Stedi)

I had to process ANSI X12 835/837 sending and receiving.

So, you know, Healthcare billing information. It's tedious, but the worst part is the mapping from your own data source to the format. And you don't help with that part.

Yep, there's no way around mapping – the data has to get mapped somehow. The 835/837 are a bear. You can save some time if someone has built a mapping template already – say, from a transaction type in Oracle to the 837 – but if it's a custom system you're mapping to/from (like a homegrown API), it's impossible for a template to exist...it has to be done from scratch.

We've found that many of the fields end up being single-item enums, so those can be hardcoded (i.e. no mapping required). Guides (https://www.stedi.com/products/guides) generates JSON Schema for you, and Mappings (https://www.stedi.com/products/mappings) automatically populates any single-item enum. Both are free to configure in the UI.