I know! Let's Translate our data format into XML! This will be the bees knees!



  • <font face="Arial" size="2">And here I thought government meddling was
    the main problem with health care costs rising.  Take a look at
    what the brainiacs at HL7 (a data format standards organization for the
    health care industry) did to convert their old EDI standard to
    XML.  Someone needs to be shot! </font>


    Here we see a sample message in the syntax of the standard encoding rules.<o:p></o:p>

    MSH|^~\&|LAB|767543|ADT|767543|19900314130405||ADT^A04|XX3657|P|2.3.1<CR><o:p></o:p>

    EVN|A01|19980327101314|19980327095000|I||19980327095000<CR><o:p></o:p>

    PID|1||123456789ABCDEF|123456789ABCDEF|PATIENT^BOB^S||19590520|M||<o:p></o:p>

    <st1:Street w:st="on"><st1:address w:st="on">612345 MAIN STREET</st1:address></st1:Street>^^ANYTOWN^CA^91234||714-555-1212|<o:p></o:p>

    714-555-1212||||123456789ABCDEF|||U<CR><o:p></o:p>

    PD1||||WELBY<CR><o:p></o:p>

    PV1|1|0||NEW|||SPOCK<CR><o:p></o:p>

    Here we see that sample message in the syntax of the XML encoding rules.<o:p></o:p>

    <!DOCTYPE ADT_A03 SYSTEM "hl7_v231.dtd"><o:p></o:p>

    <ADT_A03><o:p></o:p>

    <MSH><o:p></o:p>

    <MSH.1>|</MSH.1><o:p></o:p>

    <MSH.2>^~\&amp;</MSH.2><o:p></o:p>

    <MSH.3><HD.1>LAB</HD.1></MSH.3><o:p></o:p>

    <MSH.4><HD.1>767543</HD.1></MSH.4><o:p></o:p>

    <MSH.5><HD.1>ADT</HD.1></MSH.5><o:p></o:p>

    <MSH.6><HD.1>767543</HD.1></MSH.6><o:p></o:p>

    <MSH.7>19900314130405</MSH.7><o:p></o:p>

    <MSH.9><o:p></o:p>

    <CM_MSG_TYPE.1>ADT</CM_MSG_TYPE.1><o:p></o:p>

    <CM_MSG_TYPE.2>A04</CM_MSG_TYPE.2><o:p></o:p>

    </MSH.9><o:p></o:p>

    <MSH.10>XX3657</MSH.10><o:p></o:p>

    <MSH.11><PT.1>P</PT.1></MSH.11><o:p></o:p>

    <MSH.12><VID.1>2.3.1</VID.1></MSH.12><o:p></o:p>

    </MSH><o:p></o:p>

    <EVN><o:p></o:p>

    <EVN.1>A01</EVN.1><o:p></o:p>

    <EVN.2>19980327101314</EVN.2><o:p></o:p>

    <EVN.3>19980327095000</EVN.3><o:p></o:p>

    <EVN.4>I</EVN.4><o:p></o:p>

    <EVN.6>19980327095000</EVN.6><o:p></o:p>

    </EVN><o:p></o:p>

    <PID><o:p></o:p>

    <PID.1>1</PID.1><o:p></o:p>

    <PID.3.LST><o:p></o:p>

    <PID.3><CX.1>123456789ABCDEF</CX.1></PID.3><o:p></o:p>

    19<o:p></o:p>

    </PID.3.LST><o:p></o:p>

    <PID.4.LST><o:p></o:p>

    <PID.4><CX.1>123456789ABCDEF</CX.1></PID.4><o:p></o:p>

    </PID.4.LST><o:p></o:p>

    <PID.5.LST><o:p></o:p>

    <PID.5><o:p></o:p>

    <XPN.1>PATIENT</XPN.1><o:p></o:p>

    <XPN.2>BOB</XPN.2><o:p></o:p>

    <XPN.3>S</XPN.3><o:p></o:p>

    </PID.5><o:p></o:p>

    </PID.5.LST><o:p></o:p>

    <PID.7>19590520</PID.7><o:p></o:p>

    <PID.8>M</PID.8><o:p></o:p>

    <PID.10.LST><o:p></o:p>

    <PID.10><CE.1>6</CE.1></PID.10><o:p></o:p>

    </PID.10.LST><o:p></o:p>

    <PID.11.LST><o:p></o:p>

    <PID.11><o:p></o:p>

    <XAD.1><st1:Street w:st="on"><st1:address w:st="on">12345 MAIN STREET</st1:address></st1:Street></XAD.1><o:p></o:p>

    <XAD.3>ANYTOWN</XAD.3><o:p></o:p>

    <XAD.4>CA</XAD.4><o:p></o:p>

    <XAD.5>91234</XAD.5><o:p></o:p>

    </PID.11><o:p></o:p>

    </PID.11.LST><o:p></o:p>

    <PID.13.LST><o:p></o:p>

    <PID.13><XTN.1>714-555-1212</XTN.1></PID.13><o:p></o:p>

    </PID.13.LST><o:p></o:p>

    <PID.14.LST><o:p></o:p>

    <PID.14><XTN.1>714-555-1212</XTN.1></PID.14><o:p></o:p>

    </PID.14.LST><o:p></o:p>

    <PID.18><CX.1>123456789ABCDEF</CX.1></PID.18><o:p></o:p>

    <PID.21.LST><o:p></o:p>

    <PID.21><CX.1>U</CX.1></PID.21><o:p></o:p>

    </PID.21.LST><o:p></o:p>

    </PID><o:p></o:p>

    <PD1><o:p></o:p>

    <PD1.4.LST><o:p></o:p>

    <PD1.4><XCN.1>WELBY</XCN.1></PD1.4><o:p></o:p>

    </PD1.4.LST><o:p></o:p>

    </PD1><o:p></o:p>

    <PV1><o:p></o:p>

    <PV1.1>1</PV1.1><o:p></o:p>

    <PV1.2>0</PV1.2><o:p></o:p>

    <PV1.4>NEW</PV1.4><o:p></o:p>

    <PV1.7.LST><o:p></o:p>

    <PV1.7><XCN.1>SPOCK</XCN.1></PV1.7><o:p></o:p>

    </PV1.7.LST><o:p></o:p>

    </PV1><o:p></o:p>

    </ADT_A03><o:p></o:p>

    As is always the case with XML when processed with a validating processor, the extra whitespace between<o:p></o:p>

    elements (provided to make the message easier for people to read) can be removed in actual message<o:p></o:p>

    instances, resulting is shorter messages in situations
    when overall message length is a factor.









  • I guess that's marginally better than this classic wtf:
    http://thedailywtf.com/forums/thread/53681.aspx



    Some people just don't get it.



  • Much clearer now.

    It has structure!



  • <font face="Tahoma" size="2">I happen to be a big fan of XML and I die a little inside whenever I see this kind of abuse.  Too many poor developers/managers see it as a panacea simply because it happens to be "the latest cool thing".

    No technology can fix a bad design.
    </font>



  • Missed the boat here...

        I was hoping that they'd actually modify their standard to encapsulate what the fields actually meant into the tags...utilize Dublin Core, etc.

        Instead they just basically changed their delimiter from the old pipe character into fancy new XML tags, creating everyone's favorite WTF.

        Not as good as the people who put flat file data ino a text field of a relational database.

        (Although here at this company there are a few XML files in NTEXT columns.  I suppose that counts as a WTF.  It makes the entire thing quite pointless to modify without the tools which used to fail very often.)



  • @Xarium said:

    <font face="Tahoma" size="2">
    No technology can fix a bad design.
    </font>


    I don't know, hammers and steel-toed boots seem to do the trick sometimes.

        -dZ.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.