2027 ICD-10-CM Diagnosis Code Z87.8902Personal history of medical gender transition

ICD-10-CM Codes›Z00–Z99›Z77-Z99›Z87

ICD-10-CM Z87.8902
CMSSource: CMS FY 2027 ICD-10-CM dataset · Effective Oct 1, 2026 – Sep 30, 2027

Z87.8902 is a billable ICD-10-CM diagnosis code for personal history of medical gender transition. It is valid on HIPAA claims for fiscal year 2027 (October 1, 2026 through September 30, 2027) and groups to MS-DRG 887. The code is not accepted as a principal diagnosis by the Medicare Code Editor and exempt from POA reporting.

Code Identity

ICD-10-CM Code
Z87.8902
Billable Status
Yes — Valid for Submission
Code Describes
Personal history of medical gender transition
Short Description
Personal history of medical gender transition
Same as the full description in the CMS dataset.
Parent Code
Personal history of sex reassignment

Code Classification

ChapterZ00–Z99Factors influencing health status and contact with health services
SectionZ77-Z99Persons with potential health hazards related to family and personal history and certain conditions influencing health status
CategoryZ87Personal history of other diseases and conditions
This CodeZ87.8902Personal history of medical gender transition

Code EditsBilling

Medicare Code Editor checks that affect claim validity for Z87.8902.

There are selected codes that describe a circumstance which influences an individual's health status but not a current illness or injury, or codes that are not specific manifestations but may be due to an underlying cause. These codes are considered unacceptable as a principal diagnosis.

Present on Admission (POA)Billing

Instructional NotesGuidance

Instructions from the official ICD-10-CM Tabular List that apply to Z87.8902: its own notes plus those printed at Z87.8, Z87, block Z77-Z99, and Chapter 21. A note printed at a category, block or chapter applies to every code under it.

Applicable To

Conditions this code is used for: synonyms of the title or, for "other specified" codes, the conditions assigned to it. The list is not exhaustive.

  • Personal history of pharmacological (hormonal) gender transition

Excludes2

Not included here: the excluded condition is not part of this code, but a patient may have both, so both codes may be reported.

From Z87.8 Personal history of other specified conditions applies to 13 codes
  • personal history of self harm (Z91.5-)

Code First

The underlying condition named in the note is sequenced before this code.

From Z87 Personal history of other diseases and conditions applies to 54 codes
  • any follow-up examination after treatment (Z09)

Code Also

A second code may be needed to fully describe the condition; the note gives no sequencing direction.

From Block Z77-Z99 Persons with potential health hazards related to family and personal history and certain conditions influencing health status applies to 567 codes
  • any follow-up examination (Z08-Z09)

Notes

General instructions on how these codes are used.

From Chapter 21 (Z00-Z99) Factors influencing health status and contact with health services applies to 1,425 codes
  • Z codes represent reasons for encounters. A corresponding procedure code must accompany a Z code if a procedure is performed. Categories Z00-Z99 are provided for occasions when circumstances other than a disease, injury or external cause classifiable to categories A00-Y89 are recorded as 'diagnoses' or 'problems'. This can arise in two main ways:
  • (a) When a person who may or may not be sick encounters the health services for some specific purpose, such as to receive limited care or service for a current condition, to donate an organ or tissue, to receive prophylactic vaccination (immunization), or to discuss a problem which is in itself not a disease or injury.
  • (b) When some circumstance or problem is present which influences the person's health status but is not in itself a current illness or injury.

Source: CMS ICD-10-CM Tabular List. How to read instructional notes.

Referenced in Other NotesGuidance

Instructional notes printed at other codes that name Z87.8902, its category, or a range that includes it.

Excludes1 1

These codes carry an Excludes1 note naming Z87.8902: they are not reported together with it, unless the two conditions are unrelated.

  • Z90.7 Acquired absence of genital organ(s)
    personal history of sex reassignment (Z87.890-) names Z87.890-, which includes this code

Excludes2 1

These codes carry an Excludes2 note naming Z87.8902: its condition is not part of those codes, and both may be reported when the patient has both.

  • Z78 Other specified health status
    sex reassignment status (Z87.890-) names Z87.890-, which includes this code

Use Additional Code 2

These codes say to use an additional code from the note, and Z87.8902 is one of the codes named.

  • F64.1 Dual role transvestism
    code to identify sex reassignment status (Z87.890-) names Z87.890-, which includes this code
  • Z09 Encounter for follow-up examination after completed treatment for conditions other than malignant neoplasm
    code to identify any applicable history of disease code (Z86.-, Z87.-) names Z87.-, which includes this code

Code Also 1

These codes say Z87.8902 may also be needed to fully describe the condition. The note gives no sequencing direction.

  • Z87.893 Personal history of gender detransition
    personal history of sex reassignment (Z87.890-) names Z87.890-, which includes this code

Code History & ChangesHistory

New Code Z87.8902 was added to the ICD-10-CM code set for FY 2027, effective October 1, 2026.

Replacement Z87.8902 replaces the following previously assigned code(s):

  • Z87.890 - Personal history of sex reassignment
FY 2027AddedAdded to the ICD-10-CM code setEffective October 1, 2026.
FY 2027CurrentRevised in the current code setEffective October 1, 2026 through September 30, 2027.

Questions About Z87.8902Overview

What is the ICD-10 code for personal history of medical gender transition?

The ICD-10-CM code for personal history of medical gender transition is Z87.8902 (sometimes written as Z878902). It is billable on HIPAA-covered claims from October 1, 2026 through September 30, 2027.

Is Z87.8902 (Personal history of sex reassignment) a billable code?

Yes. This is a billable ICD-10-CM code, specific enough to report personal history of medical gender transition on HIPAA-covered claims from October 1, 2026 through September 30, 2027.

What MS-DRG does Z87.8902 group to?

On inpatient claims, personal history of medical gender transition maps to MS-DRG 887 (other Mental Disorder Diagnoses), which carries a relative weight of 1.1154. Higher weights mean higher Medicare reimbursement.

Can Z87.8902 be a principal diagnosis?

No. The Medicare Code Editor rejects this code as a principal diagnosis because personal history of medical gender transition describes a circumstance that influences health status rather than a current illness. Report it as a secondary diagnosis.

Is Z87.8902 exempt from POA reporting?

Yes. CMS lists this code among those exempt from present on admission reporting, so hospitals do not assign a POA indicator for personal history of medical gender transition on inpatient claims. The code appears in the Persons with potential health hazards related to family and personal history and certain conditions influencing health status (Z77-Z99) range of the CMS exempt list.