What personal history codes are — and what they are not

Personal history codes in ICD-10-CM (Z85–Z87) document conditions a patient has had in the past that are now resolved, but that a provider considers relevant to the current encounter. They tell the story of what a patient has been through — a prior cancer diagnosis, a past stroke, a resolved infection — without implying the condition is still active.

The critical word in all of this is resolved. If the condition is still present, still under treatment, or still influencing the patient's health in an active way, a personal history code is not appropriate. The active diagnosis code applies instead.

The one-sentence rule: If the provider would treat or monitor this condition at today's visit, use an active code. If the provider is simply noting it happened in the past, use a history code.

Z85, Z86, Z87 — the three blocks explained

Z85
Personal history of malignant neoplasm
Cancer that has been fully treated with no evidence of recurrence
Cancer history codes — Z85.0 through Z85.9

Z85 covers all personal history of malignant neoplasm (cancer). The subcodes specify the original site — breast (Z85.3), colon (Z85.038), lung (Z85.118), prostate (Z85.46), and so on. Use Z85 codes only after all treatment is complete and there is no evidence of disease. If a patient is still receiving chemotherapy, radiation, or immunotherapy — even as adjuvant therapy after surgery — the active C-code still applies, not Z85.

Z86
Personal history of certain other diseases
Prior infections, mental health conditions, blood disorders, and more
Includes: hepatitis C, COVID-19, substance use, benign neoplasms

Z86 covers a broad range of resolved conditions outside of cancer. Commonly used subcodes include Z86.19 (personal history of other infectious and parasitic diseases — used for history of hepatitis C, history of C. diff, etc.), Z86.39 (personal history of other endocrine, nutritional and metabolic diseases — covers prediabetes that has resolved), and Z86.69 (personal history of other diseases of the nervous system).

Z87
Personal history of other diseases and conditions
The largest block — covers most other resolved conditions
Includes: stroke, nicotine dependence, surgeries, injuries, pregnancy complications

Z87 is the largest and most commonly used block in daily coding. It covers everything from prior stroke (Z86.73 — actually in Z86, not Z87, for cerebral infarction history) to personal history of nicotine dependence (Z87.891), prior fractures, prior pregnancy complications, prior surgeries, and much more.

The most important decision: active code vs history code

This is where almost all personal history coding errors originate. The decision tree is straightforward when you apply it consistently:

  1. Is the condition still present or active at this encounter? → Use the active diagnosis code.
  2. Is the condition in remission but still being monitored or treated? → Use the active code with remission specifier if available (e.g., F17.213 for nicotine dependence in remission, not Z87.891).
  3. Is the condition fully resolved with no active treatment? → Use the Z85/Z86/Z87 history code.
  4. Does the provider not mention the condition at all? → Do not code it. You cannot assign a history code based on your review of the chart alone.
⚠️ Do not assign history codes based solely on medication lists. If a patient takes lisinopril, that suggests hypertension — but hypertension is an active condition, not a history code. If you see a medication and wonder whether an underlying condition should be coded, query the provider rather than assuming the condition is historical.

Most searched personal history codes with real examples

History of stroke — Z86.73

When a patient has had a prior cerebrovascular accident (stroke or TIA) with no remaining neurological deficits, use Z86.73 (Personal history of transient ischemic attack and cerebral infarction without residual deficits). This applies when the provider documents the stroke as historical and the patient has fully recovered.

If the patient has residual deficits from the stroke — weakness, aphasia, cognitive changes — use the I69.x sequela codes instead. Those are not history codes; they are active codes for the ongoing effects of a prior stroke.

History of cancer — Z85.x

When a patient has completed cancer treatment with no evidence of recurrence, the provider's note should clearly document "no evidence of disease" or "history of cancer — resolved." Use the appropriate Z85 subcode based on the original cancer site. The most common: Z85.3 (breast), Z85.9 (unspecified), Z85.46 (prostate), Z85.038 (colon).

The Z08 follow-up code is often coded alongside Z85 at surveillance visits — Z08 is the primary reason for the encounter (follow-up exam after cancer treatment), and Z85.x adds the specific cancer type as context.

History of hepatitis C — Z86.19

A patient who had hepatitis C, completed antiviral treatment, and achieved sustained virologic response (SVR — effectively cured) is coded Z86.19 (Personal history of other infectious and parasitic diseases). The hepatitis C is no longer active. If the patient still has active hepatitis C, use B18.2 (Chronic viral hepatitis C).

History of C. diff — Z86.19

Same code as hepatitis C history — Z86.19. Clostridioides difficile is an infectious and parasitic disease. Once resolved and no longer active, Z86.19 applies when the provider documents the history as clinically relevant.

History of nicotine dependence — Z87.891

Z87.891 applies to former tobacco users who had a documented nicotine dependence and have since quit. Two important distinctions:

  • If the patient currently smokes and is addicted, use F17.x (active nicotine dependence) — not Z87.891.
  • If the patient quit but was never clinically diagnosed with dependence (just a casual user), Z72.0 (tobacco use) is not appropriate either since they've quit. Query the provider if documentation is unclear.

Z87.891 is always a secondary code — it cannot be the principal diagnosis. It also cannot be used to support billing for tobacco cessation counseling on its own.

History of migraines — Z87.39

When a patient previously suffered from migraines but the provider documents them as resolved or historical — Z87.39 (Personal history of other diseases of the nervous system and sense organs). If migraines are still active, use G43.x codes instead.

History of appendicitis / appendectomy — Z87.19

Z87.19 (Personal history of other digestive system disorders) covers history of appendicitis when relevant. The surgical history of appendectomy itself is coded Z98.19 (Other specified postprocedural states) when clinically relevant.

Documentation requirements

Personal history codes require provider documentation. You cannot assign them based solely on your own review of old records, medication lists, or prior encounter notes — the treating provider must reference the history as relevant to the current encounter.

Specifically, the provider should document:

  1. The specific past condition (e.g., "history of breast cancer," "prior stroke," "former smoker with history of nicotine dependence")
  2. That the condition is no longer active (explicitly or implied by context)
  3. That it is relevant to today's visit (it should appear in the assessment, problem list, or history section of the current note — not just buried in old records)
When to query the provider: If old records show a prior diagnosis but the current note does not mention it, query the provider before adding a history code. The provider is the one who determines clinical relevance — not the coder.

Sequencing — where history codes go on the claim

Personal history codes are almost always secondary codes. The primary reason for the encounter — the active diagnosis or the chief complaint — sequences first. History codes add clinical context.

The one exception: Z08 (encounter for follow-up examination after completed treatment for malignant neoplasm) can be sequenced as the principal diagnosis at a surveillance visit, with the relevant Z85 code listed as an additional code to specify the cancer type.

Z85 codes include a "Code First" note for follow-up examinations — which means Z08 should precede Z85 at those encounters, not the other way around.

Common coding mistakes

Mistake 1 — Using a history code when the condition is still active

A patient on active chemotherapy for breast cancer is not a history-of-breast-cancer patient yet. A patient with controlled hypertension still has hypertension — I10, not a history code. The condition being well-managed does not make it historical.

Mistake 2 — Using Z87.891 for a patient who still smokes

Z87.891 is specifically for former users. Current smokers with dependence use F17.x. Current users without documented dependence are coded Z72.0 if they are still actively using. Z87.891 applies only after they have quit.

Mistake 3 — Assigning history codes without provider documentation

Coding a history of stroke because you saw it in a prior-year record — without the current provider mentioning it — is a documentation and compliance issue. The current provider must establish the relevance of any history code you assign.

Mistake 4 — Missing Z85 when cancer surveillance is the reason for the visit

At a surveillance mammogram after breast cancer treatment, coders sometimes code only the screening code and miss Z85.3. The Z85 history code adds specificity, supports medical necessity, and gives the claim the full clinical picture. Use Z08 as principal and add Z85.x.

Mistake 5 — Confusing personal history (Z85-Z87) with family history (Z80-Z84)

Family history codes (Z80-Z84) are for conditions a blood relative has had — not the patient. Personal history codes (Z85-Z87) are for the patient's own past conditions. These are in the same chapter but serve completely different purposes and are never interchangeable.

Look up related codes

Search all 98,186 ICD-10-CM codes instantly — free

Search ICDwise →
Recommended resource

Master Z-code and history code documentation

AAPC offers comprehensive coding courses and the CPC certification — the standard credential for outpatient professional coders. Z-codes and history codes appear regularly on the CPC exam and in real-world audits.

Explore AAPC Coding Courses →

Frequently asked questions

What is the ICD-10 code for personal history of a condition?
Personal history codes are in three blocks: Z85 (personal history of malignant neoplasm/cancer), Z86 (personal history of certain other diseases including infections and mental health conditions), and Z87 (personal history of other diseases and conditions, the largest block). These codes apply when a condition has resolved and is no longer active. Source: CMS/NCHS FY2026 ICD-10-CM, effective October 1, 2025.
What is the ICD-10 code for history of stroke?
Z86.73 (Personal history of transient ischemic attack and cerebral infarction without residual deficits) is used when a patient had a prior stroke that fully resolved. If the patient still has neurological deficits from the stroke — such as weakness, aphasia, or cognitive changes — use I69.x sequela codes instead. Deficits from stroke are not coded as personal history; they are active ongoing conditions.
What is the ICD-10 code for personal history of cancer?
Personal history of cancer uses Z85 category codes, with the specific subcode depending on the original cancer site. Examples: Z85.3 (breast cancer history), Z85.46 (prostate cancer history), Z85.038 (colon cancer history), Z85.9 (unspecified). Z85 codes apply only when all treatment is complete and there is no evidence of disease. Active cancer still under treatment uses the appropriate C-code.
What is the difference between Z85, Z86, and Z87?
Z85 covers personal history of malignant neoplasm (cancer) only. Z86 covers personal history of certain specified diseases — including infectious diseases (hepatitis C, C. diff), mental and behavioral disorders, blood disorders, and benign neoplasms. Z87 covers personal history of all other conditions — including prior stroke, nicotine dependence, prior surgeries, prior fractures, prior pregnancy complications, and much more. Z87 is the largest and most frequently used of the three blocks.
Can personal history codes be used as the principal diagnosis?
Generally no — personal history codes are secondary codes that add context to the primary reason for the visit. The exception is certain surveillance encounters: at a post-cancer-treatment follow-up visit, Z08 (encounter for follow-up examination after completed treatment for malignant neoplasm) may be the principal diagnosis, with the Z85 history code listed as an additional code. Do not sequence Z85 itself as the principal diagnosis at those visits — use Z08 first.
What is the difference between personal history codes (Z85-Z87) and family history codes (Z80-Z84)?
Personal history codes (Z85-Z87) document conditions the patient themselves has had in the past. Family history codes (Z80-Z84) document conditions that a patient's blood relative has had. These are never interchangeable. A patient with a personal history of breast cancer uses Z85.3. A patient whose mother had breast cancer (but the patient has not) uses Z80.3 (Family history of malignant neoplasm of breast).
Reference only — not coding or clinical advice. This guide is for general educational purposes. Always verify codes against the current official CMS/NCHS ICD-10-CM files and your organization's compliance guidance before clinical or claims use. Full disclaimer →