Z codes in medical billing are ICD-10-CM Chapter 21 codes in the range Z00 through Z99 that describe encounters and circumstances affecting patient care that are not classifiable as a disease or injury. They are used as the primary diagnosis for preventive visits, screenings, immunizations, and aftercare, and as secondary diagnoses to document personal history, long-term drug use, family history, and social circumstances. Incorrect Z code use produces claim denials. 

Per the ICD-10-CM Official Guidelines for Coding and Reporting FY 2026, adherence to Z code sequencing and selection guidelines is required under HIPAA for all healthcare settings.

What Are Z Codes in Medical Billing?

Z codes are ICD-10-CM Chapter 21 codes covering factors influencing health status and contact with health services. They span the range Z00 through Z99 and are organized into categories that describe 6 types of encounters and circumstances:

  • Encounters for examination and screening: including preventive visits (Z00), routine eye exams (Z01), and cancer screenings (Z12).
  • Immunization encounters: Z23 for encounters for immunization, applicable when the sole reason for the visit is vaccine administration.
  • Health status and personal history: Z86 and Z87 for personal history of conditions no longer active, and Z82 through Z84 for family history relevant to the patient’s current care.
  • Long-term medication use: Z79 codes for patients on long-term anticoagulants (Z79.01), insulin (Z79.4), oral hypoglycemics (Z79.84), or other chronic medications.
  • Aftercare and follow-up: Z08 and Z09 for follow-up after completed treatment, and Z43 through Z48 for aftercare involving devices, surgical care, or wound management.
  • Social determinants of health (SDOH): Z55 through Z65 for social and economic circumstances including housing instability, food insecurity, and educational barriers.

When Can a Z Code Be Used as the Primary Diagnosis?

A Z code is the appropriate first-listed diagnosis in 4 encounter types per the ICD-10-CM FY 2026 Official Guidelines, Chapter 21, Section C.21:

  1. Preventive and routine examination visits: billed under Z00 (general examination without complaint), Z01 (other special examinations), or Z02 (administrative examination). Medicare Annual Wellness Visits use Z00.00 (without abnormal findings) or Z00.01 (with abnormal findings).
  2. Screening encounters: Z12 codes cover screening for malignant neoplasms, including Z12.11 (colonoscopy) and Z12.31 (mammography). A screening Z code is the primary diagnosis only when the patient is asymptomatic with no known related diagnosis. If a positive finding results, the confirmed diagnosis is added as an additional code.
  3. Immunization-only encounters: Z23 is the primary diagnosis when the sole purpose of the visit is vaccine administration. If the patient also receives an E/M for an unrelated reason during the same visit, Z23 becomes a secondary code.
  4. Aftercare encounters: Z43 (attention to artificial openings), Z48 (surgical aftercare), and Z09 (follow-up after completed treatment) are primary diagnoses when no active disease requiring treatment is present.

When Are Z Codes Used as Secondary Diagnosis Codes?

Z codes function as secondary diagnoses when a patient’s history, medication use, status, or social circumstance is relevant but is not the primary reason for the encounter. The 5 most common secondary Z code categories are:

  • Personal history codes (Z86, Z87): used when a resolved condition is clinically relevant to current care. Z87.891 (personal history of nicotine dependence) supports claims where smoking history affects treatment. Personal history Z codes must not be used when the condition is still active.
  • Family history codes (Z82-Z84): used when a family member’s condition increases the patient’s risk and influences current screening or management. Z82.49 (family history of ischemic heart disease) supports medical necessity for preventive cardiology services.
  • Long-term drug use codes (Z79): added when a chronic medication is relevant to the care provided. Z79.01 (long-term anticoagulant use) and Z79.4 (long-term insulin use) are the most common. Per FY 2026 guidelines, Z79 codes apply to medications expected to continue indefinitely, not short-term prescriptions.
  • Status codes (Z93-Z99): describe current health status from a prior procedure. Z95.1 (aortocoronary bypass graft present) and Z96.641-Z96.649 (artificial hip joint present) inform care decisions without describing an active disease.
  • SDOH codes (Z55-Z65): added when social or economic circumstances are documented and relevant to the encounter. Per FY 2026 ICD-10-CM Guidelines Section C.21.c.1, SDOH codes may be documented by any clinician including nurses, social workers, and dieticians.

What Are SDOH Z Codes and Why Do They Matter in 2026?

SDOH Z codes are ICD-10-CM codes in the Z55 through Z65 range that document social, economic, and environmental factors that affect a patient’s health and access to care. CMS tracks SDOH Z code utilization across Medicare claims as part of its health equity initiatives. Per the CMS SDOH Z Code Resource Guide, 9 SDOH Z code categories cover education, employment, housing, economic circumstances, social environment, psychosocial circumstances, health care access, and contact with the legal system.

The 6 most commonly billed SDOH Z codes in physician billing are:

  •       Z59.00: homelessness, unspecified.
  •       Z59.10: inadequate housing, unspecified.
  •       Z59.41: food insecurity.
  •       Z65.8: other specified problems related to psychosocial circumstances.

SDOH Z codes are never primary diagnoses on physician claims when an active disease or injury is the reason for the encounter. They are secondary codes that provide context. Payers, including CMS, use SDOH Z code data to adjust quality metrics, identify high-risk populations for care coordination programs, and direct resources under value-based payment models. Per the FY 2026 ICD-10-CM Official Guidelines, SDOH Z codes may be documented by any clinician involved in the patient’s care, including nurses, social workers, and dieticians, provided the documentation is in the record.

What Are the 5 Most Common Z Code Billing Errors?

  • Using a Z code as the primary diagnosis when a definitive diagnosis exists: when a confirmed disease or injury is the reason for the encounter, a Z code cannot be the first-listed code. If a patient presents with a palpable breast mass and a malignancy is confirmed, the malignancy code is primary and the screening Z code is removed. Screening Z codes apply only to asymptomatic patients.
  • Incorrect Z code sequencing: secondary Z codes must follow the primary diagnosis, not precede it. A claim where Z79.01 (long-term anticoagulant use) appears before the active cardiac diagnosis is sequenced incorrectly, which can produce a medical necessity mismatch or wrong DRG assignment.
  • Using a personal history Z code when the condition is still active: Z87 codes apply only to resolved conditions. If the patient’s diabetes is still being managed, E11.xx applies, not Z87.39. Personal history codes are for conditions that are fully resolved with no ongoing treatment.
  • Assigning SDOH Z codes without documentation: an SDOH Z code cannot be assigned based on coder inference or verbal patient statements. The social determinant must be documented in the medical record by a clinician. Nurse, social worker, or dietician documentation satisfies this requirement per FY 2026 guidelines.
  • Billing a screening Z code for a diagnostic encounter: Z12 codes apply only to asymptomatic patients with no known related condition. If the patient has symptoms or a prior related diagnosis, the encounter is diagnostic and the appropriate symptom or confirmed diagnosis code is primary. Payers audit screening Z codes and deny claims where the documented encounter was diagnostic.

Conclusion

Z codes in medical billing serve 2 primary functions: they identify encounters not driven by an active disease or injury, and they add context where history, medication use, or social circumstances affect care. Correct Z code use requires 3 rules: use Z codes as primary diagnoses only for the 4 appropriate encounter types, use them as secondary codes when clinically relevant, and never substitute a Z code for a definitive diagnosis that exists. The 5 most common Z code errors are all correctable through coder training and pre-submission review.

Reference the ICD-10-CM FY 2026 Official Coding Guidelines, Chapter 21, and the CMS SDOH Z Code Resource Guide for sequencing rules and SDOH documentation requirements.

Consult a certified medical coder (CPC or CCS) for practice-specific Z code selection and sequencing decisions.

FAQs

What Are Z Codes in Medical Billing?

Z codes are ICD-10-CM Chapter 21 diagnosis codes in the range Z00 through Z99 that describe the reason for an encounter or a health-related circumstance when no active disease or injury is the primary diagnosis, including preventive visits, screenings, immunizations, aftercare, personal history, long-term drug use, and social determinants of health.

Can a Z Code Be the Only Diagnosis Code on a Claim?

A Z code can be the only diagnosis on a claim when the entire encounter is defined by the Z code circumstance, such as a preventive visit (Z00.00), an immunization-only visit (Z23), or an asymptomatic screening (Z12), with no active disease or injury treated.

What Are SDOH Z Codes and Who Can Document Them?

SDOH Z codes are ICD-10-CM codes Z55 through Z65 documenting social, economic, and environmental factors affecting health, and per FY 2026 ICD-10-CM Guidelines may be documented by any clinician involved in the patient’s care, not solely the treating physician.

What Is the Difference Between a Screening Z Code and a Diagnostic Code?

A screening Z code such as Z12.31 applies only when the patient is asymptomatic and has no prior diagnosis of the condition being screened, while a diagnostic code applies when the patient has signs, symptoms, or a known condition related to the test being performed, and using a screening Z code for a diagnostic encounter produces a denial.

An Easy Guide for
Providers

Get in Touch