Claire Logo Icon
Claire Logo Text
Medical CodingNov 4, 2026

The CLAIRE Blog

How to code and sequence metastatic cancer

Learn how to code metastatic cancer and sequence primary vs secondary sites under ICD-10-CM Section I.C.2, with worked examples and common mistakes.

Valentina GallegosBA, CPC, CRC
How to code and sequence metastatic cancer

Table of Contents

  1. What you need before you start
    1. Clinical documentation
    2. Guideline references
    3. Code reference tools
  2. How to sequence metastatic cancer codes, step by step
    1. Identify the primary malignancy site
    2. Identify all secondary sites
    3. Determine treatment focus and sequence
  3. Mistakes to avoid
    1. Reversing "metastatic to" and "metastatic from"
    2. Using Z85 when the primary is still active
    3. Coding lymphoma as metastatic and misusing C80.0
  4. A worked example
    1. The clinical scenario
    2. Code assignment and sequencing
    3. Alternative sequencing for the same patient
  5. How sequencing changes when the primary is unknown or eradicated
  6. Coding complexity and when to call a coding specialist
    1. Time estimates by encounter type
    2. When to escalate
  7. How to check it worked
    1. Four-point verification check
  8. Takeaways
  9. Frequently asked questions
    1. When do I code the metastatic site as the principal diagnosis?
    2. What ICD-10-CM code do I use for unknown primary cancer site?
    3. How do I code active metastasis when the primary cancer was removed?
    4. What is the difference between C80.0 and C80.1 in ICD-10-CM?
    5. How do I code chemotherapy encounters for cancer patients?
    6. Is lymphoma coded as metastatic cancer in ICD-10-CM?
  10. Next steps

To code metastatic cancer and sequence the primary vs secondary site under ICD-10-CM, assign a primary malignancy code (C00-C96) for the organ of origin. Assign a secondary neoplasm code (C77-C79) for each documented metastatic site. Sequencing depends on the treatment focus at the current encounter: if treatment targets the primary, list it first; if treatment targets only the secondary site, list that first.

In about 10 minutes of reading, you can apply the four-step decision tree in this guide to any metastatic cancer encounter. You need the patient's clinical documentation and the FY 2027 ICD-10-CM Official Guidelines to work through each case.

What you need before you start

Three categories of information drive every metastatic cancer sequencing decision: clinical documentation, current guidelines, and a reliable code reference. Missing any of these forces a provider query or a coding delay.

Clinical documentation

  • Pathology reports identifying the organ of origin and every site of spread
  • Imaging results confirming metastatic sites
  • Clinical notes stating whether the primary malignancy is active, previously excised, or unknown
  • Treatment notes specifying the focus of the current encounter

Guideline references

Code reference tools

  • A current ICD-10-CM code set, including the 190 new diagnosis codes added in the FY 2027 update
  • CLAIRE's searchable ICD-10-CM code reference integrates code lookup with clinical reasoning explanations, reducing the need to switch between tools

How to sequence metastatic cancer codes, step by step

Sequencing metastatic cancer codes follows a four-step decision tree: identify the primary site, identify all secondary sites, determine the treatment focus, and verify the code set. Each step produces a specific output that feeds the next.

Identify the primary malignancy site

  1. Read pathology, imaging, and clinical notes to find the organ of origin. If documentation says "metastatic from the breast," the breast is the primary site (C50.9-). If it says "metastatic to the lung," the lung is a secondary site (C78.0-). The word "from" marks the primary; the word "to" marks the secondary.
  2. Assign the primary malignancy code from C00-C96 with all required additional characters for laterality and site specificity. If the primary site cannot be determined, assign C80.1 (Malignant (primary) neoplasm, unspecified) per Guideline I.C.2.k.

Identify all secondary sites

  1. List every documented metastatic site. Each site gets its own C77-C79 code: C77.- for lymph nodes, C78.- for respiratory and digestive systems, C79.- for other sites. Each code requires the full number of characters for site specificity.
  2. If two or more noncontiguous tumors are documented and it is unclear whether they represent separate primaries or metastatic spread, query the provider per Guideline I.C.2.i before assigning codes.

Determine treatment focus and sequence

  1. If treatment is directed at the primary site, sequence the primary malignancy code (C00-C96) first, followed by secondary neoplasm codes (C77-C79), per Guideline I.C.2.l.1.
  2. If treatment is directed only at the secondary site, sequence the secondary neoplasm code (C77-C79) first, followed by the primary malignancy code (C00-C96) as an additional diagnosis, per Guideline I.C.2.l.2.
  3. If the encounter is chiefly for chemotherapy, immunotherapy, or antineoplastic radiation administration, sequence Z51.11, Z51.12, or Z51.0 first, followed by the underlying malignancy code(s), per Guideline I.C.2.e.2. For brachytherapy, sequence the malignancy code first instead.
  4. Verify all codes carry their required additional characters and confirm the sequencing matches the documented reason for the encounter. The FY 2027 code set added 190 new diagnosis codes, so confirm site-specific codes reflect the current tabular list.

Mistakes to avoid

These errors stem from specific documentation or guideline misreads that a careful review catches before submission.

Reversing "metastatic to" and "metastatic from"

"Metastatic to the lung" means the lung is a secondary site (C78.0-). "Metastatic from the breast" means the breast is the primary (C50.9-). Reversing these assignments puts the wrong code in the first-listed position and distorts cancer registry data.

Using Z85 when the primary is still active

Z85.- (Personal history of malignant neoplasm) is only for primaries that have been excised or eradicated with no further treatment directed to that site, per Guideline I.C.2.d. If treatment is ongoing, the primary malignancy code (C00-C96) should still be used, per Guideline I.C.2.m.

Coding lymphoma as metastatic and misusing C80.0

  • Lymphoma is not considered metastatic regardless of the number of sites involved, per AHA Coding Clinic. When lymphoma spreads beyond lymph nodes, assign C81-C85 codes with the final character for extranodal and solid organ sites, per Guideline I.C.2.t.
  • C80.0 (Disseminated malignant neoplasm, unspecified) is reserved for advanced metastatic disease with no specified primary or secondary sites, per Guideline I.C.2.j. Specific coding matters for surveillance: inflammatory breast cancer, which accounts for 1%-5% of US breast cancers, now has dedicated codes (C50.A-) for tracking.

A worked example

This example, sourced from AAPC's neoplasm coding guide, walks through a breast cancer patient with bone metastasis to show how the treatment-focus rule drives sequencing.

The clinical scenario

  • A patient with breast cancer has bone metastasis.
  • The encounter is for treatment of the bone metastasis only.
  • The primary breast cancer is still present but is not the focus of this visit.
  • The documentation clearly states the treatment target.

Code assignment and sequencing

  • Primary site: C50.9- (Malignant neoplasm of breast, unspecified).
  • Secondary site: C79.5- (Secondary malignant neoplasm of bone).
  • Because treatment targets the bone metastasis only, sequence the bone code (C79.5-) first and the breast code (C50.9-) as the additional diagnosis, per Guideline I.C.2.l.2.
  • Two codes are assigned: one first-listed, one additional.

Alternative sequencing for the same patient

  • ICD-10-CM Guideline I.C.2.e.2 states to assign Z51.0, Z51.11, or Z51.12 first when the encounter is chiefly for antineoplastic radiation, chemotherapy, or immunotherapy, followed by the underlying malignancy code.
  • If the encounter were for chemotherapy, sequence Z51.11 first, then C50.9- and C79.5- as additional diagnoses, per Guideline I.C.2.e.2.
  • Accurate sequencing matters for cancer data tracking: per AAPC's neoplasm coding guide, inflammatory breast cancer alone contributes to about 7% of US breast cancer mortalities, and now has specific codes (C50.A0, C50.A1, C50.A2) to improve surveillance.

How sequencing changes when the primary is unknown or eradicated

Six common clinical situations each call for a different sequencing pattern. The table below maps each scenario to its first-listed and additional codes per the ICD-10-CM Official Guidelines, FY 2027.

ScenarioFirst-listed codeAdditional codes
Treatment at primary sitePrimary malignancy (C00-C96)Secondary neoplasm codes (C77-C79)
Treatment at secondary site onlySecondary neoplasm (C77-C79)Primary malignancy (C00-C96)
Primary previously excised, active metastasisSecondary neoplasm (C77-C79)Z85.- (history of primary)
Chemo, immunotherapy, or radiation encounterZ51.11 / Z51.12 / Z51.0Underlying malignancy code(s) (except for brachytherapy)
Pathologic fracture is the focusM84.5-Neoplasm code
Anemia in neoplastic disease is the focusNeoplasm codeD63.0

Source: ICD-10-CM Official Guidelines for Coding and Reporting, FY 2027 (CMS/NCHS). The FY 2027 update revised 4 existing codes.

Coding complexity and when to call a coding specialist

Time estimates by encounter type

Complex cases with multiple metastatic sites or unclear treatment focus require additional review and possible provider queries. The FY 2027 update deleted 30 codes.

When to escalate

When documentation does not specify whether a tumor is primary or metastatic, or when the treatment focus is unclear, query the provider. A well-constructed query adds time to coding turnaround but prevents claim denials. Call a coding specialist when the primary site is unknown, when multiple noncontiguous tumors raise a primary-vs-metastatic question, or when lymphoma involves solid organs.

How to check it worked

Run a four-point verification check on every completed code sequence before claim submission.

Four-point verification check

  • Confirm the first-listed code matches the documented reason for the encounter. If treatment was directed at the bone metastasis, the secondary neoplasm code should be first, not the primary.
  • Check that every active malignancy site has its own code and that no active site is omitted from the claim.
  • Verify Z85.- is used only when the primary is eradicated with no further treatment directed to that site. If treatment is ongoing, the primary malignancy code (C00-C96) should still be used.
  • Run the final code assignment through a secondary review or use CLAIRE's AI coding assistant to confirm the sequencing logic before submission. The FY 2027 guidelines apply from October 1, 2026 through September 30, 2027.

Takeaways

  • "Metastatic from" marks the primary site; "metastatic to" marks the secondary site. Reversing these is a common coding error.
  • Use Z85.- only when the primary has been excised or eradicated with no further treatment directed to that site.
  • Lymphoma is never coded as metastatic. Use C81-C85 with the final character for extranodal and solid organ sites.
  • C80.0 is for disseminated disease with no specified sites; C80.1 is for unknown primary only. Use specific site codes whenever they are available.

Frequently asked questions

When do I code the metastatic site as the principal diagnosis?

When treatment is directed only at the secondary (metastatic) site, even if the primary malignancy is still present. Per Guideline I.C.2.l.2, the metastatic site code (C77-C79) is sequenced first, followed by the primary malignancy code (C00-C96) as an additional diagnosis. If treatment targets both sites, sequence the primary malignancy first.

What ICD-10-CM code do I use for unknown primary cancer site?

Assign C80.1 (Malignant (primary) neoplasm, unspecified) when no determination can be made as to the primary site. Code any known secondary sites using C77-C79 as additional codes. Per Guideline I.C.2.k, C80.1 should rarely be used in the inpatient setting. Query the provider for specificity before resorting to this code.

How do I code active metastasis when the primary cancer was removed?

Code the active secondary malignant neoplasm (C77-C79) as principal or first-listed, plus a Z85.- code for the former primary site. Per Guideline I.C.2.m, Z85.0 through Z85.85 should only be assigned for the former site of a primary malignancy, not a secondary site. Z85.89 may be used for former sites of either primary or secondary malignancy.

What is the difference between C80.0 and C80.1 in ICD-10-CM?

C80.0 (Disseminated malignant neoplasm, unspecified) is for advanced metastatic disease where no primary or secondary sites are specified, per Guideline I.C.2.j. C80.1 (Malignant (primary) neoplasm, unspecified) equates to cancer, unspecified, and is used only when the primary site cannot be determined, per Guideline I.C.2.k. Neither should be used when specific site codes are available.

How do I code chemotherapy encounters for cancer patients?

When chemotherapy, immunotherapy, or antineoplastic radiation administration is the reason for the encounter, assign the appropriate Z51.- code as first-listed. Use Z51.11 for chemotherapy, Z51.12 for immunotherapy, and Z51.0 for antineoplastic radiation. Follow with the underlying malignancy code(s) as secondary diagnoses, per Guideline I.C.2.a. For brachytherapy, sequence the malignancy code first instead.

Is lymphoma coded as metastatic cancer in ICD-10-CM?

No. Lymphoma is not considered metastatic regardless of the number of sites involved, per AHA Coding Clinic. When lymphoid malignancies spread beyond lymph nodes, assign C81-C85 codes with the appropriate final character for extranodal and solid organ sites. Do not use a secondary neoplasm code, per Guideline I.C.2.t.

Next steps

Once your code sequence is assigned, verify it against the treatment-focus rule: the first-listed code should match the documented reason for the encounter. Confirm every code carries its required additional characters. Try CLAIRE on your next metastatic cancer encounter to see the sequencing logic checked in real time.

Category: Medical CodingPublished Nov 4, 2026

Related Posts

Start your free trial of CLAIRE medical coding assistant

Experience Clinical Clarity Today

Join medical coding professionals who trust CLAIRE for accurate, explained guidance. Start your free trial - no credit card required. No EMR integration needed.

The AI Medical Coding Assistant,

Built for Real-World Clinical Workflows

4860 Telephone Rd, Ste 103 #101 Ventura, CA 93003

(805) 500-2777

Claire Logo Icon
Claire Logo Text

© 2026 CLAIRE IT AI. All rights reserved.