HL7 Segments Explained: MSH, PID, PV1, OBR, OBX, IN1 and FT1
HL7 v2 messages are built from ordered segments. This guide explains the most common segment codes, what they carry, and how integration teams use them to troubleshoot admissions, orders, results, insurance, and diagnosis workflows.
Disclaimer: This guide is provided by Efneze for educational and technical reference purposes only. HL7®, FHIR®, and related standards are trademarks of Health Level Seven International. Efnezeis not affiliated with or endorsed by Health Level Seven International. For official requirements, always refer to the applicable official specification and your organization's implementation guidance.
Common HL7 v2 Segments
Every HL7 v2 message starts with MSH, then includes additional segments depending on the trigger event. ADT messages usually include PID and PV1. Lab result messages often include OBR and OBX. Billing and registration workflows may include DG1 and IN1. When a message fails downstream, the first debugging step is often to inspect the segment structure.
| Segment | Name | Common fields |
|---|---|---|
| MSH | Message Header | Sending/receiving systems, message type, timestamp, control ID, HL7 version |
| PID | Patient Identification | Medical record number, patient name, date of birth, sex, address |
| PV1 | Patient Visit | Patient class, location, attending provider, visit number |
| ORC | Common Order | Order control, placer order number, filler order number, order status |
| OBR | Observation Request | Ordered test, specimen timing, ordering provider, diagnostic service |
| OBX | Observation Result | Result identifier, value, units, reference range, abnormal flags |
| DG1 | Diagnosis | Diagnosis code, description, type, date, classification |
| IN1 | Insurance | Plan, payer, policy number, insured person, coverage details |
HL7 Field Example
A PID segment stores patient identity details in fixed field positions. For example, PID-3 commonly carries patient identifiers and PID-5 carries patient name. Because fields can contain components and subcomponents, teams typically use an HL7 parserrather than reading raw pipes by hand.
PID|1||12345^^^MRN||DOE^JANE||19800101|F|||100 MAIN ST^^CHICAGO^IL^60601
Major HL7 segments and examples
MSH segment
detect HL7 message typeMSH is the message header. It appears at the start of every HL7 v2 message and establishes separators, routing, message type, control ID, processing mode, and version.
Important fields include MSH-9 for message type, MSH-10 for message control ID, and MSH-12 for HL7 version.
MSH|^~\&|EHR|HOSPITAL|LAB|LABSYS|202606011030||ORU^R01|MSG123|P|2.5
PID segment
view PID patient demographicsPID is patient identification. It appears in most clinical, registration, billing, and result messages to identify the patient associated with the event.
Common PID fields include MRN and identifiers, patient name, date of birth, sex, address, phone numbers, and other demographic values.
PID|1||DEMO123^^^MRN||EXAMPLE^JANE||19800101|F|||100 MAIN ST^^CHICAGO^IL^60601
PV1 segment
inspect PV1 visit contextPV1 describes the patient visit or encounter. It commonly appears in ADT messages and gives context for patient class, location, providers, and visit numbers.
Common PV1 fields include patient class, assigned patient location, attending provider, admit source, discharge disposition, and visit number.
PV1|1|I|ICU^101^1||||0001^DEMO^DOCTOR|||||||||||VISIT0001
OBR segment
inspect OBR segments onlineOBR is the observation request segment. It describes a lab order, imaging order, panel, or other requested observation.
OBR-7 is commonly used for observation date/time. OBR-32 can identify the principal result interpreter when that field is populated by the sending system.
OBR|1||ORDER0002|CBC^Complete Blood Count|||20260601160000|||||||||||||||||||||||||0001^RESULT^INTERPRETER
OBX segment
parse OBX lab results onlineOBX carries observation results such as lab values, vitals, clinical scores, and other discrete measurements.
Important fields include OBX-3 observation identifier, OBX-5 observation value, OBX-6 units, OBX-7 reference range, OBX-8 abnormal flags, and OBX-11 result status.
OBX|1|NM|718-7^Hemoglobin^LN||13.2|g/dL|12.0-16.0|N|||F
ORC segment
review ORC order fieldsORC is the common order segment. It coordinates the lifecycle of orders across placer and filler systems.
Common ORC fields include order control, placer order number, filler order number, order status, order date/time, and ordering provider.
ORC|NW|PLACER0001|FILLER0001||SC||||20260601170000|0001^DEMO^DOCTOR
IN1 segment
inspect IN1 segments in the HL7 parserIN1 contains insurance information. It often appears in registration, billing, eligibility, and DFT workflows.
IN1 commonly includes payer, plan, group number, policy number, subscriber details, insured relationship, and coverage information.
IN1|1|PLAN0001|PAYER0001|Synthetic Insurance Plan||||GROUP123||POLICY456
FT1 segment
parse HL7 billing segmentsFT1 carries financial transaction details. It is common in billing-adjacent HL7 messages such as DFT transactions.
FT1 may contain transaction IDs, service dates, charge amounts, procedure codes, departments, and other financial data.
FT1|1|TXN0001|20260601|20260601|CG|99213^Office Visit^CPT|1|150.00
DG1 segment
inspect diagnosis segmentsDG1 represents diagnosis information. It can appear in ADT, billing, and clinical workflows where coded diagnoses are transmitted.
Common fields include diagnosis code, diagnosis description, diagnosis type, diagnosis date/time, and classification.
DG1|1||R69^Illness unspecified^I10
AL1 segment
inspect allergy segmentsAL1 contains allergy information. It helps downstream systems understand allergy type, allergen, severity, and reaction text.
Common AL1 fields include allergy type, allergy code, severity, reaction, and identification date.
AL1|1|DA|PENICILLIN^Penicillin|SEV|Anaphylaxis
NTE segment
review HL7 notesNTE stores notes and comments. It may attach contextual narrative to orders, observations, diagnosis information, or other segments.
Common fields include source of comment and comment text. NTE content can be clinically useful but may also contain free-text PHI.
NTE|1||Synthetic note for parser testing only
MSA and ERR segments
debug HL7 acknowledgementsMSA and ERR appear in acknowledgements. MSA communicates acceptance or rejection status, while ERR provides structured error details.
MSA commonly includes acknowledgement code and control ID. ERR can carry error location, error code, severity, and diagnostic details.
MSA|AE|MSG123 ERR|||207^Application internal error^HL70357
Message Header
Every HL7 message begins with MSH. It defines the message type, sending/receiving application, separators, timestamp, security, and version.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| MSH-1 | Field Separator | CHAR(1) |
| MSH-2 | Encoding Characters | VARCHAR(255) |
| MSH-3 | Sending Application | Composite (3 components) |
| MSH-4 | Sending Facility | Composite (3 components) |
| MSH-5 | Receiving Application | Composite (3 components) |
| MSH-6 | Receiving Facility | Composite (3 components) |
| MSH-7 | Message Date/Time | Composite (2 components) |
| MSH-8 | Security | VARCHAR(255) |
| MSH-9 | Message Type | Composite (3 components) |
| MSH-10 | Message Control Id | VARCHAR(255) |
| MSH-11 | Processing ID | Composite (2 components) |
| MSH-12 | Version ID | Composite (3 components) |
| MSH-13 | Sequence Number | NUMERIC(15,0) |
| MSH-14 | Continuation Pointer | VARCHAR(255) |
| MSH-15 | Accept Acknowledgment Type | VARCHAR(255) |
| MSH-16 | Application Acknowledgment Type | VARCHAR(255) |
| MSH-17 | Country Code | VARCHAR(255) |
| MSH-18 | Character Set | VARCHAR(255) |
| MSH-19 | Identifier | Composite (6 components) |
| MSH-20 | Alternate Character Set Handling Scheme | VARCHAR(255) |
| MSH-21 | Entity Identifier | Composite (4 components) |
Event Type
EVN describes the trigger event that created the message, such as patient admission, transfer, discharge, or updates.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| EVN-1 | Event Type Code | VARCHAR(255) |
| EVN-2 | Recorded Date Time | DATETIME2 |
| EVN-3 | Date Time Planned Event | DATETIME2 |
| EVN-4 | Event Reason Code | VARCHAR(255) |
| EVN-5 | Operator | Composite (2 components) |
| EVN-6 | Event Occurred | DATETIME2 |
| EVN-7 | Event Facility | Composite (2 components) |
Patient Identification
PID contains all patient demographic information. It is present in nearly every clinical HL7 message type.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| PID-1 | Set Id | VARCHAR(255) |
| PID-2 | Patient ID | Composite (10 components) |
| PID-3 | Patient Identifier List | Composite (6 components) |
| PID-4 | Alternate Patient Id | VARCHAR(255) |
| PID-5 | Patient Name | Composite (7 components) |
| PID-6 | Mothers Maiden Name | Composite (7 components) |
| PID-7 | Date/Time Of Birth | DATETIME2 |
| PID-8 | Administrative Sex | VARCHAR(255) |
| PID-9 | Patient Alias | VARCHAR(255) |
| PID-10 | Race | VARCHAR(255) |
| PID-11 | Patient Address | Composite (8 components) |
| PID-12 | County Code | VARCHAR(255) |
| PID-13 | Phone Number Home | VARCHAR(255) |
| PID-14 | Phone Number Business | VARCHAR(255) |
| PID-15 | Primary Language | VARCHAR(255) |
| PID-16 | Marital Status | VARCHAR(255) |
| PID-17 | Religion | VARCHAR(255) |
| PID-18 | Patient Account Number | VARCHAR(255) |
| PID-19 | SNN Number Patient | VARCHAR(255) |
| PID-20 | Drivers License Number Patient | VARCHAR(255) |
| PID-21 | Mothers Identifier | VARCHAR(255) |
| PID-22 | Ethnic Group | VARCHAR(255) |
| PID-23 | Birth Place | VARCHAR(255) |
| PID-24 | Multiple Birth Indicator | VARCHAR(255) |
| PID-25 | Birth Order | VARCHAR(255) |
| PID-26 | Citizenship | VARCHAR(255) |
| PID-27 | Veterans Military Status | VARCHAR(255) |
| PID-28 | Nationality | VARCHAR(255) |
| PID-29 | Patient Death Date And Time | DATETIME2 |
| PID-30 | Patient Death Indicator | VARCHAR(255) |
| PID-31 | Identity Unknown Indicator | VARCHAR(255) |
| PID-32 | Identity Reliability Code | VARCHAR(255) |
| PID-33 | Last Update Date Time | DATETIME2 |
| PID-34 | Last Update Facility | VARCHAR(255) |
| PID-35 | Species Code | VARCHAR(255) |
| PID-36 | Breed Code | VARCHAR(255) |
| PID-37 | Strain | VARCHAR(255) |
| PID-38 | Production Class Code | VARCHAR(255) |
| PID-39 | Tribal Citizenship | VARCHAR(255) |
Patient Additional Demographic
PD1 carries supplementary patient details, such as primary care providers, clinic designations, and immunization registry status.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| PD1-1 | Living Dependency | VARCHAR(255) |
| PD1-2 | Living Arrangement | VARCHAR(255) |
| PD1-3 | Patient Primary Facility | VARCHAR(255) |
| PD1-4 | Patient Primary Care Provider Id Number | Composite (3 components) |
| PD1-5 | Student Indicator | VARCHAR(255) |
| PD1-6 | Handicap | VARCHAR(255) |
| PD1-7 | Living Will Code | VARCHAR(255) |
| PD1-8 | Organ Donor Code | VARCHAR(255) |
| PD1-9 | Separate Bill | VARCHAR(255) |
| PD1-10 | Duplicate Patient | VARCHAR(255) |
| PD1-11 | Publicity Code | VARCHAR(255) |
| PD1-12 | Protection Indicator | VARCHAR(255) |
| PD1-13 | Protection Indicator Effective Date | DATETIME2 |
| PD1-14 | Place Of Worship | VARCHAR(255) |
| PD1-15 | Advance Directive Code | VARCHAR(255) |
| PD1-16 | Immunization Registry Status | VARCHAR(255) |
| PD1-17 | Immunization Registry Status Effective Date | DATETIME2 |
| PD1-18 | Publicity Code Effective Date | DATETIME2 |
| PD1-19 | Military Branch | VARCHAR(255) |
| PD1-20 | Military Rank Grade | VARCHAR(255) |
| PD1-21 | Military Status | VARCHAR(255) |
Next of Kin / Associated Parties
NK1 contains contact information, emergency details, and relationships for family members or next of kin.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| NK1-1 | Set Id - NK1 | VARCHAR(255) |
| NK1-2 | NK Name | Composite (7 components) |
| NK1-3 | Relationship | Composite (6 components) |
| NK1-4 | Address | Composite (12 components) |
| NK1-5 | Phone Number | Composite (8 components) |
| NK1-6 | Business Phone Number | Composite (8 components) |
| NK1-7 | Contact Role | Composite (6 components) |
| NK1-8 | Start Date | DATETIME2 |
| NK1-9 | End Date | DATETIME2 |
| NK1-10 | Next Of Kin / Associated Parties Job Title | VARCHAR(255) |
| NK1-11 | Next Of Kin / Associated Parties Job Code/Class | VARCHAR(255) |
| NK1-12 | Next Of Kin / Associated Parties Employee Number | VARCHAR(255) |
| NK1-13 | Organization Name - NK1 | Composite (1 components) |
Patient Visit
PV1 contains details about patient encounters, such as visit number, attending doctor, hospital location, and admission/discharge details.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| PV1-1 | Set Id | VARCHAR(255) |
| PV1-2 | Patient Class | VARCHAR(255) |
| PV1-3 | Assigned Patient Location | Composite (9 components) |
| PV1-4 | Admission Type | VARCHAR(255) |
| PV1-5 | Preadmit Number | Composite (8 components) |
| PV1-6 | Prior Patient Location | Composite (9 components) |
| PV1-7 | Attending Doctor | Composite (23 components) |
| PV1-8 | Referring Doctor | Composite (23 components) |
| PV1-9 | Consulting Doctor | Composite (23 components) |
| PV1-10 | Hospital Service | VARCHAR(255) |
| PV1-11 | Temporary Location | Composite (9 components) |
| PV1-12 | Preadmit Test Indicator | VARCHAR(255) |
| PV1-13 | Re-admission Indicator | VARCHAR(255) |
| PV1-14 | Admit Source | VARCHAR(255) |
| PV1-15 | Ambulatory Status | VARCHAR(255) |
| PV1-16 | VIP Indicator | VARCHAR(255) |
| PV1-17 | Admitting Doctor | Composite (23 components) |
| PV1-18 | Patient Type | VARCHAR(255) |
| PV1-19 | Visit Number | Composite (8 components) |
| PV1-20 | Financial Class | Composite (2 components) |
| PV1-21 | Charge Price Indicator | VARCHAR(255) |
| PV1-22 | Courtesy Code | VARCHAR(255) |
| PV1-23 | Credit Rating | VARCHAR(255) |
| PV1-24 | Contract Code | VARCHAR(255) |
| PV1-25 | Contract Effective Date | DATETIME2 |
| PV1-26 | Contract Amount | NUMERIC(15,2) |
| PV1-27 | Contract Period | NUMERIC(15,0) |
| PV1-28 | Interest Code | VARCHAR(255) |
| PV1-29 | Transfer To Bad Debt Code | VARCHAR(255) |
| PV1-30 | Transfer To Bad Debt Date | DATETIME2 |
| PV1-31 | Bad Debt Agency Code | VARCHAR(255) |
| PV1-32 | Bad Debt Transfer Amount | NUMERIC(15,2) |
| PV1-33 | Bad Debt Recovery Amount | NUMERIC(15,2) |
| PV1-34 | Delete Account Indicator | VARCHAR(255) |
| PV1-35 | Delete Account Date | DATETIME2 |
| PV1-36 | Discharge Disposition | VARCHAR(255) |
| PV1-37 | Discharged To Location | Composite (2 components) |
| PV1-38 | Diet Type | Composite (6 components) |
| PV1-39 | Servicing Facility | VARCHAR(255) |
| PV1-40 | Bed Status | VARCHAR(255) |
| PV1-41 | Account Status | VARCHAR(255) |
| PV1-42 | Pending Location | Composite (9 components) |
| PV1-43 | Prior Temporary Location | Composite (9 components) |
| PV1-44 | Admit Date/Time | Composite (2 components) |
| PV1-45 | Discharge Date/Time | Composite (2 components) |
| PV1-46 | Current Patient Balance | NUMERIC(15,2) |
| PV1-47 | Total Charges | NUMERIC(15,2) |
| PV1-48 | Total Adjustments | NUMERIC(15,2) |
| PV1-49 | Total Payments | NUMERIC(15,2) |
| PV1-50 | Alternate Visit ID | Composite (8 components) |
| PV1-51 | Visit Indicator | VARCHAR(255) |
| PV1-52 | Other Healthcare Provider | Composite (23 components) |
Patient Visit - Additional
PV2 carries supplementary encounter information including transfer reasons, expected durations, and clinical instructions.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| PV2-1 | Prior Pending Location | VARCHAR(255) |
| PV2-2 | Accommodation Code | VARCHAR(255) |
| PV2-3 | Admit Reason | VARCHAR(255) |
| PV2-4 | Transfer Reason | VARCHAR(255) |
| PV2-5 | Patient Valuables | VARCHAR(255) |
| PV2-6 | Patient Valuables Location | VARCHAR(255) |
| PV2-7 | Visit User Code | VARCHAR(255) |
| PV2-8 | Expected Admit Date Time | DATETIME2 |
| PV2-9 | Expected Discharge Date Time | DATETIME2 |
| PV2-10 | Estimated Length Of Inpatient Stay | NUMERIC(15,0) |
| PV2-11 | Actual Length Of Inpatient Stay | NUMERIC(15,0) |
| PV2-12 | Visit Description | VARCHAR(255) |
| PV2-13 | Referral Source Code | VARCHAR(255) |
| PV2-14 | Previous Service Date | DATETIME2 |
| PV2-15 | Employment Illness Related Indicator | VARCHAR(255) |
| PV2-16 | Purge Status Code | VARCHAR(255) |
| PV2-17 | Purge Status Date | DATETIME2 |
| PV2-18 | Special Program Code | VARCHAR(255) |
| PV2-19 | Retention Indicator | VARCHAR(255) |
| PV2-20 | Expected Number Of Insurance Plans | NUMERIC(15,0) |
| PV2-21 | Visit Publicity Code | VARCHAR(255) |
| PV2-22 | Visit Protection Indicator | VARCHAR(255) |
| PV2-23 | Clinic Organization Name | VARCHAR(255) |
| PV2-24 | Patient Status Code | VARCHAR(255) |
| PV2-25 | Visit Priority Code | VARCHAR(255) |
| PV2-26 | Previous Treatment Date | DATETIME2 |
| PV2-27 | Expected Discharge Disposition | VARCHAR(255) |
| PV2-28 | Signature On File Date | DATETIME2 |
| PV2-29 | First Similar Illness Date | DATETIME2 |
| PV2-30 | Patient Charge Adjustment Code | VARCHAR(255) |
| PV2-31 | Recurring Service Code | VARCHAR(255) |
| PV2-32 | Billing Media Code | VARCHAR(255) |
| PV2-33 | Expected Surgery Date And Time | DATETIME2 |
| PV2-34 | Military Partnership Code | VARCHAR(255) |
| PV2-35 | Military Non Availability Code | VARCHAR(255) |
| PV2-36 | Newborn Baby Indicator | VARCHAR(255) |
| PV2-37 | Baby Detained Indicator | VARCHAR(255) |
Allergy Information
AL1 carries patient allergy records, including allergen types, severity, reactions, and identification details.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| AL1-1 | Set Id | VARCHAR(255) |
| AL1-2 | Allergen Type Code | VARCHAR(255) |
| AL1-3 | Allergen Code Mnemo | VARCHAR(255) |
| AL1-4 | Allergy Severity Code | VARCHAR(255) |
| AL1-5 | Allergy Reaction Code | VARCHAR(255) |
| AL1-6 | Identification Date | DATETIME2 |
Diagnosis Information
DG1 holds patient diagnosis details, including ICD codes, diagnosis types, classification, and reporting clinicians.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| DG1-1 | Set Id - DG1 | VARCHAR(255) |
| DG1-2 | Diagnosis Coding Method | VARCHAR(255) |
| DG1-3 | Diagnosis Code | Composite (6 components) |
| DG1-4 | Diagnosis Description | VARCHAR(255) |
| DG1-5 | Diagnosis Date/Time | Composite (2 components) |
| DG1-6 | Diagnosis Type | VARCHAR(255) |
| DG1-7 | Major Diagnostic Category | Composite (6 components) |
| DG1-8 | Diagnostic Related Group | Composite (6 components) |
| DG1-9 | DRG Approval Indicator | VARCHAR(255) |
| DG1-10 | DRG Grouper Review Code | VARCHAR(255) |
| DG1-11 | Outlier Type | Composite (6 components) |
| DG1-12 | Outlier Days | NUMERIC(15,0) |
| DG1-13 | Outlier Cost | NUMERIC(15,2) |
| DG1-14 | Grouper Version And Type | VARCHAR(255) |
| DG1-15 | Diagnosis Priority | VARCHAR(255) |
| DG1-16 | Diagnosing Clinician | Composite (23 components) |
| DG1-17 | Diagnosis Classification | VARCHAR(255) |
| DG1-18 | Confidential Indicator | VARCHAR(255) |
| DG1-19 | Attestation Date/Time | Composite (2 components) |
Insurance Information
IN1 provides details of patient insurance policies, plan coverage, group numbers, and coordination of benefits.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| IN1-1 | Set Id | VARCHAR(255) |
| IN1-2 | Health Plan Id | VARCHAR(255) |
| IN1-3 | Insurance Company Id | VARCHAR(255) |
| IN1-4 | Insurance Company Name | VARCHAR(255) |
| IN1-5 | Insurance Company Address | VARCHAR(255) |
| IN1-6 | Insurance Co Contact Person | VARCHAR(255) |
| IN1-7 | Insurance Co Phone Number | VARCHAR(255) |
| IN1-8 | Group Number | VARCHAR(255) |
| IN1-9 | Group Name | VARCHAR(255) |
| IN1-10 | Insureds Group Emp Id | VARCHAR(255) |
| IN1-11 | Insureds Group Emp Name | VARCHAR(255) |
| IN1-12 | Plan Effective Date | DATETIME2 |
| IN1-13 | Plan Expiration Date | DATETIME2 |
| IN1-14 | Authorization Information | VARCHAR(255) |
| IN1-15 | Plan Type | VARCHAR(255) |
| IN1-16 | Name Of Insured | Composite (2 components) |
| IN1-17 | Insureds Relationship To Patient | VARCHAR(255) |
| IN1-18 | Insureds Date Time Of Birth | DATETIME2 |
| IN1-19 | Insureds Address | VARCHAR(255) |
| IN1-20 | Assignment Of Benefits | VARCHAR(255) |
| IN1-21 | Coordination Of Benefits | VARCHAR(255) |
| IN1-22 | Coord Of Ben Priority | VARCHAR(255) |
| IN1-23 | Notice Of Admission Flag | VARCHAR(255) |
| IN1-24 | Notice Of Admission Date | DATETIME2 |
| IN1-25 | Report Of Eligibility Flag | VARCHAR(255) |
| IN1-26 | Report Of Eligibility Date | DATETIME2 |
| IN1-27 | Release Information Code | VARCHAR(255) |
| IN1-28 | Pre Admit Cert | VARCHAR(255) |
| IN1-29 | Verification Date Time | DATETIME2 |
| IN1-30 | Verification By | VARCHAR(255) |
| IN1-31 | Type Of Agreement Code | VARCHAR(255) |
| IN1-32 | Billing Status | VARCHAR(255) |
| IN1-33 | Lifetime Reserve Days | NUMERIC(15,0) |
| IN1-34 | Delay Before Lr Day | NUMERIC(15,0) |
| IN1-35 | Company Plan Code | VARCHAR(255) |
| IN1-36 | Policy Number | VARCHAR(255) |
| IN1-37 | Policy Deductible | NUMERIC(15,2) |
| IN1-38 | Policy Limit Days | NUMERIC(15,0) |
| IN1-39 | Policy Limit Amount | NUMERIC(15,2) |
| IN1-40 | Policy Limit Days | NUMERIC(15,0) |
| IN1-41 | Room Rate Semi Private | NUMERIC(15,2) |
| IN1-42 | Room Rate Private | NUMERIC(15,2) |
| IN1-43 | Insureds Employment Status | VARCHAR(255) |
Insurance Additional Information
IN2 carries supplementary policy holder details, employer information, and pre-authorization requirements.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| IN2-1 | Insureds Employee Id | VARCHAR(255) |
| IN2-2 | Insureds Social Security Number | VARCHAR(255) |
| IN2-3 | Insureds Employers Name And Id | VARCHAR(255) |
| IN2-4 | Employer Information Data | VARCHAR(255) |
| IN2-5 | Mail Claim Party | VARCHAR(255) |
| IN2-6 | Medicare Health Ins Card Number | VARCHAR(255) |
| IN2-7 | Medicaid Case Name | VARCHAR(255) |
| IN2-8 | Medicaid Case Number | VARCHAR(255) |
| IN2-9 | Military Sponsor Name | VARCHAR(255) |
| IN2-10 | Military Id Number | VARCHAR(255) |
| IN2-11 | Dependent Of Military Recipient | VARCHAR(255) |
| IN2-12 | Military Organization | VARCHAR(255) |
| IN2-13 | Military Station | VARCHAR(255) |
| IN2-14 | Military Service | VARCHAR(255) |
| IN2-15 | Military Rank Grade | VARCHAR(255) |
| IN2-16 | Military Status | VARCHAR(255) |
| IN2-17 | Military Retire Date | DATETIME2 |
| IN2-18 | Military Non Avail Cert On File | VARCHAR(255) |
| IN2-19 | Baby Coverage | VARCHAR(255) |
| IN2-20 | Combine Baby Bill | VARCHAR(255) |
| IN2-21 | Blood Deductible | VARCHAR(255) |
| IN2-22 | Special Coverage Approval Name | VARCHAR(255) |
| IN2-23 | Special Coverage Approval Title | VARCHAR(255) |
| IN2-24 | Non Covered Insurance Code | VARCHAR(255) |
| IN2-25 | Payor Id | VARCHAR(255) |
| IN2-26 | Payor Subscriber Id | VARCHAR(255) |
| IN2-27 | Eligibility Source | VARCHAR(255) |
| IN2-28 | Room Coverage Type Amount | VARCHAR(255) |
| IN2-29 | Policy Type Amount | VARCHAR(255) |
| IN2-30 | Daily Deductible | VARCHAR(255) |
Custom Z-Segment
ZD1 is a custom Z-segment representing site-specific, non-standard clinical data structures.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| ZD1-1 | Custom Field1 | VARCHAR(255) |
| ZD1-2 | Custom Field2 | VARCHAR(255) |
| ZD1-3 | Custom Field3 | VARCHAR(255) |
| ZD1-4 | Custom Field4 | VARCHAR(255) |
| ZD1-5 | Custom Field5 | VARCHAR(255) |
Procedures Information
PR1 contains details of medical procedures performed, procedure codes, timestamps, and performing clinicians.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| PR1-1 | Set Id - PR1 | VARCHAR(255) |
| PR1-2 | Procedure Coding Method | VARCHAR(255) |
| PR1-3 | Procedure Code | Composite (6 components) |
| PR1-4 | Procedure Description | VARCHAR(255) |
| PR1-5 | Procedure Date/Time | Composite (2 components) |
| PR1-6 | Procedure Functional Type | VARCHAR(255) |
| PR1-7 | Procedure Minutes | NUMERIC(15,0) |
| PR1-8 | Anesthesiologist | Composite (23 components) |
| PR1-9 | Anesthesia Code | VARCHAR(255) |
| PR1-10 | Anesthesia Minutes | NUMERIC(15,0) |
| PR1-11 | Surgeon | Composite (23 components) |
| PR1-12 | Procedure Practitioner | Composite (23 components) |
| PR1-13 | Consent Code | VARCHAR(255) |
| PR1-14 | Procedure Priority | VARCHAR(255) |
| PR1-15 | Associated Diagnosis Code | Composite (6 components) |
| PR1-16 | Procedure Code Modifier | Composite (6 components) |
Observation Request
OBR lists clinical observation requests, detailing lab order descriptions, ordering clinicians, specimen sources, and diagnostic status.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| OBR-1 | Set Id - OBR | VARCHAR(255) |
| OBR-2 | Placer Order Number | Composite (4 components) |
| OBR-3 | Filler Order Number | Composite (4 components) |
| OBR-4 | Universal Service Identifier | Composite (6 components) |
| OBR-5 | Priority | VARCHAR(255) |
| OBR-6 | Requested Date/Time | Composite (2 components) |
| OBR-7 | Observation Date/Time | Composite (2 components) |
| OBR-8 | Observation End Date/Time | Composite (2 components) |
| OBR-9 | Collection Volume | Composite (2 components) |
| OBR-10 | Collector Identifier | Composite (23 components) |
| OBR-11 | Specimen Action Code | VARCHAR(255) |
| OBR-12 | Danger Code | Composite (6 components) |
| OBR-13 | Relevant Clinical Information | VARCHAR(255) |
| OBR-14 | Specimen Received Date/Time | Composite (2 components) |
| OBR-15 | Specimen Source | Composite (3 components) |
| OBR-16 | Ordering Provider | Composite (23 components) |
| OBR-17 | Order Callback Phone Number | Composite (2 components) |
| OBR-18 | Placer Field 1 | VARCHAR(255) |
| OBR-19 | Placer Field 2 | VARCHAR(255) |
| OBR-20 | Filler Field 1 | VARCHAR(255) |
| OBR-21 | Filler Field 2 | VARCHAR(255) |
| OBR-22 | Results Rpt/Status Chng - Date/Time | Composite (2 components) |
| OBR-23 | Charge to Practice | VARCHAR(255) |
| OBR-24 | Diagnostic Serv Sect ID | VARCHAR(255) |
| OBR-25 | Result Status | VARCHAR(255) |
| OBR-26 | Parent Result | Composite (3 components) |
| OBR-27 | Quantity/Timing | Composite (5 components) |
| OBR-28 | Result Copies To | Composite (23 components) |
Observation/Result
OBX carries individual observation results, including lab values, vital signs, clinical measurements, reference ranges, and abnormal flags.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| OBX-1 | Set Id - OBX | VARCHAR(255) |
| OBX-2 | Value Type | VARCHAR(255) |
| OBX-3 | Observation Identifier | Composite (6 components) |
| OBX-4 | Observation Sub-ID | VARCHAR(255) |
| OBX-5 | Observation Value | VARCHAR(255) |
| OBX-6 | Units | Composite (6 components) |
| OBX-7 | References Range | VARCHAR(255) |
| OBX-8 | Abnormal Flags | VARCHAR(255) |
| OBX-9 | Probability | NUMERIC(15,2) |
| OBX-10 | Nature of Abnormal Test | VARCHAR(255) |
| OBX-11 | Observation Result Status | VARCHAR(255) |
| OBX-12 | Effective Date of Reference Range | Composite (2 components) |
| OBX-13 | User Defined Access Checks | VARCHAR(255) |
| OBX-14 | Date/Time of the Observation | Composite (2 components) |
| OBX-15 | Producer's ID | Composite (6 components) |
| OBX-16 | Responsible Observer | Composite (23 components) |
| OBX-17 | Observation Method | Composite (6 components) |
| OBX-18 | Equipment Instance Identifier | Composite (4 components) |
| OBX-19 | Date/Time of the Analysis | Composite (2 components) |
Guarantor Information
GT1 lists the guarantor financially responsible for payment of clinical fees.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| GT1-1 | Set Id - GT1 | VARCHAR(255) |
| GT1-2 | Guarantor Number | Composite (8 components) |
| GT1-3 | Guarantor Name | Composite (7 components) |
| GT1-4 | Guarantor Spouse Name | Composite (7 components) |
| GT1-5 | Guarantor Address | Composite (12 components) |
| GT1-6 | Guarantor Ph Num - Home | Composite (8 components) |
| GT1-7 | Guarantor Ph Num - Business | Composite (8 components) |
| GT1-8 | Guarantor Date/Time Of Birth | Composite (2 components) |
| GT1-9 | Guarantor Administrative Sex | VARCHAR(255) |
| GT1-10 | Guarantor Type | VARCHAR(255) |
| GT1-11 | Guarantor Relationship | Composite (6 components) |
| GT1-12 | Guarantor SSN | VARCHAR(255) |
| GT1-13 | Guarantor Date - Begin | DATETIME2 |
| GT1-14 | Guarantor Date - End | DATETIME2 |
| GT1-15 | Guarantor Priority | NUMERIC(15,0) |
| GT1-16 | Guarantor Employer Name | Composite (7 components) |
| GT1-17 | Guarantor Employer Address | Composite (12 components) |
| GT1-18 | Guarantor Employer Phone Number | Composite (8 components) |
| GT1-19 | Guarantor Employee ID Number | VARCHAR(255) |
| GT1-20 | Guarantor Employment Status | VARCHAR(255) |
Notes and Comments
NTE contains supplementary comments, raw text clinical notes, or footnotes attached to other segments (like PID, OBR, or OBX).
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| NTE-1 | Set Id - NTE | VARCHAR(255) |
| NTE-2 | Source Of Comment | VARCHAR(255) |
| NTE-3 | Comment | VARCHAR(1024) |
| NTE-4 | Comment Type | Composite (6 components) |
Common Order
ORC provides general order details common to clinical requests and results, including order control status and timestamps.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| ORC-1 | Order Control | VARCHAR(255) |
| ORC-2 | Placer Order Number | Composite (4 components) |
| ORC-3 | Filler Order Number | Composite (4 components) |
| ORC-4 | Placer Group Number | Composite (4 components) |
| ORC-5 | Order Status | VARCHAR(255) |
| ORC-6 | Response Flag | VARCHAR(255) |
| ORC-7 | Quantity/Timing | Composite (5 components) |
| ORC-8 | Parent | Composite (2 components) |
| ORC-9 | Date/Time Of Transaction | Composite (2 components) |
| ORC-10 | Entered By | Composite (23 components) |
| ORC-11 | Verified By | Composite (23 components) |
| ORC-12 | Ordering Provider | Composite (23 components) |
| ORC-13 | Enterer's Location | Composite (4 components) |
| ORC-14 | Call Back Phone Number | Composite (8 components) |
Financial Transaction
FT1 contains financial information and billing details for patient accounts, charge codes, and transaction amounts.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| FT1-1 | Set Id - FT1 | VARCHAR(255) |
| FT1-2 | Transaction Id | VARCHAR(255) |
| FT1-3 | Transaction Batch Id | VARCHAR(255) |
| FT1-4 | Transaction Date | Composite (2 components) |
| FT1-5 | Transaction Posting Date | Composite (2 components) |
| FT1-6 | Transaction Type | VARCHAR(255) |
| FT1-7 | Transaction Code | Composite (6 components) |
| FT1-8 | Transaction Description | VARCHAR(255) |
| FT1-9 | Transaction Description - Alt | VARCHAR(255) |
| FT1-10 | Transaction Quantity | NUMERIC(15,2) |
| FT1-11 | Transaction Amount - Extended | NUMERIC(15,2) |
| FT1-12 | Transaction Amount - Unit | NUMERIC(15,2) |
| FT1-13 | Transaction Priority | Composite (6 components) |
| FT1-14 | Insurance Plan Id | VARCHAR(255) |
| FT1-15 | Insurance Amount | NUMERIC(15,2) |
| FT1-16 | Assigned Patient Location | Composite (4 components) |
| FT1-17 | Fee Schedule | VARCHAR(255) |
| FT1-18 | Patient Type | VARCHAR(255) |
| FT1-19 | Diagnosis Code - FT1 | Composite (6 components) |
| FT1-20 | Performed By Code | Composite (23 components) |
| FT1-21 | Ordered By Code | Composite (23 components) |
| FT1-22 | Unit Cost | NUMERIC(15,2) |
| FT1-23 | Filler Order Number | Composite (4 components) |
Document Transcription Alliance
TXA carries administrative and clinical metadata regarding signed documents, transcripts, and external reports.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| TXA-1 | Set Id - TXA | VARCHAR(255) |
| TXA-2 | Document Type | VARCHAR(255) |
| TXA-3 | Document Content Presentation | VARCHAR(255) |
| TXA-4 | Activity Date/Time | Composite (2 components) |
| TXA-5 | Primary Experience | Composite (23 components) |
| TXA-6 | Origination Date/Time | Composite (2 components) |
| TXA-7 | Transcription Date/Time | Composite (2 components) |
| TXA-8 | Edit Date/Time | VARCHAR(255) |
| TXA-9 | Originator | Composite (23 components) |
| TXA-10 | Transcriptionist | Composite (23 components) |
| TXA-11 | Unique Document Number | Composite (4 components) |
Message Acknowledgment
MSA carries response acknowledgments (ACK) confirming receipt, success, or errors of transmitted HL7 packets.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| MSA-1 | Acknowledgment Code | VARCHAR(2) |
| MSA-2 | Message Control Id | VARCHAR(255) |
| MSA-3 | Text Message | VARCHAR(255) |
| MSA-4 | Expected Sequence Number | NUMERIC(15,0) |
| MSA-5 | Delayed Acknowledgment Type | VARCHAR(255) |
| MSA-6 | Error Condition | Composite (6 components) |
Error Information
ERR conveys detailed diagnostic error specifications, warning codes, and application logs returned during parsing failures.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| ERR-1 | Error Code and Location | VARCHAR(255) |
| ERR-2 | Error Location | VARCHAR(255) |
| ERR-3 | HL7 Error Code | Composite (6 components) |
| ERR-4 | Severity | VARCHAR(255) |
| ERR-5 | Application Error Code | Composite (6 components) |
| ERR-6 | Application Error Parameter | VARCHAR(255) |
| ERR-7 | Diagnostic Information | VARCHAR(255) |
| ERR-8 | User Message | VARCHAR(255) |
Pharmacy/Treatment Encoded Order
RXE outlines pharmacy order details, including medications, dosages, administration routes, and pharmacy instructions.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| RXE-1 | Quantity/Timing | Composite (5 components) |
| RXE-2 | Give Code | Composite (6 components) |
| RXE-3 | Give Amount - Minimum | NUMERIC(15,2) |
| RXE-4 | Give Amount - Maximum | NUMERIC(15,2) |
| RXE-5 | Give Units | Composite (6 components) |
| RXE-6 | Give Dosage Form | Composite (6 components) |
| RXE-7 | Provider's Administration Instructions | Composite (6 components) |
| RXE-8 | Deliver-To Location | VARCHAR(255) |
| RXE-9 | Substitution Status | VARCHAR(255) |
Pharmacy/Treatment Dispense
RXD details dispensed pharmacy medications, quantities, lot numbers, and dispensing pharmacists.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| RXD-1 | Dispense Sub-Id | NUMERIC(15,0) |
| RXD-2 | Dispense/Give Code | Composite (6 components) |
| RXD-3 | Date/Time Dispensed | Composite (2 components) |
| RXD-4 | Actual Dispense Amount | NUMERIC(15,2) |
| RXD-5 | Actual Dispense Units | Composite (6 components) |
| RXD-6 | Actual Dosage Form | Composite (6 components) |
| RXD-7 | Prescription Number | VARCHAR(255) |
| RXD-8 | Number Of Refills Remaining | NUMERIC(15,0) |
Scheduling Activity Information
SCH carries appointment scheduling parameters, booked resources, locations, and timings.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| SCH-1 | Placer Appointment Id | Composite (4 components) |
| SCH-2 | Filler Appointment Id | Composite (4 components) |
| SCH-3 | Occurrence Number | NUMERIC(15,0) |
| SCH-4 | Placer Group Number | Composite (4 components) |
| SCH-5 | Schedule ID | Composite (6 components) |
| SCH-6 | Event Reason | Composite (6 components) |
| SCH-7 | Appointment Reason | Composite (6 components) |
| SCH-8 | Appointment Type | Composite (6 components) |
| SCH-9 | Appointment Duration | NUMERIC(15,0) |
| SCH-10 | Appointment Duration Units | Composite (6 components) |
| SCH-11 | Appointment Timing | Composite (5 components) |
Resource Group Segment
RGS identifies groups of clinical resources (personnel, equipment) reserved for scheduled events.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| RGS-1 | Set Id - RGS | VARCHAR(255) |
| RGS-2 | Segment Action Code | VARCHAR(255) |
| RGS-3 | Resource Group Id | Composite (6 components) |
Appointment Information - Location
AIL lists clinical locations, clinics, or wards reserved during an appointment scheduling flow.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| AIL-1 | Set Id - AIL | VARCHAR(255) |
| AIL-2 | Segment Action Code | VARCHAR(255) |
| AIL-3 | Location Resource Id | Composite (8 components) |
| AIL-4 | Location Type - AIL | Composite (6 components) |
| AIL-5 | Location Group | Composite (6 components) |
| AIL-6 | Start Date/Time | Composite (2 components) |
| AIL-7 | Start Date/Time Offset | NUMERIC(15,0) |
Appointment Information - Personnel
AIP identifies clinical personnel (physicians, technicians) reserved during scheduling appointments.
| Field Index | Field Description / Components | SQL Data Type |
|---|---|---|
| AIP-1 | Set Id - AIP | VARCHAR(255) |
| AIP-2 | Segment Action Code | VARCHAR(255) |
| AIP-3 | Personnel Resource Id | Composite (23 components) |
| AIP-4 | Resource Type - AIP | Composite (6 components) |
| AIP-5 | Resource Group | Composite (6 components) |
| AIP-6 | Start Date/Time | Composite (2 components) |
| AIP-7 | Start Date/Time Offset | NUMERIC(15,0) |
Need to Decode a Live Message?
Paste any HL7 message into the browser-based HL7 parser to decode segments, fields, components, and subcomponents client-side.
Frequently Asked Questions
What is an HL7 segment?
An HL7 segment is a line in an HL7 v2 message. Each segment begins with a three-character code such as MSH, PID, PV1, OBR, or OBX and contains pipe-delimited fields.
What does the MSH segment do?
MSH is the message header segment. It identifies the sending and receiving applications, message timestamp, message type, control ID, processing ID, and HL7 version.
What is the difference between OBR and OBX?
OBR describes an observation request, such as a lab order or panel. OBX carries individual observation results, such as a specific lab value and unit.
How can I decode HL7 segments?
Use an HL7 parser to split the message into segments, fields, components, and subcomponents, then map each position to its field name and meaning.