wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time.
This article has been viewed 43,850 times.
Learn more...
Health Level Seven (HL7) is an interoperability standard used in healthcare. It is the language health information systems use to communicate. For example, Public Health Departments have immunization registries and syndromic surveillance systems that need to communicate with Electronic Health Records (EHRs) systems at hospitals and clinics. This is accomplished with HL7 messages. Though the HL7 standards have seen two major revisions since HL7 v2, it still remains the standard in healthcare and the version you’re most likely to find in the field.[1]
Steps
-
1Learn HL7 Message Structure. Here is a typical HL7 message with syntax highlighting added to more easily identify the elements in a message:[2]
-
MSH|^~\&|ADT1|MCM|LABADT|MCM|198808181126|SECURITY|ADT^A01|MSG00001-|P|2.6
EVN|A01|198808181123
- Messages are composed of segments, fields, components, and subcomponents. Segments can be thought of as containers that group like kinds of data. These data are contained in a segment's fields. The three-character codes in blue are the segment labels for this message.
- Each segment contains fields that are separated with the light-blue ‘|’ character. Fields and segments can be repeating. Repeating fields are separated with the red ‘~’ character. Components are the data points within fields, and they are separated with the green ‘^’ character. Sub-components are demarcated with the light-purple ‘&’ separator. These special characters are called control characters. The table contains the standard control characters used in HL7.
PID|||PATID1234^5^M11^^AN||JONES^WILLIAM^A^III||19610615|M||2106-3|677 DELAWARE AVENUE^^EVERETT^MA^02149|GL|(919)379-1212|(919)271-3434~(919)277-3114||S||PATID12345001^2^M10^^ACSN|123456789|9-87654^NC
NK1|1|JONES^BARBARA^K|SPO|||||20011105
NK1|1|JONES^MICHAEL^A|FTH
PV1|1|I|2000^2012^01||||004777^LEBAUER^SIDNEY^J.|||SUR||-||ADM|A0
AL1|1||^PENICILLIN||CODE16~CODE17~CODE18
AL1|2||^CAT DANDER||CODE257
DG1|001|I9|1550|MAL NEO LIVER, PRIMARY|19880501103005|F
PR1|2234|M11|111^CODE151|COMMON PROCEDURES|198809081123
ROL|45^RECORDER^ROLE MASTER LIST|AD|RO|KATE^SMITH^ELLEN|199505011201
GT1|1122|1519|BILL^GATES^A
IN1|001|A357|1234|BCMD|||||132987
IN2|ID1551001|123456789
ROL|45^RECORDER^ROLE MASTER LIST|AD|RO|KATE^ELLEN|199505011201 -
2Break the message into segments. Segments are the basic structural elements from which HL7 messages are built. Each message is composed of one or more segments.[3]
- The message type determines which segments a message contains as well as which ones are optional and which are repeatable. This syntax is dictated by the HL7 version used in creating the message. Segments are re-usable in different message types.
- The segments in the example message are listed in the table:
Advertisement -
3Break the segments into fields. The following diagram is a conceptual model of an HL7 message broken down into segments and fields. The three-character codes used at the start of each segment serve as labels. Fields are notated by extending the segment to include the index number of the field. For example, the first field in the message header would be MSH-1, the second field would be MSH-2, etc.[4]
- MSH, the message header, is the first segment in every HL7 message and contains message metadata. The second segment in every message is the EVN segment. This contains the event the message triggers. In this example, that event is the scheduling of an inpatient surgery.
-
4Notice in the example message that not all fields contain data. The following snippet of the NK1 (Next of Kin) segment contains empty fields. The empty fields here are indicated by field separators (|) with nothing in between, followed by the date in Yymmdd format:
- SPO|||||20011105
-
5Recognize that repeating fields are separated by the ~ character. This example shows a repeating allergic reaction field (AL1.5[1-3]) in the allergies (AL1) segment:
- CODE16~CODE17~CODE18
-
6Break the fields into components. Each component in a field is separated by the ^ character. Fields are notated by extending segment notation with a decimal point followed by the index number of the field. The street address component, for example, is part of the address field and it can be indexed with PID-11.1. PID is the patient identification segment. PID-11.1 is the street address component of the address field (PID-11).
- Components can be further broken down into subcomponents using the & character as a separator.
-
7Use the HL7 Data Dictionary to look up elements. The data dictionary for all of the elements contained in a message can be located by referencing the standard for the version of HL7 used to create the message.[5] The version number can be found in the MSH-12 field of any message header.
- Appendix A of the standard contains a data dictionary for all of the elements in a message. It is available in both PDF and XLS file formats. The data dictionary for HL7 v2.6 is a typical example.
References
- ↑ http://www.hl7.org/implement/standards/product_section.cfm?section=1
- ↑ https://www.interfaceware.com/hl7-message-structure
- ↑ https://www.interfaceware.com/hl7-message-structure
- ↑ https://www.interfaceware.com/hl7-message-structure
- ↑ http://www.hl7.org/implement/standards/product_section.cfm?section=1
Medical Disclaimer
The content of this article is not intended to be a substitute for professional medical advice, examination, diagnosis, or treatment. You should always contact your doctor or other qualified healthcare professional before starting, changing, or stopping any kind of health treatment.
Read More...