Reference·DG1 Segment·DG1-3
HL7 v2 Reference

DG1-3 in HL7 v2: A Field Guide to Diagnosis Code - ICD

Jul 27, 2026 · 4 min read
← DG1-1 DG1-4 →

DG1-3 is where most of the clinical and financial risk in the DG1 segment concentrates, because it's the field claims systems, quality measures, and clinical decision support all key off — and it's a composite field, not a plain string.

Quick answer

DG1-3 carries the actual diagnosis code using a coded element (CE) structure: the code itself, a text description, and the coding system it came from, separated by carets. A typical value looks like E11.9^Type 2 diabetes mellitus without complications^I10, where I10 identifies ICD-10 as the source vocabulary.

What this field contains

Sub-component 1
Identifier — the ICD code itself, e.g. E11.9 or I10
Sub-component 2
Text — the human-readable description tied to that code
Sub-component 3
Coding System — which vocabulary the code comes from, such as I10 for ICD-10-CM or I9 for ICD-9-CM

Example

Synthetic example Generated by Synthibase
DG1|1||E11.9^Type 2 diabetes mellitus without complications^I10|Type 2 diabetes mellitus without complications|202607250830|F||||||||1

The diagnosis code component broken into identifier, text, and coding system: E11.9^Type 2 diabetes mellitus without complications^I10.

Where this trips people up

A surprising number of interfaces only validate that DG1-3 is non-empty, not that the coding system sub-component matches an ICD-10 pattern or that the identifier is a code that actually exists in that vocabulary. That lets through values where someone pasted an ICD-9 code into an ICD-10 field, or left the coding system sub-component blank so the receiving system has to guess. It's worth building test cases around mismatched coding systems, missing sub-components, and codes with decimal points in unexpected places, since ICD-10 formatting rules trip up parsers that were only ever tested against tidy examples.

HL7 v2 DG1 Explained: Structure, Fields, and Common Mistakes
How to Reduce Claim Denials Through Better Pre-Submission Testing
Healthcare API Testing Guide: FHIR and X12
Stop shipping bad ICD codes to production
Synthibase generates DG1 test data with valid, correctly structured ICD-10 codes — plus deliberately broken variants — so you can verify your validation logic actually catches what it's supposed to.
Start free trial →
This page is written independently by Synthibase for testing and informational purposes. It is not an official publication of HL7 International or X12/Washington Publishing Company, and is not a substitute for reviewing the official standard or your trading partner's companion guide. See our Terms of Service for full legal terms.