Skip to main content

Z87.821 ICD-10-CM Code: Personal history of retained foreign body fully removed

Billing Status: YES. This is a valid, specific, and billable ICD-10-CM reference.

Coding at a Glance

Inpatient Payment Groups (MS-DRG)

Potential MS-DRG participation — not a DRG assignment.

MS-DRGs this diagnosis helps define, as principal or secondary, per the CMS ICD-10-CM/PCS MS-DRG Definitions Manual v43, Appendix B.

  • MS-DRG 951 — OTHER FACTORS INFLUENCING HEALTH STATUS (MDC 23)

A diagnosis appearing in a group's logic does not by itself determine the DRG assigned to a stay; the grouper uses the full claim.

Coding instructions

Official Tabular Instructional Notes: the inclusion, exclusion and sequencing notes published for Z87.821 in the official ICD-10-CM tabular list, quoted as published.

Notes without a marker are published on Z87.821 itself; “inherited from” names the category or block whose note applies here.

Excludes2 — Not Included Here

Conditions not covered by this code, but which may be reported alongside it when both are present.

Source: inherited from Z87.8

Code First

Underlying conditions that must be sequenced before this code.

  • any follow-up examination after treatment (Z09)

Source: inherited from Z87

Code Also

Additional codes that may be required to fully describe the encounter.

  • any follow-up examination (Z08-Z09)

Source: inherited from Z77-Z99

Coder workflow for Z87.821

MedCoder structured workflow — derived from this code’s own official record

Before you code Z87.821

  1. Confirm the reason for the encounter this Z code records: a personal or family history — a condition no longer present or present in a relative — never a current condition. Check whether the code may be reported as first-listed or principal — some Z codes are limited to one position — and do not report a history or status code for a condition documented as current. Z code categories and their reporting positions (Guidelines I.C.21.c.4, I.C.21.c.15).

    Guide: History codes (Z codes) →

Choose the right path

  1. Is the underlying (etiologic) condition the Code First note names documented?
    Yes → Sequence the underlying condition first, then Z87.821.
    No → Continue; do not add an underlying condition the record does not document.

    ReviewZ09

Consider Z87.821. Then review the Code Also note, and confirm the code is valid for the date of service in the Verify section.

Documentation check

The provider’s diagnostic statement
Codes are assigned from the provider’s documented diagnosis, not from clinical criteria, test values or a medication list (Guidelines I.A.19).
The underlying (etiologic) condition
Named in the Code First note; sequenced before this code when documented (Guidelines I.A.13).
The reason for the encounter
Whether the code records the encounter’s purpose, a status, or a history — and whether it may be first-listed (Guidelines I.C.21.c).

Official instructions as workflow

  • Excludes2 — not part of Z87.821(1 note)

    Coding workflow: The conditions named in this note are not included in Z87.821. When the record documents both, both may be reported; the note is a boundary, not a prohibition.

    CompareZ91.5

    See the official tabular notes · Guidelines I.A.12.b

  • Code First — sequencing check(1 note)

    Coding workflow: Check whether the underlying or etiologic condition the note names is documented. When it is, sequence it before Z87.821. Do not add an underlying condition the record does not document.

    ReviewZ09

    See the official tabular notes · Guidelines I.A.13

  • Code Also — related condition(1 note)

    Coding workflow: Review the related condition when both are documented and the instruction applies. A Code Also note does not fix sequencing; the order follows the circumstances of the encounter.

    See the official tabular notes · Guidelines I.A.17

Coding decision scenarios

Pattern scenarios for this code’s structure — decision rules, not clinical cases

Documentation: The underlying condition the Code First note names is documented alongside this condition.

Coding question: How are the two sequenced?

Path: Review the Code First note.

Reason: The underlying condition is sequenced first and the manifestation follows (Guidelines I.A.13).

ReviewZ09

Every row is derived from this code’s own record — its title, tabular notes, 7th-character family and same-category siblings — with fixed MedCoder wording; nothing is inferred about a patient. The official notes and guideline text are in the sections each row links to, and they control.

Code Overview

Personal history of retained foreign body fully removed is a billable ICD-10-CM diagnosis code (Z87.821).

MedCoder summary Summary composed by MedCoder from this code's official ICD-10-CM record. The tabular instructional notes themselves appear verbatim below.

Indexed Clinical Terms (1)

Official source data — entries quoted as published, in the Index’s own lookup phrasing

Clinical term phrases from the official ICD-10-CM Index to Diseases and Injuries that map to this code. These are alphabetic-index entries shown as the Index writes them — lookup phrasing, not necessarily the wording of a final diagnosis.

Official Coding Guidelines

Official source data — quoted verbatim from the CMS/NCHS Official Guidelines

Official source data — quoted verbatim from the CMS/NCHS Official Guidelines

Verbatim excerpts from the ICD-10-CM Official Guidelines for Coding and Reporting (CMS/NCHS) that govern this code.

Chapter 21: Factors influencing health status and contact with health services (Z00-Z99)

The history Z code categories are: Z80 Family history of primary malignant neoplasm Z81 Family history of mental and behavioral disorders Z82 Family history of certain disabilities and chronic diseases (leading to disablement) Z83 Family history of other specific disorders Z84 Family history of other conditions Z85 Personal history of malignant neoplasm Z86 Personal history of certain other diseases Z87 Personal history of other diseases and conditions Z91.4- Personal history of psychological trauma, not elsewhere classified Z91.5- Personal history of self- harm Z91.81 History of falling Z91.82 Personal history of military deployment Z91.85 Personal history of military service Z92 Personal history of medical treatment Except: Z92.0, Personal history of contraception Except: Z92.82, Status post administration of tPA (rtPA) in a different facility within the last 24 hours prior to admission to a current facility

Decision Points

The directives on this code's own record, as a pre-claim checklist.

  1. Sequencing: 1 Code First instruction — the underlying condition is sequenced before this code when present. See the Code First notes
  2. 1 Code Also note — a second code may apply; the guidelines leave its sequencing to the circumstances of the encounter. See the Code Also notes
  3. 1 Excludes2 entry — those conditions are not part of this code and may be reported additionally when documented. See the Excludes2 notes

Checklist rows are derived from this code's own official directives; the wording of each check is MedCoder editorial. The official notes themselves are in the sections each row links to.

Verify Before Coding

  • Principal-diagnosis restriction. The Medicare Code Editor lists this code as unacceptable as a principal diagnosis: it describes a circumstance influencing health status rather than a current illness or injury being treated. It is valid as a secondary diagnosis.

From the code registry, the Medicare Code Editor, and the MS-DRG Definitions Manual. Check it against a full claim in Claim Check.

Relationships & Classification

MedCoder structured relationships — computed from published CMS and AHRQ datasets

Other codes that name Z87.821 or its code family, from the CMS ICD-10-CM tabular instructional notes. Tabular-note edges are stored at the code family level that carries each note.

Referenced by 2 Excludes2 notes: Z77 — Other contact with and (suspected) exposures hazardous to health, Z91 — Personal risk factors, not elsewhere classified (via Z87.82.-).

These codes’ tabular lists name this diagnosis as distinct — both may be reported when both are documented.

Referenced by 17 Use Additional Code instructions across 2 chapters: T51 — Toxic effect of alcohol, T51-T65 — Toxic effects of substances chiefly nonmedicinal as to source (T51-T65), T52 — Toxic effect of organic solvents, T53 — Toxic effect of halogen derivatives of aliphatic and aromatic hydrocarbons, T54 — Toxic effect of corrosive substances, T55 — Toxic effect of soaps and detergents, T56 — Toxic effect of metals, T57 — Toxic effect of other inorganic substances, T58 — Toxic effect of carbon monoxide, T59 — Toxic effect of other gases, fumes and vapors, T60 — Toxic effect of pesticides, T61 — Toxic effect of noxious substances eaten as seafood, T62 — Toxic effect of other noxious substances eaten as food, T63 — Toxic effect of contact with venomous animals and plants, T64 — Toxic effect of aflatoxin and other mycotoxin food contaminants, T65 — Toxic effect of other and unspecified substances, Z09 — Encounter for follow-up examination after completed treatment for conditions other than malignant neoplasm (via Z87.-).

These codes instruct coders to additionally report this code when it applies.

MS-DRG Grouper Relationships (FY2026)

Potential MS-DRG participation — not a DRG assignment.

Not on the CMS CC/MCC list — as a secondary diagnosis this code does not change MS-DRG severity.

Named in the grouper logic of 1 MS-DRG: DRG 951 (MDC 23).

From the CMS MS-DRG Definitions Manual (Appendices B and C). Actual DRG assignment depends on the complete claim.

Clinical classification (AHRQ CCSR):FAC030 — Personal history of other disease (default).

Clinical Classifications Software Refined (CCSR) for ICD-10-CM Diagnoses. Healthcare Cost and Utilization Project (HCUP), Agency for Healthcare Research and Quality.

Related Codes

Principal diagnosis restriction (Medicare Code Editor)

Not acceptable as a principal diagnosis on an inpatient claim.

Same clinical category (CCSR)

AHRQ's Clinical Classifications Software groups these diagnoses under the same clinical category (Personal history of other disease).

Z87.76 — Personal history of (corrected) congenital malformations of integument, limbs and musculoskeletal system, Z87.760 — Personal history of (corrected) congenital diaphragmatic hernia or other congenital diaphragm malformations, Z87.761 — Personal history of (corrected) gastroschisis, Z87.762 — Personal history of (corrected) prune belly malformation, Z87.763 — Personal history of other (corrected) congenital abdominal wall malformations, Z87.768 — Personal history of other specified (corrected) congenital malformations of integument, limbs and musculoskeletal system, Z87.790 — Personal history of (corrected) congenital malformations of face and neck, Z87.798 — Personal history of other (corrected) congenital malformations, Z87.81 — Personal history of (healed) traumatic fracture, Z87.820 — Personal history of traumatic brain injury, Z87.828 — Personal history of other (healed) physical injury and trauma, Z87.890 — Personal history of sex reassignment, Z87.892 — Personal history of anaphylaxis, Z87.898 — Personal history of other specified conditions, Z91.410 — Personal history of adult physical and sexual abuse, Z91.411 — Personal history of adult psychological abuse, Z91.412 — Personal history of adult neglect, Z91.413 — Personal history of adult financial abuse, Z91.414 — Personal history of adult intimate partner abuse, Z91.419 — Personal history of unspecified adult abuse, +100 more

Same Index main term, other category

The ICD-10-CM Index to Diseases and Injuries files this code under the main term “History”; these codes share that main term but sit in a different category of the Tabular List.

Z86.51 — Personal history of combat and operational stress reaction (personal, combat and operational stress reaction), Z86.59 — Personal history of other mental and behavioral disorders (personal, mental disorder), Z86.61 — Personal history of infections of the central nervous system (personal, meningitis), Z86.69 — Personal history of other diseases of the nervous system and sense organs (personal, disease or disorder, eye), Z86.711 — Personal history of pulmonary embolism (personal, embolism, pulmonary), Z86.718 — Personal history of other venous thrombosis and embolism (personal, embolism), Z86.72 — Personal history of thrombophlebitis (personal, thrombophlebitis), Z86.73 — Personal history of transient ischemic attack (TIA), and cerebral infarction without residual deficits (personal, stroke without residual deficits), Z86.74 — Personal history of sudden cardiac arrest (personal, sudden cardiac arrest), Z86.79 — Personal history of other diseases of the circulatory system (personal, disease or disorder, circulatory system), Z88.0 — Allergy status to penicillin (personal, allergy, penicillin), Z88.1 — Allergy status to other antibiotic agents (personal, allergy, antibiotic agent NEC), Z88.2 — Allergy status to sulfonamides (personal, allergy, sulfonamides), Z88.3 — Allergy status to other anti-infective agents (personal, allergy, anti-infective agent NEC), Z88.4 — Allergy status to anesthetic agent (personal, allergy, anesthetic), Z88.5 — Allergy status to narcotic agent (personal, allergy, narcotic agent NEC), Z88.6 — Allergy status to analgesic agent (personal, allergy, analgesic agent NEC), Z88.7 — Allergy status to serum and vaccine (personal, allergy, serum), Z88.8 — Allergy status to other drugs, medicaments and biological substances (personal, allergy, medicinal agents, specified NEC), Z88.9 — Allergy status to unspecified drugs, medicaments and biological substances (personal, allergy), +218 more

Contextual Map

Every relationship of Z87.821 in one view: hierarchy, official tabular instructions in both directions, clinical classification, risk adjustment, MS-DRG participation, index terms and change history — each edge carrying the CMS source it derives from.

Run Z87.821 with these 10 related codes in Claim Check

Hierarchy

Referenced by Excludes2 notes

Referenced by Use Additional Code instructions (17)

Clinical classification (CCSR)

MS-DRG Grouper

MDC crossing

  • MDC 23 — Factors Influencing Health Status and Other Contacts with Health Services[MDC crossing]: “Factors Influencing Health Status and Other Contacts with Health Services — the grouper's crossing between diagnoses and procedures: a principal diagnosis sets the MDC, and same-MDC procedures move the stay to its surgical DRGs. 1,235 same-MDC procedures group here; browse them on the MDC page.”— CMS MS-DRG Definitions Manual · FY2026

Index entries

  • History, personal (of), retained foreign body fully removed[Index term]— CMS ICD-10-CM Index to Diseases and Injuries · icd10cm-fy2026

Nearest codes (40)

Change history

  • FY2016 — In the code set at ICD-10-CM adoption [Change history]— CMS release files (code change ledger) · icd10cm-fy2016

Sources for this page

Codes, titles, notes, index terms and mappings on this page are transcribed from the datasets below. Relationships MedCoder computed and text MedCoder wrote are labelled where they appear.

Code, title, tabular notes and index terms Official source data
CMS/CDC ICD-10-CM FY2026 tabular list, index and tables, effective October 1, 2025 Release, file and checksum · Publisher’s page
Coding guidelines Official source data
ICD-10-CM Official Guidelines for Coding and Reporting (FY2026), quoted by section Release, file and checksum · Publisher’s page
Claim edits Official source data
CMS Definitions of Medicare Code Edits — v43.1 (April 2026) Release, file and checksum · Publisher’s page
Inpatient payment groups Official source data
CMS MS-DRG Definitions Manual (incl. Appendix B diagnosis index, Appendix C CC/MCC list, Appendix E procedure index) and IPPS Final Rule tables — v43 Release, file and checksum · Publisher’s page
Change history and date-of-service validity Official source data
CMS ICD-10-CM release addenda, ingested release by release into the change ledger Release, file and checksum · Publisher’s page
Comparisons, relationships and the contextual map MedCoder structured relationship
Computed by MedCoder from the tabular notes and tables above; every derived relationship is marked as derived where it appears
Summary and FAQ answers MedCoder explanation
Written by MedCoder to explain the sources above: drafted with AI assistance, checked by a person against the release files, and labelled as MedCoder text where it appears. Not official text.

Labels on this page: Official source data · MedCoder structured relationship · MedCoder explanation. How to read the labels · All data sources and release dates

Change history

  • FY2016 — October 1, 2015
    In the code set at ICD-10-CM adoption
    Personal history of retained foreign body fully removed

No changes since FY2016 — additions, deletions, description changes and billable-status changes are tracked through FY2027 (effective October 1, 2026), and none are recorded for this code. Note changes are tracked from FY2027 only.

Nearest Codes in This Family

Official ICD-10-CM classifications closest to Z87.821 in its code family, with their registry titles.

View all codes in the Z87 family