<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>^~\&</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.