Skip to content
Contact Us

HL7 DG1 Segment: Diagnosis

The HL7 DG1 segment (Diagnosis) carries diagnosis codes associated with a patient encounter. It repeats for multiple diagnoses and appears in ADT, ORM, and DFT messages. DG1 is critical for billing, clinical decision support, quality reporting, and public health surveillance.

DG1 21 fields
Seq Name Type Opt Description
DG1-1 Set ID SI R Sequence number (1, 2, 3...)
DG1-2 Diagnosis Coding Method ID O Coding system version indicator
DG1-3 Diagnosis Code CE O ICD-10-CM code and description
DG1-4 Diagnosis Description ST O Text description (if DG1-3 is empty)
DG1-5 Diagnosis Date/Time TS O When the diagnosis was established
DG1-6 Diagnosis Type IS R A (Admitting), W (Working), F (Final)
DG1-7 Major Diagnostic Category CE O MDC for DRG grouping
DG1-8 Diagnostic Related Group CE O DRG code
DG1-9 DRG Approval Indicator ID O Y/N — DRG approved
DG1-10 DRG Grouper Review Code IS O Grouper review outcome
DG1-11 Outlier Type CE O Day outlier, cost outlier
DG1-12 Outlier Days NM O Number of outlier days
DG1-13 Outlier Cost CP O Outlier cost amount
DG1-14 Grouper Version and Type ST O DRG grouper software version
DG1-15 Diagnosis Priority ID O 1 = Primary, 2+ = Secondary
DG1-16 Diagnosing Clinician XCN O Physician who made the diagnosis
DG1-17 Diagnosis Classification IS O Classification category
DG1-18 Confidential Indicator ID O Y if diagnosis is confidential
DG1-19 Attestation Date/Time TS O When diagnosis was attested
DG1-20 Diagnosis Identifier EI O Unique diagnosis instance ID
DG1-21 Diagnosis Action Code ID O A (Add), D (Delete), U (Update)
DG1-1 R
Set ID SI

Sequence number (1, 2, 3...)

DG1-2 O
Diagnosis Coding Method ID

Coding system version indicator

DG1-3 O
Diagnosis Code CE

ICD-10-CM code and description

CE data type: code^description^coding system (e.g., R50.9^Fever, unspecified^I10). I10=ICD-10-CM, I9=ICD-9-CM (legacy), SCT=SNOMED CT.

DG1-4 O
Diagnosis Description ST

Text description (if DG1-3 is empty)

DG1-5 O
Diagnosis Date/Time TS

When the diagnosis was established

DG1-6 R
Diagnosis Type IS

A (Admitting), W (Working), F (Final)

A=Admitting (at admission), W=Working (evolves during encounter), F=Final (at discharge). The final diagnosis in ADT^A03 is billing-critical.

DG1-7 O
Major Diagnostic Category CE

MDC for DRG grouping

DG1-8 O
Diagnostic Related Group CE

DRG code

DG1-9 O
DRG Approval Indicator ID

Y/N — DRG approved

DG1-10 O
DRG Grouper Review Code IS

Grouper review outcome

DG1-11 O
Outlier Type CE

Day outlier, cost outlier

DG1-12 O
Outlier Days NM

Number of outlier days

DG1-13 O
Outlier Cost CP

Outlier cost amount

DG1-14 O
Grouper Version and Type ST

DRG grouper software version

DG1-15 O
Diagnosis Priority ID

1 = Primary, 2+ = Secondary

1=Primary/Principal (drives DRG and reimbursement), 2=Secondary (comorbidity, may increase DRG weight), 3+=Additional documentation.

DG1-16 O
Diagnosing Clinician XCN

Physician who made the diagnosis

DG1-17 O
Diagnosis Classification IS

Classification category

DG1-18 O
Confidential Indicator ID

Y if diagnosis is confidential

DG1-19 O
Attestation Date/Time TS

When diagnosis was attested

DG1-20 O
Diagnosis Identifier EI

Unique diagnosis instance ID

DG1-21 O
Diagnosis Action Code ID

A (Add), D (Delete), U (Update)

R = Required, O = Optional, C = Conditional, W = Withdrawn (backward compatibility only)

DG1-3 uses the CE (Coded Element) data type to carry the diagnosis code:

DG1|1||R50.9^Fever, unspecified^I10||20260301|A
ComponentValueMeaning
CE.1R50.9ICD-10-CM code
CE.2Fever, unspecifiedCode description
CE.3I10Coding system (ICD-10)
IDSystemDescription
I10ICD-10-CMDiagnosis codes (US) — required for billing
I10PICD-10-PCSProcedure codes (inpatient only)
I9ICD-9-CMLegacy system (pre-October 2015)
SCTSNOMED CTClinical terminology (used in some clinical contexts)
CodeTypeDescription
AAdmittingReason for admission — set at time of admission, may not be the final diagnosis
WWorkingCurrent working diagnosis — updated during the encounter as clinical picture evolves
FFinalFinal confirmed diagnosis — established at discharge or after workup completion
Admission: DG1 with Type A (Admitting) → "Chest pain, unspecified" (R07.9)
During stay: DG1 with Type W (Working) → "Acute myocardial infarction" (I21.9)
Discharge: DG1 with Type F (Final) → "STEMI of LAD" (I21.01)

ADT^A08 (Update Patient) messages carry updated DG1 segments as the diagnosis evolves. The final diagnosis in the discharge ADT^A03 is the billing-critical diagnosis.

PriorityMeaningBilling Impact
1Primary/PrincipalDrives DRG assignment and primary payer reimbursement
2SecondaryComorbidity/complication — may increase DRG weight
3+AdditionalAdditional documentation, may affect severity of illness

The primary diagnosis (DG1-15 = 1) must be the condition chiefly responsible for the admission or encounter. Incorrect primary diagnosis assignment leads to DRG miscoding and potential compliance issues.

Patients typically have multiple diagnoses. DG1 segments are ordered by clinical significance:

DG1|1||I21.01^STEMI of LAD^I10||20260301|F|||||||||||1
DG1|2||I10^Essential hypertension^I10||20260301|F|||||||||||2
DG1|3||E11.9^Type 2 DM^I10||20260301|F|||||||||||3
DG1|4||Z79.4^Long-term insulin use^I10||20260301|F|||||||||||4

DG1-1 (Set ID) indicates segment order; DG1-15 (Priority) indicates clinical/billing priority. These are typically the same but can differ when a system needs to reorder diagnoses without renumbering.

ContextPurposeTiming
ADT messagesClinical documentation — reflects evolving clinical pictureAdmission through discharge
DFT messagesBilling justification — links charges to diagnosesPost-encounter charge posting
ORM messagesMedical necessity — justifies why a test was orderedAt order placement

In DFT messages, DG1-3 directly impacts claim adjudication. The diagnosis must support medical necessity for the procedure code in FT1. Mismatched diagnosis-procedure pairs are a leading cause of claim denials.

When integrating systems that use different coding standards:

  • ICD-10-CM ↔ SNOMED CT: GEM (General Equivalence Mappings) provide crosswalks, but mapping is imprecise — clinical review may be required
  • ICD-9 → ICD-10: Legacy systems may still send ICD-9 codes. Integration engines should map forward to ICD-10 for downstream billing systems
  • Local codes: Some clinical systems use internal shorthand codes that must be mapped to ICD-10 before reaching the billing system

CMS regulations require accurate diagnosis coding for Medicare/Medicaid claims:

  • Present on Admission (POA): Inpatient diagnoses must indicate if the condition was present at admission
  • Principal diagnosis: Must reflect the condition that, after study, occasioned the admission
  • Specificity: Code to the highest level of specificity available (e.g., I21.01 instead of I21.0)