3 ms·
EDI is actually a wonderful and simple ASCII format for complex documents in use for over 30 years. The underlaying mapping formats for specific industries are
by Eleutheria 13y ago
EDI is actually a wonderful and simple ASCII format for complex documents in use for over 30 years.
The underlaying mapping formats for specific industries are a pain to parse but everything is easily formatted using stars or pipes as field separators
ST|101
NAM|john|doe
ADR|123 sunset blv|sunrise city|CA
DAT|20140326|birthday
Ah, the joy of simplicity.
- commandar 13y agoHL7 used in healthcare is similar. Just grabbing the first few segments from the example message in the wiki article: MSH|^~\&|MegaReg|XYZHospC|SuperOE|XYZImgCtr|20060529090131-0500||ADT^A01^ADT_A01|01052901|P|2.5 EVN||200605290901||||200605290900 PID|||56782445^^^UAReg^PI||KLEINSAMPLE^BARRY^Q^JR||19620910|M||2028-9^^HL70005^RA99113^^XYZ|260 GOODWIN CREST DRIVE^^BIRMINGHAM^AL^35209^^M~NICKELL’S PICKLES^10000 W 100TH AVE^BIRMINGHAM^AL^35200^^O The delimiters are defined at the beginning of the opening MSH (message header) segment. HL7 is zero-indexed, but your zero index is always the segment label, so it's easy for non-technical people to count naturally to get the field identifier without having to explain counting n-1 to them. The one exception to that is the MSH segment. Things get a little screwier there because the first instance of the field delimiter is also counted as a full field in the spec, so it tends to trip people up. So even though "^~\&" above looks like it should be MSH.1, it's actually MSH.2, etc. The delimiters used in the wiki example are the most common you encounter, but some systems do things differently because reasons. The primary HIS at my hospital uses colons and semicolons, for example (and I want to poke out my eyes with ice picks every time I have to look at the messages coming from it as a result). But since it's all defined right in the message header, it's trivial to convert between delimiters when you need/want to. Either way, this is how the vast majority of electronic medical records are transmitted today.
- Eleutheria 13y agoAnd the good thing is that you can generate very complex structured documents, not only lists like in cvs. Of course xml and json do the same, but more verbose. ASCII formats like EDI were invented when every byte in transmission counted.
- WiseWeasel 13y agoIt's like a PSV turned on its side, where the first column is 'header', and the following ones are 'value 1', 'value 2',...\n I guess that makes sense when you want to package non-list information, as long as there aren't any un-escaped newlines in the values.