XML Message Format |
Top Previous Next |
The EasyHL7 XML message format was designed with application development in mind. It is quite large, which can make it somewhat unwieldy for things like archiving or database storage (for which we recommend archival/storage in native HL7 format). But this drawback is more than compensated by the wealth of information that is available to you when looking at a message in XML versus native HL7. Consider the following examples:
In the PID segment of HL7 field element 8 is the patient sex. In HL7 it might be represented like so (for a male):
PID|1|2827|2827||Smith^Barney^^^Mr^^^||19560107000000^^|M||Caucasian^^^^^^|PO Box 12345^^Somewhere^TX^76834^^^^^||(325)555-1212^Home^^^^325^5551212^^|||Married^^^^^^|||123-45-6789||||||||||||
Now zoom in on just the patient sex element of the XML version of the same PID segment.
<FIELD8 DESCRIPTION="Sex" DATATYPE="IS" FIELDLEN="1" REQUIRED="0" TABLEID="1" COMPONENTS="1" MAXCOMPONENT="1"> <COMPONENT1 DATATYPE="ST" DESCRIPTION="Code value for user-defined table">M</COMPONENT1> </FIELD8>
What was represented in 1 character of HL7 takes over 200 characters to represent in XML. With the XML format however you get the field value (M) and also an entire encapsulation of the vendor's HL7 definition for that element including:
Having this information available allows you the flexibility to perform multiple tasks such as:
|