Index Changes
This is version 32. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Overall Functionality (HL7 Parsing, Encoding, Parser, Encoder and v2 XML Conversion)

HL7 (Health Level Seven) Encoder facilitates user to handle HL7 version 2.X coded data (more specifically speaking, it is a delimiter based encoding mechanism and delimiters are always embedded at the beginning of a message). The implementation of the HL7 encoder provides tools for user to define and test HL7 encoders, as well as provide runtime support for HL7 encoders. HL7 encoder definition, which is represented in form of XSD, is used in WSDL just like normal XSDs with the convention that usually an element declaration that represents one of the HL7 v2 message types is used in the Part definition, not any of the XML types.

In composite applications, HL7 encoder is used the same way as all other encoder types are used, which is, in the WSDL's binding section specifying the encoding style in the encoding style property of a message type. Currently the encoding style value for using HL7 encoder is "hl7encoder-1.0".

To learn more about the HL7 specification, please visit HL7 official site.

To learn more about encoder in general, please visit An Introduction to Encoder.

Keywords: HL7, Data, Parsing, Encoding, Parser, Encoder, XML, Conversion, Converter, XML Schema

High Level Requirements

The requirements of HL7 encoder fall into two categories: the design time tools and runtime support. The design time tools shall facilitate user to import and view HL7 encoder definition, as well as discover its runtime behavior at design time. HL7 encoder runtime support shall provide efficient and fast algorithms that decode HL7 v2 standard encoding encoded message into v2 XML encoding encoded message and encode v2 XML encoding encoded message into HL7 v2 standard encoding encoded message.

Use Cases

  • Import HL7 v2xml XSDs as HL7 encoder definitions. The HL7 v2 XSDs we provided shall have HL7 encoding pre-applied. Once the XSDs are imported, they shall be at the ready-to-use state. This use case should have been covered by the NetBeans “Import external XSD” wizard.
  • View HL7 abstract message structure. This use case should have been cover by NetBeans XSD editor.
  • View HL7 encoding rules at node level, such as HL7 data structure name etc.
  • Editing HL7 encoder definition is allowed but not required. If users want to add their own Z segment, they can do that.
  • Test HL7 encoder's runtime encoding/decoding behavior at design time
  • Specify the “HL7 encoding” style for different binding styles (such as HL7, FTP, FILE, JMS etc.)
  • Provide HL7 decoding/encoding support at runtime

Technical Details

  • HL7 encoder definition is stored in XSDs. We provider all HL7 v2 XSDs for version 2.1, 2.2, 2.3, 2.3.1, 2.4 and 2.5.
  • The abstract message structure is defined by normal XSD constructs
  • The specific HL7 encoding rules is stored in XSD's Annotation/AppInfo contructs
  • HL7 encoder viewer (potentially can do editing also) is NetBeans XSD editor plus an overlay/plug-in (which is called AppInfo provider) on top of it. The plug-in shows an HL7 encoding node underneath the Annotation node.
  • HL7 encoder parser uses SAX interface to return decoded data, so it can do streaming parsing.
  • Unrecognized segments are governed by XSD wildcards. Unrecognized fields/components/sub-components are skipped.

A Sample HL7 Standard Encoding Message

Following is a sample HL7 standard encoding message (v2.5 ADT_A01):

MSH|^\&|REGADT|MCM|IFENG||199112311501||ADT^A04^ADT_A01|000001|P|2.5||| EVN|A04|199901101500|199901101400|01||199901101410 PID|||191919^^SAMPLE^MR~371-66-9256^^^USSSA^SS|253763|SAMPLE^JAMES^A||19560129|M|||999 SAMPLELIN^^ISHSAMPLE^MI^49849^""^||(800)485-5344|(888)485-5344||S^^HL70002|C^^HL70006|10199925^^^SAMPLE^AN|371-66-9256|| NK1|1|SAMPLE^ELLEN|SPOUSE^^HL70063|171 SAMPLELIN^^ISHSAMPLE^MI^49849^""^|(900)485-5344|(900)545-1234~(900)545-1200|EC1^FIRST EMERGENCY CONTACT^HL70131 NK1|2|SAMPLE^MARYLOU|MOTHER^^HL70063|300 SAMPLELIN^^ISHSAMPLE^MI^49849^""^|(900)485-5344|(900)545-1234~(900)545-1200|EC2^SECOND EMERGENCY CONTACT^HL70131 NK1|3 NK1|4|||123 SAMPLERY WAY^^ISHSAMPLE^MI^49849^""^||(800)545-1200|EM^EMPLOYER^HL70131|19940605||PROGRAMMER|||SAMPLE SOFTWARE COMPANY PV1||O|O/R||||0148^SAMPLEN,JAMES|0148^SAMPLEN,JAMES||AMB|||||||0148^SAMPLEN,JAMES|S|1400|A|||||||||||||||||||SAMPLE|||||199501101410| PV2||||||||199901101400|||||||||||||||||||||||||199901101400 ROL||AD|CP^^HL70443|0148^SAMPLEN,JAMES OBX||NM|3141-9^BODY WEIGHT^LN||62|kg|||||F OBX||NM|3137-7^HEIGHT^LN||190|cm|||||F DG1|1|19|R63.4^LOSS OF WEIGHT^I10|||00| GT1|1||SAMPLE^JAMES^""^""^""^""^||171 SAMPLELIN^^ISHSAMPLE^MI^49849^""^|(800)485-5344|(800)485-5344||||SE^SELF^HL70063|371-66-925||||SAMPLE AUTO PLACE|171 SAMPLELIN^^ISHSAMPLE^MI^49849^""|(800)485-5344| IN1|0|0^HL70072|BC1|BLUE CROSS|171 SAMPLELIN^^ISHSAMPLE^M149849^""^||(900)485-5344|90||||||50 OK|

The decoded (by HL7 encoder) v2xml message can be found at ADT_A01 decoded message(info)

See a Demo

A simple file-to-file demo that uses HL7 encoder can be viewed at HL7 Encoder Demo(info).

Sample HL7 v2xml XSD

The sample v2.5 ADT_A01 XSD used in the demo can be downloaded at ADT_A01 XSD(info). If you need a full set of the HL7 v2xml XSDs, please contact us. Contact information can be found at Encoder Introduction (to the bottom).

Want To Try It Out?

Please follow the steps outlined at the Encoder Feature Installation Guide page to proceed with the encoder feature installation.

Tips and Tricks

* Important(!!!): If you notice extremely slow performance in testing HL7 encoder, please make sure disable JVM assertion in NetBeans' conf file (netbeans.conf) under its etc folder. Please change the setting from -J-ea to -J-da.

JSPWiki v2.4.100
« Home Index Changes Prefs
This particular version was published on 25-Sep-07 16:44 PM, -0700 by AlliaLtrtr