What is HL7- A Complete Guide For Beginners



HL7 stands for HEALTH LEVEL 7.It is the standard format which is used for transferring the electronic medical record between hospitals informative systems. Information sent through HL7 is sent as a collection of one or more message each of which hold one record or health related information.

In health care region different organization uses different systems for recording every activity from billing records to patient tracking and all the record and bills are stored .All of these systems contain different record and should be able to communicate with each other this is where HL7 comes into picture.This document explain about the basics of HL7 and how it can be used.

About HL7


HL7  is a Standard format which is set by the American National Standards Institute (ANSI). It contain the medical record of the patients ,Its like a language that describe person medical information to all the hospital Information systems.

Specialized software that uses HL7 are Digital Dictation(DD), Laboratory Information system(LIS), Radiology Information system(RIS), Medical Imaging Equipment and Hospital Information system(HIS).

All these specialized software communicate with each other using HL7 it act as a source of mediator between them.In hospital if any doctor or any other staff member wanted to access the medical record of any patient from any of these specialized software can access it using HL7.HL7 can be use to extract a patient medical history from hospital Information systems.

The HL7 is widely used in countries like USA, Australia, Austria, Canada, Germany, Israel, Japan, New Zealand, Netherlands, UK .In America 90% of health care industry use HL7 for exchanging, sharing and retrieval of electronic health information.

HL7 standard are used for defining how the information should be packaged and transmitted from one system to another system .These standard set the structure and data type required for communication between two system.



HL7 standard is grouped into reference categories:

  1. Primary Standard: The most demanded standards fall in this category these standard are important for system integration and operation between the system
  2. Foundation Standard: These standard are used as a building block and fundamental tool for building standards.
  • Clinical and administrative domains: These standard are used for messaging and document.
  1. EHR Profiles: It stand for electronic health record profile and it provide the standard for management of electronic health records.
  2. Implementation Guide: This section provide the implementation guide for all parent standard.
  3. Rules and Reference: This section provide the guideline for software and standard development.
  • Education and Awareness: This section is used for increasing the additional understanding and adoption of HL7 standard.

These all section are use to categories HL7 standard ,these all categories form the fundamental and root of HL7 standard.



HL7 message structure


To understand the structure of HL7 message let us look at the message format :

PID||0797675^^^^MR|454721||Brown^Sam^^^^^B|Smith^Mary^^^^|19780203|M||2106-3|254 East St^^Hoick^OH^3252^USA||(216)671-4859|||S|AGN|400003603~1629086|999-8888|

The above sample message is representation of Hl7 message.The message consist of various segments but firstly we will focus on the most important segment and the very first segment which is message header segment it consist of message header.The HL7 MSH Message Header segment is present in every HL7 message type and it contain the information regarding message’s source, purpose, destination.

The MSH segment of message consist of 19 fields .Each of the field hold different value representing the type of field it is but only six of which are most important and required for all messages these fields are field separator, encoding characters, message type, message control ID, processing ID, and version ID. The most important of the MSH fields is the MSH-9 Message Type field. Message type field define what type of message is been transferred it can be of any type some common type of messages are ADT, ORM, ORU, ACK, etc.

The fields in the MSH segments are as follows:

  1. Field separator
  2. Encoding Character
  3. Sending application
  4. Sending Facility
  5. Receiving Application
  6. Receiving facility
  7. Date/Time of Message
  8. Security
  9. Message Type
  10. Message Control Id
  11. Processing Id
  12. Version Id
  13. Sequence Number
  14. Continuation pointer
  15. Accept Acknowledgment Type
  16. Application Acknowledgment Type
  17. Country Code
  18. Character Set
  19. Principal Language of Message

The first two fields in the MSH segment define the separator characters to be used throughout the message. The MSH-1 field defines the field separator, and the MSH-2 field defines the other separator characters for the message in this order: component, field repeat, escape character, sub component.


These are the characters used :

| -Field separator (pipe) Used to separate field in message
^ -Component separator(caret) Used to separate component in field
~ -Repeating field delimiter(tilde) Used to separate repeating field in segment
\ -Escape character(backslash) Used to signal special character in field of text
& -Sub-sub-field delimiter(ampersand) Used to separate the sub-sub-field in segment


The most important field in segment is MSH-9 which represent the message type this field specify what type of message is transmitted.

Some of the most commonly used message type are:

  • Patient Administration (ADT-Admit Discharge Transfer):

HL7 ADT messages contain the information regarding the patient demographic .The demographic information consist of patient admit, transfer and discharge information

Some of the most commonly used ADT messages include:

  1. ADT-A01 – patient admit
  2. ADT-A02 – patient transfer
  • ADT-A03 – patient discharge
  1. ADT-A04 – patient registration
  2. ADT-A05 – patient pre-admission
  3. ADT-A08 – patient information update
  • ADT-A11 – cancel patient admit
  • ADT-A12 – cancel patient transfer
  1. ADT-A13 – cancel patient discharge

Example for ADT message:




  • Orders(ORMs):

The ORM message contain the information regarding order message that is used to transmit information about an order. There is only one type of ORM message – the ORM-O01 message.

Example for ORM message:



  • Observation result(ORUs):

The ORU message is for transmitting the observation or result from one system to another system these system are basically producing system and ordering system

Example for ORU message:



  • Detailed financial transaction(DFTs):

The DFT message contain the information regarding the financial transaction of the admitted patient that is sent to a billing system and is used for patient accounting purposes.

Example for DFT message:



  • Medical Document Management (MDM):

The Medical document management message is used for transmitting the new and updated document of medical record.


Example for MDM message:

MSH|^~\&|One|MEDICAL|HEALTH^HL7|HFH|209000601051| D61AFEF1-BFEF-AAA-8666-4ACD88880749|MDM^T01|2006010888|T|2.3


  • Acknowledgment Messages(ACK):

The Acknowledgment message insure that the message is transmitted from one system to another system without being lost during transmission.


Example for ACK message:



  • Treatment Encoded Order(RDE):

The Treatment encoded order message is used for sending the order to pharmacy.It  may contain single order or multiple order.

Example for RDE message:



  • Scheduling Information Unsolicited(SIU):

The Scheduling information message is used for transferring the patient appointment information form the hospital scheduling system to clinic management system.

Example for SIU message:






The most commonly utilized segments in HL7 include:

  • DG1 – Diagnosis:

The DG1 segment contains the information regarding the patient diagnosis of various types, for example, admitting, primary, etc. The DG1 segment is used to send multiple diagnoses .

Example for DG1 segment:

DG1|001|I9|1550|MAL NEO LIVER, PRIMARY|20080501103005|F||

The fields in the DG1 segments are as follows:

DG1.1 Set ID
DG1.2 Diagnosis Coding Method
DG1.3 Diagnosis Code -DG1
DG1.4 Diagnosis Description
DG1.5 Diagnosis Date/Time
DG1.6 Diagnosis Type
DG1.7 Major Diagnostic Category
DG1.8 Diagnostic Related Group
DG1.9 DRG Approval Indicator
DG1.10 DRG Grouper Review Code
DG1.11 Outlier Type
DG1.12 Outlier Date
DG1.13 Outlier Cost
DG1.14 Group Version and Type
DG1.15 Diagnosis Priority
DG1.16 Diagnosis Clinician
DG1.17 Diagnosis classification
DG1.18 Confidential Indicator
DG1.19 Attestation Date/Time


  • EVN – Event type:

The EVN segment is used to communicate trigger event information to receiving applications.

Example for EVN segment:


The fields in the EVN segments are as follows:

EVN 1 Event Type Code
EVN 2 Recorded Date/Time
EVN 3 Date/Time Planned Event
EVN 4 Event Reason Code
EVN 5 Operator ID
EVN 6 Event Occurred



  • GT1 – Guarantor:

The GT1 segment contain the information regarding the Guarantor i.e the person or the organization with financial responsibility for payment of the admitted person.

Example for GT1 segment:

GT1|1||REDWOOD^ADAM^A||2222 HOMSTREET^^ISHPEMING^MI^49849^””^|444-33 3333|555-555-2004||||SE^SELF|444-33 3333||||AUTO CLINIC|2222 HOME STREET^^ISHPEMING^MI^49849^””|555-555-2004|

The fields in the GT1 segments are as follows:

GT1.1 Set ID
GT1.2 Guarantor Number
GT1.3 Guarantor Name
GT1.4 Guarantor Spouse Name
GT1.5 Guarantor Address
GT1.6 Guarantor Phone Number-Home
GT1.7 Guarantor Phone Number-Business
GT1.8 Guarantor Date/Time Of Birth
GT1.9 Guarantor Sex
GT1.10 Guarantor Type
GT1.11 Guarantor Relationship
GT1.12 Guarantor SSN
GT1.13 Guarantor Date – Begin
GT1.14 Guarantor Date – End
GT1.15 Guarantor Priority
GT1.16 Guarantor Employer Name
GT1.17 Guarantor Employer Address
GT1.18 Guarantor Employer Phone Number
GT1.19 Guarantor Employee ID Number
GT1.20 Guarantor Employment Status
GT1.21 Guarantor Organization Name
GT1.22 Guarantor Billing Hold Flag
GT1.23 Guarantor Credit Rating Code
GT1.24 Guarantor Death Date And Time
GT1.25 Guarantor Death Flag
GT1.26 Guarantor Charge Adjustment Code
GT1.27 Guarantor Household Annual Income
GT1.28 Guarantor Household Size
GT1.29 Guarantor Employer ID Number
GT1.30 Guarantor Marital Status Code
GT1.31 Guarantor Hire Effective Date
GT1.32 Employment Stop Date
GT1.33 Living Dependency
GT1.34 Ambulatory Status
GT1.35 Citizenship
GT1.36 Primary Language
GT1.37 Living Arrangement
GT1.38 Publicity Code
GT1.39 Protection Indicator
GT1.40 Student Indicator
GT1.41 Religion
GT1.42 Mother s Maiden Name
GT1.43 Nationality
GT1.44 Ethnic Group
GT1.45 Contact Person s Name
GT1.46 Contact Person s Telephone Number
GT1.47 Contact Reason
GT1.48 Contact Relationship
GT1.49 Job Title
GT1.50 Job Code/Class
GT1.51 Guarantor Employer s Organization Name
GT1.52 Handicap
GT1.53 Job Status
GT1.54 Guarantor Financial Class
GT1.55 Guarantor Race


  • IN1 – Insurance:

The IN1 segment contain the information regarding the insurance policy coverage for the admitted person.

Example for IN1 segment:

IN1|0|0|UA1|SURERSCIRCLE^^ISHPEMING^M149849^””^||555-555-3015|90||||||50 OK|

The fields in the IN1 segments are as follows:

IN1.1 Set ID
IN1.2 Insurance Plan ID
IN1.3 Insurance Company ID
IN1.4 Insurance Company Name
IN1.5 Insurance Company Address
IN1.6 Insurance Co Contact Person
IN1.7 Insurance Co Phone Number
IN1.8 Group Number
IN1.9 Group Name
IN1.10 Insured’s Group Employee ID
IN1.11 Insured’s Group Employee Name
IN1.12 Plan Effective Date
IN1.13 Plan Expiration Date
IN1.14 Authorization Information
IN1.15 Plan Type
IN1.16 Name Of Insured
IN1.17 Insured’s Relationship To Patient
IN1.18 Insured’s Date Of Birth
IN1.19 Insured’s Address
IN1.20 Assignment Of Benefits
IN1.21 Coordination Of Benefits
IN1.22 Coordination Of Ben. Priority
IN1.23 Notice Of Admission Flag
IN1.24 Notice Of Admission Date
IN1.25 Report Of Eligibility Flag
IN1.26 Report Of Eligibility Date
IN1.27 Release Information Code
IN1.28 Pre-Admit Cert
IN1.29 Verification Date/Time
IN1.30 Verification By
IN1.31 Type Of Agreement Code
IN1.32 Billing Status
IN1.33 Lifetime Reserve Days
IN1.34 Delay Before L.R. Day
IN1.35 Company Plan Code
IN1.36 Policy Number
IN1.37 Policy Deductible
IN1.38 Policy Limit – Amount
IN1.39 Policy Limit – Days
IN1.40 Room Rate – Semi-Private
IN1.41 Room Rate – Private
IN1.42 Insured’s Employment Status
IN1.43 Insured’s Administrative Sex
IN1.44 Insured’s Employer’s Address
IN1.45 Verification Status
IN1.46 Prior Insurance Plan ID
IN1.47 Coverage Type
IN1.48 Handicap
IN1.49 Insured’s ID Number
IN1.50 Signature Code
IN1.51 Signature Code Date
IN1.52 Insured_s Birth Place
IN1.53 VIP Indicator


The NK1 segment contain the information regarding the patient’s other related parties and any associate parties (i.e blood relative).

Example for NK1 segment:

NK1|4|||6666LOOP^^ISHPEMING^MI^49849^””^||(900)545-1200|EM^EMPLOYER|19940605||PROGRAMMER|||BUISINESS, INC.


The fields in the NK1 segments are as follows:

NK1.1 Set ID
NK1.2 NK Name
NK1.3 Relationship
NK1.4 Address
NK1.5 Phone Number
NK1.6 Business Phone Number
NK1.7 Contact Role
NK1.8 Start Date
NK1.9 End Date
NK1.10 Next of Kin / Associated Parties Job Title
NK1.11 Next of Kin / Associated Parties Job Code/Class
NK1.12 Next of Kin / Associated Parties Employee Number
NK1.13 Organization Name – NK1
NK1.14 Marital Status
NK1.15 Administrative Sex
NK1.16 Date/Time of Birth
NK1.17 Living Dependency
NK1.18 Ambulatory Status
NK1.19 Citizenship
NK1.20 Primary Language
NK1.21 Living Arrangement
NK1.22 Publicity Code
NK1.23 Protection Indicator
NK1.24 Student Indicator
NK1.25 Religion
NK1.26 Mother’s Maiden Name
NK1.27 Nationality
NK1.28 Ethnic Group
NK1.29 Contact Reason
NK1.30 Contact Person’s Name
NK1.31 Contact Person’s Telephone Number
NK1.32 Contact Person’s Address
NK1.33 Next of Kin/Associated Party’s Identifiers
NK1.34 Job Status
NK1.35 Race
NK1.36 Handicap
NK1.37 Contact Person Social Security Number
NK1.38 Next of Kin Birth Place
NK1.39 VIP Indicator


The NTE segment is used for sending notes and comments in message.


Example for NTE segment:

NTE||The patient is going to be on vacation so change appointment date

The fields in the NTE segments are as follows:

NTE.1 Set ID
NTE.2 Source of Comment
NTE.3 Comment
NTE.4 Comment Type


  • OBR – Observation request:

The OBR segment is used for transferring the information regarding an diagnostic study,observation or assessment that is specific to an order or result. ORU messages should contain the OBR segment followed by the OBX segment for each observation.

Example for OBR segment:


The fields in the OBR segments are as follows:

OBR.1 Set ID – OBR
OBR.2 Placer Order Number
OBR.3 Filler Order Number
OBR.4 Universal Service Identifier
OBR.5 Priority _ OBR
OBR.6 Requested Date/Time
OBR.7 Observation Date/Time
OBR.8 Observation End Date/Time
OBR.9 Collection Volume
OBR.10 Collector Identifier
OBR.11 Specimen Action Code
OBR.12 Danger Code
OBR.13 Relevant Clinical Information
OBR.14 Specimen Received Date/Time
OBR.15 Specimen Source
OBR.16 Ordering Provider
OBR.17 Order Callback Phone Number
OBR.18 Placer Field 1
OBR.19 Placer Field 2
OBR.20 Filler Field 1
OBR.21 Filler Field 2
OBR.22 Results Recipient/Status Change – Date/Time
OBR.23 Charge to Practice
OBR.24 Diagnostic Service Sect ID
OBR.25 Result Status
OBR.26 Parent Result
OBR.27 Quantity/Timing
OBR.28 Result Copies To
OBR.29 Parent Number
OBR.30 Transportation Mode
OBR.31 Reason for Study
OBR.32 Principal Result Interpreter
OBR.33 Assistant Result Interpreter
OBR.34 Technician
OBR.35 Transcription
OBR.36 Scheduled Date/Time
OBR.37 Number of Sample Containers *
OBR.38 Transport Logistics of Collected Sample
OBR.39 Collector’s Comment *
OBR.40 Transport Arrangement Responsibility
OBR.41 Transport Arranged
OBR.42 Escort Required
OBR.43 Planned Patient Transport Comment
OBR.44 Procedure Code
OBR.45 Procedure Code Modifier
OBR.46 Placer Supplemental Service Information
OBR.47 Filler Supplemental Service Information
OBR.48 Medically Necessary Duplicate Procedure Reason.
OBR.49 Result Handling
OBR.50 Parent Universal Service Identifier
  • OBX – Observation result:

The OBX segment carry key clinical observation reporting information within a report message which must be transmitted back to the requesting system.It is use to transmit single observation or observation Fragment.

Example for OBX segment:


The fields in the OBX segments are as follows:

OBX.1 Set ID
OBX.2 Value Type
OBX.3 Observation Identifier
OBX.4 Observation Sub-ID
OBX.5 Observation Value
OBX.6 Units
OBX.7 References Range
OBX.8 Abnormal Flags
OBX.9 Probability
OBX.10 Nature of Abnormal Test
OBX.11 Observation Result Status
OBX.12 Effective Date of Reference Range
OBX.13 User Defined Access Checks
OBX.14 Date/Time of the Observation
OBX.15 Producer’s ID
OBX.16 Responsible Observer
OBX.17 Observation Method
OBX.18 Equipment Instance Identifier
OBX.19 Date/Time of the Analysis
OBX.20 Reserved for v2.6
OBX.21 Reserved for v2.6
OBX.22 Reserved for v2.6
OBX.23 Performing Organization Name
OBX.24 Performing Organization Address
OBX.25 Performing Organization Medical Director



  • ORC – Common order:

The ORC segment is used to transmit fields that are common to all order .The ORC segment is required in ORM message.

Example for ORC segment:


The fields in the ORC segments are as follows:

ORC.1 Order Control
ORC.2 Placer Order Number
ORC.3 Filler Order Number
ORC.4 Placer Group Number
ORC.5 Order Status
ORC.6 Response Flag
ORC.7 Quantity/Timing
ORC.8 Parent Order
ORC.9 Date/Time of Transaction
ORC.10 Entered By
ORC.11 Verified By
ORC.12 Ordering Provider
ORC.13 Entering Location
ORC.14 Call Back Phone Number
ORC.15 Order Effective Date/Time
ORC.16 Order Control Code Reason
ORC.17 Entering Organization
ORC.18 Entering Device
ORC.19 Action By
ORC.20 Advanced Beneficiary Notice Code
ORC.21 Ordering Facility Name
ORC.22 Ordering Facility Address
ORC.23 Ordering Facility Phone Number
ORC.24 Ordering Provider Address
ORC.25 Order Status Modifier
ORC.26 Advanced Beneficiary Notice Override Reason
ORC.27 Filler’s Expected Availability Date/Time
ORC.28 Confidentiality Code
ORC.29 Order Type
ORC.30 Entering Authorization Mode
ORC.31 Parent Universal Service Identifier


  • PID – Patient identification:

The PID segment contain the information regarding the patient identification information.

Example for PID segment:


The fields in the PID segments are as follows:

PID.1 Set ID – PID
PID.2 Patient ID
PID.3 Patient Identifier List
PID.4 Alternate Patient ID – PID
PID.5 Patient Name
PID.6 Mother s Maiden Name
PID.7 Date/Time Of Birth
PID.8 Sex
PID.9 Patient Alias
PID.10 Race
PID.11 Patient Address
PID.12 County Code
PID.13 Phone Number – Home
PID.14 Phone Number – Business
PID.15 Primary Language
PID.16 Marital Status
PID.17 Religion
PID.18 Patient Account Number
PID.19 SSN Number – Patient
PID.20 Driver’s License Number – Patient
PID.21 Mother’s Identifier
PID.22 Ethnic Group
PID.23 Birth Place
PID.24 Multiple Birth Indicator
PID.25 Birth Order
PID.26 Citizenship
PID.27 Veterans Military Status
PID.28 Nationality
PID.29 Patient Death Date and Time
PID.30 Patient Death Indicator


  • FT1 (for DFT messages) – Financial transaction:

The FTI segment contain the information regarding post charges, payments,adjustments, etc. to patient accounting records.

Example for FT1 Segment:

FT1|1|6|4|20071217094821||Credit|303756^Lipid Panel^L|||2|115

The fields in the FT1 segments are as follows:

FT1.1 Set ID – FT1
FT1.2 Transaction ID
FT1.3 Transaction Batch ID
FT1.4 Transaction Date
FT1.5 Transaction Posting Date
FT1.6 Transaction Type
FT1.7 Transaction Code
FT1.8 Transaction Description
FT1.9 Transaction Description – Alt
FT1.10 Transaction Quantity
FT1.11 Transaction Amount – Extended
FT1.12 Transaction Amount – Unit
FT1.13 Department Code
FT1.14 Insurance Plan ID
FT1.15 Insurance Amount
FT1.16 Assigned Patient Location
FT1.17 Fee Schedule
FT1.18 Patient Type
FT1.19 Diagnosis Code – FT1
FT1.20 Performed By Code
FT1.21 Ordered By Code
FT1.22 Unit Cost
FT1.23 Filler Order Number
FT1.24 Entered By Code
FT1.25 Procedure Code
FT1.26 Procedure Code Modifier
FT1.27 Advanced Beneficiary Notice Code
FT1.28 Medically Necessary Duplicate Procedure Reason.
FT1.29 NDC Code
FT1.30 Payment Reference ID
FT1.31 Transaction Reference Key



HL7 is widely used for the betterment of the people in health care sector.It keep the medical record of each and every patient in organized manner and can be accessed in future for further use in the treatment of a patient or it can be used to check the past medical history of patient.It is a highly efficient way of communication between different hospital informative systems.






































Leave a Reply