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.
Z85, Z86, Z87 — the three blocks explained
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 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 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:
- Is the condition still present or active at this encounter? → Use the active diagnosis code.
- 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).
- Is the condition fully resolved with no active treatment? → Use the Z85/Z86/Z87 history code.
- 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.
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:
- The specific past condition (e.g., "history of breast cancer," "prior stroke," "former smoker with history of nicotine dependence")
- That the condition is no longer active (explicitly or implied by context)
- 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)
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 →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 →