ICD-10-CM

What Are Z-Codes and When Do You Use Them?

📅 March 2026 📖 12 min read ✍️ Clear CPC Team
What Are Z-Codes and When Do You Use Them?

Z-codes are ICD-10-CM codes from Chapter 21 — Factors Influencing Health Status and Contact with Health Services. They cover encounters that are not driven by an active disease or injury: screenings, vaccinations, follow-up visits, personal and family history, and many other situations where a patient interacts with the healthcare system for reasons other than treating an illness. Z-codes range from Z00 through Z99 and are among the most frequently used codes in outpatient settings.

For the CPC exam, Z-codes are tested regularly because they require judgment about sequencing and first-listed diagnosis selection. Knowing when a Z-code is appropriate — and when it is not — is a skill that separates competent coders from those who default to disease codes for every encounter. If you are still learning the basics of ICD-10-CM and code structure, review those guides first.

What Are Z-Codes?

Z-codes represent reasons for encounters that go beyond active diseases. They capture situations like:

  • A healthy patient coming in for an annual physical
  • A patient receiving a flu vaccination
  • A cancer patient in remission coming for surveillance
  • A patient with a family history of colon cancer being screened
  • A patient receiving aftercare following surgery
  • A patient who is a carrier of an infectious disease

Unlike codes in Chapters 1–18 that describe active conditions, Z-codes describe the circumstances of the encounter. They answer the question “why is this patient here today?” when the answer is not “because they are sick.”

Z-codes can be used as the first-listed (primary) diagnosis or as secondary codes depending on the circumstances of the encounter. Some Z-codes can only be used as first-listed; others can only be secondary. Understanding these restrictions is critical for the CPC exam.

The Six Main Categories of Z-Codes

1. Contact and Exposure (Z20–Z29)

These codes indicate that a patient has been exposed to or has come into contact with a communicable disease but does not currently have the disease. They are used when the encounter is specifically for evaluation after a known exposure.

Examples:
– Z20.822 — Contact with and exposure to COVID-19
– Z20.1 — Contact with and exposure to tuberculosis
– Z20.6 — Contact with and exposure to HIV

These codes are first-listed when the encounter is specifically for the exposure concern. They are secondary when the patient presents for another reason but the exposure is relevant to management.

2. Inoculations and Vaccinations (Z23)

Code Z23 is used when a patient encounters the healthcare system to receive a prophylactic vaccination. Z23 is the first-listed diagnosis when the sole reason for the visit is the vaccination. When a vaccination is given during a visit for another purpose (such as a well-child visit), Z23 is an additional code.

When reporting vaccinations, you also assign the appropriate CPT procedure code for the administration and the vaccine product code. The Z-code captures the reason for the encounter, not the procedure itself.

3. Status Codes (Z14–Z15, Z66–Z68, Z78–Z79, Z89–Z99)

Status codes indicate that a patient has a condition or situation that influences their care on an ongoing basis. These are typically secondary codes that provide context.

Common status codes:

Code Description Common Use
Z79.4 Long-term use of insulin Reported with type 2 diabetes when insulin is used (not with type 1, which inherently requires insulin)
Z79.01 Long-term use of anticoagulants Reported when the patient is on warfarin, heparin, or similar medications
Z89.411 Acquired absence of right great toe Reported when the amputation status affects current care
Z95.1 Presence of aortocoronary bypass graft Relevant when a patient with bypass history presents for cardiac care
Z96.641 Presence of right artificial hip joint Reported when the prosthetic status is relevant to the encounter
Z68.35 BMI 35.0–35.9, adult Used as a secondary code with an obesity or overweight diagnosis

Important distinction: Status codes describe a current ongoing state. They are different from history codes, which describe conditions that no longer exist.

4. History Codes (Z80–Z87, Z91–Z92)

History codes indicate a patient’s past medical conditions or family history that may be relevant to current care. There are two types:

Personal history (Z85–Z87, Z91–Z92): The patient previously had a condition that has been resolved. For example, Z85.3 (Personal history of malignant neoplasm of breast) is used for a patient who had breast cancer but is now in remission or cured. The condition is no longer active, but the history affects screening schedules and clinical decisions.

Family history (Z80–Z84): A blood relative has or had a condition that increases the patient’s risk. For example, Z80.0 (Family history of malignant neoplasm of digestive organs) is relevant when a patient with a family history of colon cancer presents for a screening colonoscopy.

History codes are typically secondary codes, but they can be first-listed when the history is the reason for the encounter — such as a surveillance visit specifically because of a personal history of cancer.

5. Screening Codes (Z11–Z13, Z36)

Screening codes are used when a test is performed to detect a condition in a patient who has no signs or symptoms. The encounter is specifically for screening purposes.

Key screening rules:

  • If the screening identifies a condition, code both the screening Z-code and the confirmed condition found
  • The screening Z-code can be first-listed when screening is the sole reason for the encounter
  • If a patient presents with symptoms and a test is performed to diagnose the cause, it is a diagnostic test, not a screening — do not use a screening Z-code
  • Screening codes should not be used when a patient presents with signs and symptoms related to the condition being tested for

Example: A 50-year-old patient with no symptoms comes in for a routine screening colonoscopy. The first-listed diagnosis is Z12.11 (Encounter for screening for malignant neoplasm of colon). If the colonoscopy finds a polyp, you also code the polyp.

6. Observation and Evaluation (Z03–Z05)

These codes are used when a patient is being observed or evaluated for a suspected condition that is ultimately ruled out. They are primarily used in the outpatient setting when a condition is suspected but not confirmed.

Example: Z03.71 (Encounter for suspected problem with amniotic cavity and membrane ruled out) — used when a pregnant patient is evaluated for a suspected membrane problem that testing rules out.

When Z-Codes Can Be First-Listed

Not all Z-codes can serve as the first-listed diagnosis. The ICD-10-CM guidelines specify which Z-codes may be used as the first-listed or principal diagnosis and which are secondary only.

Z-codes that can be first-listed:

  • Encounters for screenings (Z11–Z13)
  • Encounters for vaccinations (Z23)
  • Encounters for aftercare (Z42–Z51)
  • Newborn and infant encounters (Z00.1, Z38.-)
  • Encounters for observation and evaluation (Z03–Z05)
  • Encounters for specific procedures not performed (Z53.-)
  • Some encounters for follow-up examinations (Z08–Z09)

Z-codes that are always secondary:

  • BMI codes (Z68.-)
  • Long-term drug use codes (Z79.-)
  • Status codes indicating prosthetics, transplants, or device presence
  • Allergy status codes (Z88.-)
  • Blood type (Z67.-)

The CPC exam frequently tests this distinction. A common question pattern presents an encounter and asks which diagnosis should be first-listed — the Z-code or the active condition. Understanding the Z-code sequencing rules from the ICD-10-CM sequencing guidelines is essential.

Most Commonly Tested Z-Codes on the CPC Exam

Based on exam patterns, these Z-code scenarios appear most frequently:

Z79.4 — Long-term use of insulin. Tested in diabetes coding scenarios. Must be reported as an additional code for type 2 diabetics on insulin. Never used with type 1 diabetes (insulin use is inherent to type 1).

Z23 — Encounter for immunization. Tested in sequencing questions — when vaccination is the sole reason for the visit, Z23 is first-listed. When vaccination occurs during a visit for another purpose, Z23 is secondary.

Z85.x — Personal history of malignant neoplasm. Tested in encounters for cancer surveillance. When a patient with a history of cancer returns for a follow-up exam, the personal history code is first-listed.

Z12.x — Screening codes. Tested in distinguishing screening from diagnostic encounters. If the patient has no symptoms, it is a screening. If the patient has symptoms, it is a diagnostic workup — no screening Z-code.

Z87.x — Personal history of other diseases. Used when a resolved past condition influences current care decisions but is no longer active.

Common Z-Code Mistakes

Using a disease code when a Z-code is appropriate. When a patient’s cancer is in complete remission and they return for surveillance, the correct code is the personal history Z-code — not the active cancer code.

Using a screening code for a diagnostic test. If the patient has symptoms, the test is diagnostic, not screening. The symptom code is first-listed, not the screening Z-code.

Using Z79.4 with type 1 diabetes. Type 1 diabetes inherently requires insulin. The long-term insulin use code is only added for type 2 diabetes patients on insulin.

Sequencing Z-codes incorrectly. Some Z-codes must be first-listed; others can only be secondary. Review the guideline restrictions before assigning.

For a printable quick-reference, see the CPC Exam Cheat Sheet.

🧪 Test Yourself: Z-Codes in ICD-10-CM

5 quick questions drawn from this guide. Click an answer to check it — explanations appear as you go.

1. Z-codes are used to report:

Z-codes capture reasons for encounters that are not diseases/injuries — screenings, history, status, aftercare, etc.

2. A Z-code CAN be the first-listed diagnosis when:

Many Z-codes may be first-listed when they represent the main reason for the visit (e.g., Z12.11 screening colonoscopy).

3. “Personal history of” Z-codes (Z85–Z87) indicate:

Personal history Z-codes show a resolved condition that could influence current care or monitoring.

4. An encounter for chemotherapy administration uses which Z-code first?

Z51.11 (encounter for antineoplastic chemotherapy) is first-listed for a chemo-only visit, then the neoplasm code.

5. A common Z-code mistake is:

Aftercare Z-codes do not apply during active injury treatment — those use the acute code with 7th character “A.”

Frequently Asked Questions

What are Z-codes in ICD-10-CM?

Z-codes are ICD-10-CM codes from Chapter 21 (Z00–Z99) that capture reasons for healthcare encounters other than active diseases or injuries. They cover screenings, vaccinations, personal and family history, status conditions, aftercare, and other factors that influence health status or contact with the healthcare system.

Can a Z-code be the first-listed diagnosis?

Some Z-codes can be first-listed and some cannot. Z-codes for screenings, vaccinations, aftercare, observation, and certain follow-up encounters can be first-listed when those are the primary reason for the visit. Z-codes for BMI, long-term drug use, device status, and blood type are always secondary codes. Check the ICD-10-CM guidelines for the specific Z-code category.

What is the difference between a status code and a history code?

A status code describes a current ongoing condition or state — such as the presence of a prosthetic joint, long-term medication use, or an organ transplant status. A history code describes a condition that previously existed but has been resolved — such as personal history of cancer that is now in remission. Status codes describe what is; history codes describe what was.

When do you use Z79.4 (long-term use of insulin)?

Use Z79.4 as a secondary code for patients with type 2 diabetes mellitus who are on insulin. Do not use it for type 1 diabetes, because insulin use is inherent to type 1. This code indicates that the patient requires ongoing insulin therapy and is relevant to medication management decisions.

What is the difference between a screening and a diagnostic test for Z-code purposes?

A screening is performed on a patient who has no signs or symptoms of the condition — it is looking for something that has not been detected yet. A diagnostic test is performed on a patient who has signs, symptoms, or a known condition. Screening encounters use Z-codes (Z11–Z13); diagnostic encounters use the sign, symptom, or condition code as the reason for the encounter.