Appearance
Segment Reference
EDI transactions are built from segments — single lines of data that each serve a specific purpose. Understanding segment structure is essential for reading and troubleshooting EDI files.
What Are Segments?
A segment is a single line in an EDI file, starting with a 2-3 character segment ID and ending with a segment terminator (usually ~). Each segment represents a specific type of information.
Basic Structure
NM1*IL*1*SMITH*JOHN*A***MI*ABC123456~
│ │ │ │ │ │ │ │ │ │
│ └──┴───┴─────┴───┴─┴─┴──┴────────┴── Elements (separated by *)
└── Segment ID └── Segment TerminatorKey Concepts
| Term | Definition |
|---|---|
| Segment ID | 2-3 character identifier (e.g., NM1, CLM, SVC) |
| Element | Individual data field within a segment |
| Element Separator | Character separating elements (usually *) |
| Composite | Element containing sub-elements (separated by :) |
| Segment Terminator | Character ending the segment (usually ~) |
| Required Element | Must be present for the segment to be valid |
| Situational Element | Required only in certain circumstances |
Understanding Elements
Elements are numbered starting from 01 after the segment ID. Empty elements still need their separators:
DMG*D8*19800515*M**~
│ │ │ ││
01 02 03 0405 (empty)- DMG01:
D8— Date format qualifier - DMG02:
19800515— Date of birth - DMG03:
M— Gender - DMG04: Empty
- DMG05: Empty (trailing empties can be omitted)
How EDI Paisan Displays Elements
In the segment detail panel, EDI Paisan shows:
DMG - Demographic Information
├── DMG01: D8 (Date Format: CCYYMMDD)
├── DMG02: 19800515 (Date of Birth)
├── DMG03: M (Gender: Male)Each element is labeled with its position and meaning based on the transaction type context.
Composite Elements
Some elements contain sub-elements separated by colons (:). These are called composite elements.
Example: Healthcare Service Code
SV1*HC:99213:25*125*UN*1~
│ │ │
│ │ └── Modifier
│ └── CPT Code
└── Code Type (HC = HCPCS)This SV1-01 composite contains:
- SV1-01-1:
HC— Procedure code qualifier - SV1-01-2:
99213— CPT/HCPCS code - SV1-01-3:
25— Modifier
Common Composite Patterns
| Element | Components | Example |
|---|---|---|
| Procedure Code | Type:Code:Mod1:Mod2:Mod3:Mod4 | HC:99213:25 |
| Diagnosis Code | Type:Code | ABK:J0690 |
| Amount | Qualifier:Amount | B6:1500.00 |
| Provider ID | Type:ID | XX:1234567890 |
Envelope Segments
Every EDI file is wrapped in envelope segments that identify the transmission:
ISA — Interchange Control Header
The ISA segment starts every EDI file and has fixed-length elements:
ISA*00* *00* *ZZ*SENDER *ZZ*RECEIVER *240115*1200*^*00501*000000001*0*P*:~| Element | Length | Description |
|---|---|---|
| ISA01 | 2 | Authorization Info Qualifier |
| ISA02 | 10 | Authorization Information |
| ISA03 | 2 | Security Info Qualifier |
| ISA04 | 10 | Security Information |
| ISA05 | 2 | Interchange Sender ID Qualifier |
| ISA06 | 15 | Interchange Sender ID |
| ISA07 | 2 | Interchange Receiver ID Qualifier |
| ISA08 | 15 | Interchange Receiver ID |
| ISA09 | 6 | Interchange Date (YYMMDD) |
| ISA10 | 4 | Interchange Time (HHMM) |
| ISA11 | 1 | Repetition Separator |
| ISA12 | 5 | Interchange Control Version |
| ISA13 | 9 | Interchange Control Number |
| ISA14 | 1 | Acknowledgment Requested |
| ISA15 | 1 | Usage Indicator (P=Production, T=Test) |
| ISA16 | 1 | Component Element Separator |
ISA Fixed-Width
Unlike other segments, ISA elements have fixed widths. That's why you see padding spaces. EDI Paisan handles this automatically.
IEA — Interchange Control Trailer
Closes the interchange:
IEA*1*000000001~- IEA01: Number of included functional groups
- IEA02: Interchange control number (must match ISA13)
GS — Functional Group Header
Groups related transactions:
GS*HC*SENDER*RECEIVER*20240115*1200*1*X*005010X222A1~| Element | Description |
|---|---|
| GS01 | Functional ID Code (HC=Healthcare Claim) |
| GS02 | Application Sender's Code |
| GS03 | Application Receiver's Code |
| GS04 | Date (CCYYMMDD) |
| GS05 | Time (HHMM) |
| GS06 | Group Control Number |
| GS07 | Responsible Agency Code (X=X12) |
| GS08 | Implementation Version |
GE — Functional Group Trailer
GE*1*1~- GE01: Number of transaction sets in group
- GE02: Group control number (must match GS06)
ST — Transaction Set Header
Starts each transaction:
ST*837*0001*005010X222A1~- ST01: Transaction Set ID (
837,835,270,271) - ST02: Transaction Set Control Number
- ST03: Implementation Convention Reference
SE — Transaction Set Trailer
SE*42*0001~- SE01: Number of segments in transaction (including ST and SE)
- SE02: Transaction Set Control Number (must match ST02)
Key Segments by Transaction Type
837 — Claims
| Segment | Name | Purpose | Loop |
|---|---|---|---|
| BHT | Beginning of Hierarchical Transaction | Transaction info, purpose | Header |
| HL | Hierarchical Level | Establishes parent-child structure | 2000* |
| NM1 | Individual or Organizational Name | Identifies entities | 2010* |
| N3 | Address Information | Street address | 2010* |
| N4 | Geographic Location | City, state, ZIP | 2010* |
| REF | Reference Identification | IDs, account numbers | Various |
| DMG | Demographic Information | DOB, gender | 2010* |
| CLM | Claim Information | Claim details, charges | 2300 |
| DTP | Date/Time Reference | Service dates, admission | Various |
| HI | Health Care Information Codes | Diagnosis codes | 2300 |
| SBR | Subscriber Information | Coverage details | 2000B |
| SV1 | Professional Service | Line item (837P) | 2400 |
| SV2 | Institutional Service | Line item (837I) | 2400 |
| LX | Transaction Set Line Number | Line counter | 2400 |
CLM — Claim Information
The heart of an 837 transaction:
CLM*PATIENT-ACCT-123*500***11:B:1*Y*A*Y*Y~| Element | Description |
|---|---|
| CLM01 | Patient Account Number |
| CLM02 | Total Claim Charge Amount |
| CLM03 | Not used |
| CLM04 | Not used |
| CLM05 | Place of Service:Facility Code:Frequency Code |
| CLM06 | Provider Signature on File (Y/N) |
| CLM07 | Assignment or Plan Participation Code |
| CLM08 | Benefits Assignment Certification |
| CLM09 | Release of Information Code |
SV1 — Professional Service (837P)
SV1*HC:99213:25*125*UN*1***1:2:3~| Element | Description |
|---|---|
| SV101 | Composite - Procedure Code (HC:CPT:Modifiers) |
| SV102 | Line Item Charge Amount |
| SV103 | Unit Basis (UN=Unit) |
| SV104 | Service Unit Count |
| SV105 | Place of Service |
| SV106 | Not used |
| SV107 | Composite - Diagnosis Code Pointers |
HI — Health Care Information Codes (Diagnosis)
HI*ABK:J0690*ABF:E119*ABF:I10~| Qualifier | Description |
|---|---|
| ABK | ICD-10 Principal Diagnosis |
| ABF | ICD-10 Diagnosis |
| BK | ICD-9 Principal Diagnosis |
| BF | ICD-9 Diagnosis |
835 — Remittance
| Segment | Name | Purpose | Loop |
|---|---|---|---|
| BPR | Financial Information | Payment method, amount | Header |
| TRN | Reassociation Trace Number | Check/EFT number | Header |
| DTM | Date/Time Reference | Production date | Header |
| N1 | Name | Payer/Payee identification | 1000* |
| LX | Transaction Set Line Number | Header grouping | 2000 |
| CLP | Claim Level Payment | Claim adjudication | 2100 |
| CAS | Claim Adjustment Segment | Adjustments, denials | 2100/2110 |
| NM1 | Individual or Organizational Name | Patient, provider | 2100 |
| SVC | Service Payment Information | Line-level payment | 2110 |
| AMT | Monetary Amount | Various amounts | 2100/2110 |
| PLB | Provider Level Balance | Provider adjustments | Trailer |
BPR — Financial Information
BPR*I*1500.00*C*ACH*CTX*01*999999999*DA*1234567890**01*999999999*DA*9876543210*20240120~| Element | Description |
|---|---|
| BPR01 | Transaction Handling Code (I=Remittance Info Only, C=Payment) |
| BPR02 | Total Actual Provider Payment Amount |
| BPR03 | Credit/Debit Flag |
| BPR04 | Payment Method (ACH, CHK, NON) |
| BPR16 | Check Issue/EFT Date |
CLP — Claim Payment
CLP*PATIENT123*1*500.00*400.00*50.00*MA*CLAIM123*11~| Element | Description |
|---|---|
| CLP01 | Patient's Claim Number |
| CLP02 | Claim Status Code |
| CLP03 | Total Claim Charge Amount |
| CLP04 | Total Claim Payment Amount |
| CLP05 | Patient Responsibility Amount |
| CLP06 | Claim Filing Indicator Code |
| CLP07 | Payer's Claim Control Number |
| CLP08 | Facility Code Value |
Claim Status Codes (CLP02):
| Code | Meaning |
|---|---|
| 1 | Processed as Primary |
| 2 | Processed as Secondary |
| 3 | Processed as Tertiary |
| 4 | Denied |
| 19 | Processed as Primary, Forwarded |
| 20 | Processed as Secondary, Forwarded |
| 22 | Reversal of Previous Payment |
CAS — Claim Adjustment Segment
CAS*CO*45*100.00**42*50.00~| Element | Description |
|---|---|
| CAS01 | Claim Adjustment Group Code |
| CAS02 | Adjustment Reason Code |
| CAS03 | Adjustment Amount |
| CAS04 | Adjustment Quantity |
| (Repeats) | Up to 6 adjustments per CAS segment |
Adjustment Group Codes (CAS01):
| Code | Meaning | Patient Responsibility? |
|---|---|---|
| CO | Contractual Obligation | No — write-off |
| CR | Corrections and Reversals | Varies |
| OA | Other Adjustments | Varies |
| PI | Payer Initiated Reduction | No |
| PR | Patient Responsibility | Yes |
270 — Eligibility Inquiry
| Segment | Name | Purpose | Loop |
|---|---|---|---|
| BHT | Beginning of Hierarchical Transaction | Transaction purpose | Header |
| HL | Hierarchical Level | Structure | 2000* |
| NM1 | Individual or Organizational Name | Entity identification | 2100* |
| REF | Reference Identification | IDs, group numbers | 2100* |
| DMG | Demographic Information | DOB, gender | 2100C |
| DTP | Date/Time Reference | Date of service | 2100C |
| EQ | Eligibility or Benefit Inquiry | What's being asked | 2100C |
EQ — Eligibility Inquiry
EQ*30~- EQ01: Service Type Code (see Qualifier Codes for full list)
- EQ02: Composite Medical Procedure (optional)
Common Service Type Codes:
| Code | Description |
|---|---|
| 30 | Health Benefit Plan Coverage |
| 1 | Medical Care |
| 33 | Chiropractic |
| 47 | Hospital |
| 86 | Emergency Services |
271 — Eligibility Response
| Segment | Name | Purpose | Loop |
|---|---|---|---|
| BHT | Beginning of Hierarchical Transaction | Transaction info | Header |
| HL | Hierarchical Level | Structure | 2000* |
| NM1 | Individual or Organizational Name | Entities | 2100* |
| REF | Reference Identification | IDs | 2100* |
| EB | Eligibility or Benefit Information | Coverage details | 2110* |
| HSD | Health Care Services Delivery | Quantity limits | 2110* |
| DTP | Date/Time Reference | Effective dates | 2110* |
| MSG | Message Text | Free-form notes | 2110* |
EB — Eligibility/Benefit Information
The key segment in 271 responses:
EB*1*IND*30*HM*GOLD PLAN~| Element | Description |
|---|---|
| EB01 | Eligibility/Benefit Information Code |
| EB02 | Coverage Level Code (IND, FAM, etc.) |
| EB03 | Service Type Code |
| EB04 | Insurance Type Code |
| EB05 | Plan Coverage Description |
| EB06 | Time Period Qualifier |
| EB07 | Monetary Amount |
| EB08 | Percent |
EB01 Information Codes:
| Code | Meaning |
|---|---|
| 1 | Active Coverage |
| 6 | Inactive |
| I | Non-Covered |
| A | Co-Insurance |
| B | Co-Payment |
| C | Deductible |
| F | Limitations |
| G | Out of Pocket Maximum |
| R | Other or Additional Payor |
Name Segments (NM1)
The NM1 segment identifies entities and appears throughout EDI transactions:
NM1*IL*1*SMITH*JOHN*A***MI*ABC123456~| Element | Description |
|---|---|
| NM101 | Entity Identifier Code (who this is) |
| NM102 | Entity Type Qualifier (1=Person, 2=Organization) |
| NM103 | Last Name or Organization Name |
| NM104 | First Name (persons only) |
| NM105 | Middle Name (persons only) |
| NM106 | Name Prefix |
| NM107 | Name Suffix |
| NM108 | Identification Code Qualifier |
| NM109 | Identification Code |
See Qualifier Codes for complete lists of entity identifiers and ID qualifiers.
Address Segments (N3/N4)
Addresses are split across two segments:
N3 — Street Address
N3*123 MAIN STREET*SUITE 100~- N301: Address Line 1
- N302: Address Line 2
N4 — Geographic Location
N4*ANYTOWN*SC*29601*US~- N401: City Name
- N402: State/Province Code
- N403: Postal Code
- N404: Country Code
Date Segments (DTP)
Date/time information uses consistent qualifiers:
DTP*472*D8*20240115~| Element | Description |
|---|---|
| DTP01 | Date/Time Qualifier |
| DTP02 | Date/Time Format (D8=Date, RD8=Date Range) |
| DTP03 | Date/Time Value |
Common Date Qualifiers (DTP01)
| Code | Description |
|---|---|
| 096 | Discharge Date |
| 232 | Claim Statement Period Start |
| 233 | Claim Statement Period End |
| 291 | Plan Begin |
| 292 | Plan End |
| 304 | Latest Visit/Consultation |
| 314 | Disability Begin |
| 360 | Initial Treatment |
| 435 | Admission |
| 472 | Service |
| 573 | Date Claim Paid |
Date Formats (DTP02)
| Code | Format | Example |
|---|---|---|
| D8 | CCYYMMDD | 20240115 |
| RD8 | CCYYMMDD-CCYYMMDD | 20240115-20240131 |
Reading Segments in EDI Paisan
Using the Tree View
- Expand loops to see contained segments
- Click a segment to see element breakdown
- Element tooltips show qualifier meanings
Using Search
Search by segment ID to find all occurrences:
NM1— Find all name segmentsCAS— Find all adjustmentsEB*1— Find active coverage responses
Segment Colors
EDI Paisan color-codes segments by category:
| Color | Category | Examples |
|---|---|---|
| Blue | Identification | NM1, N1, REF |
| Green | Financial | CLM, SVC, CLP, AMT |
| Orange | Dates | DTP, DTM |
| Purple | Codes | HI, SV1, EB |
| Gray | Envelope | ISA, GS, ST, SE |
Common Issues
Missing Required Elements
If a required element is missing:
NM1*IL*1*SMITH****MI*~ ← Missing first name (NM104)EDI Paisan will show a validation warning.
Invalid Qualifier Codes
Unrecognized qualifiers display with a warning badge. Check Qualifier Codes for valid values.
Trailing Delimiters
Extra delimiters at segment end are allowed but unnecessary:
DTP*472*D8*20240115~ ← Clean
DTP*472*D8*20240115***~ ← Works but wastefulRelated Documentation
- Loop Hierarchy — How segments organize into loops
- Qualifier Codes — Complete code lookup tables
- 837P Professional Claims — 837P segment details
- 835 Remittance — 835 segment details
- Viewing Files — Using the EDI Paisan viewer
