A patient walks in with no burning, no urgency, no fever. Her chart notes three treated bladder infections over the past year. Nothing is active today. Which code applies? This is where the history of UTI ICD-10 question starts, and it trips up more coders than the complexity of the code suggests, because there is only one code to reach for: Z87.440, personal history of urinary (tract) infections.
The single-code answer hides several judgment calls. When does a past infection qualify as history rather than a current problem? Can Z87.440 stand on its own on a claim? How do recurrent infections fit, when ICD-10-CM never created a code that says “recurrent UTI”? The rules are specific, and getting them wrong produces denied claims and audit flags. What follows is a working guide for providers, billers, and coding students who need the code applied correctly the first time.
What Z87.440 is and what it covers
Z87.440 carries the official descriptor personal history of urinary (tract) infections. It sits in Chapter 21 of ICD-10-CM (Factors influencing health status and contact with health services), under the Z87 block for personal history of other diseases and conditions, nested inside Z87.44, personal history of diseases of the urinary system.
The code took effect on October 1, 2015, the day ICD-10-CM replaced ICD-9-CM across HIPAA-covered transactions. Its ICD-9 predecessor was V13.02. According to the annual ICD-10-CM updates published by CMS and the National Center for Health Statistics, Z87.440 has not been revised in any fiscal year since, including the FY 2026 update effective October 1, 2025. It is a billable, specific code, valid for submission on its own terms.
One detail matters more than it appears. The Alphabetic Index entry reads “History, personal (of), urinary (recurrent) (tract) infection(s),” and it points to Z87.440. The word “recurrent” appears there as a nonessential modifier, shown in parentheses. That single placement decides a lot of downstream coding, and it is the reason there is no separate history-of-recurrent-UTI code to look for.
The approximate synonyms attached to Z87.440 in the tabular list confirm the breadth:
- History of chronic urinary tract infection
- History of febrile urinary tract infection
- History of recurrent urinary tract infection
- History of urinary tract infection
Chronic, febrile, recurrent, plain: all four fold into the same code once the infection is genuinely in the past. Z87.440 is also exempt from present-on-admission reporting for inpatient stays, and it groups to MS-DRG 951, Other factors influencing health status.
When to use the history of UTI ICD-10 code
The governing rule is short and easy to misread. In the ICD-10-CM Official Guidelines for Coding and Reporting, Section I.C.21.c.4, CMS defines a personal history code this way: it explains a patient’s past medical condition that no longer exists and is not receiving any treatment, but that has the potential for recurrence and therefore may require continued monitoring.
Read that phrase carefully, because three conditions all have to be true. The infection is resolved. No treatment is currently directed at it. And the past pattern still has clinical relevance to how the patient is watched or managed going forward.
A patient seen for a routine gynecologic exam with a documented past bladder infection and no current symptoms fits Z87.440 cleanly. So does a woman referred to urology after a run of infections that have since cleared, where the referral itself exists because of that history. The same guidelines note that history Z codes may be reported at any encounter, regardless of the reason for the visit, provided the history is affecting care. That flexibility is real, and it is also where overcoding creeps in.
The code does not fit when the patient still has an infection. It does not fit for a UTI the provider is actively treating. And it does not fit simply because a nurse copied “hx UTI” into a template. More on that documentation trap below.
History of UTI versus active UTI: Z87.440 versus N39.0
The cleanest way to separate the two is a single question. Is there an infection right now?
If yes, and the provider records only “UTI” without naming a site, the active code is N39.0, urinary tract infection, site not specified. If the site is documented, a more specific code takes over. N39.0 carries an Excludes1 note that blocks it whenever the record identifies a site, which sends the coder to cystitis, pyelonephritis, or urethritis codes instead.
Clinical situation | ICD-10 code | Notes |
Active UTI, no site documented | N39.0 | Default for an unspecified active infection |
Active bladder infection, acute | N30.00 / N30.01 | Without / with hematuria |
Active chronic cystitis | N30.20 / N30.21 | Without / with hematuria |
Active kidney infection | N10 (acute) / N11.0 or N11.9 (chronic) | Pyelonephritis and chronic tubulo-interstitial nephritis |
Past UTI, resolved, no current infection | Z87.440 | Personal history only |
UTI in pregnancy | O23.- series | Overrides N30 / N39 codes |
Catheter-associated UTI | T83.511A plus infection code | Complication sequencing applies |
A common exam question and a common real-world question overlap here: can history of UTI and active UTI be coded together? Yes, and it happens routinely. A patient presents with a current infection and a documented pattern of past ones. The active infection is coded first (N39.0 or a site-specific code), and Z87.440 is added as a secondary code to show the recurrent history that is shaping the workup or prophylaxis decision. The two are not contradictory. One describes today; the other describes the pattern behind today.
Coding recurrent urinary tract infections
Search traffic for a recurrent UTI ICD-10 code is heavy, and the honest answer surprises people. ICD-10-CM has no code that means “recurrent urinary tract infection” as an active diagnosis. There is no N-code for it.
That gap is bridged in two ways. When a recurrent infection is active but no site is documented, it is coded as N39.0, the same as any unspecified active UTI. To capture the recurring nature, coders pair it with Z87.440, which is exactly what the “(recurrent)” nonessential modifier in the index supports. The active code carries the current episode; the history code establishes the pattern.
It helps to know what “recurrent” actually means clinically, because payers increasingly expect the documentation to back it up. The American Urological Association, together with the Canadian Urological Association and the Society of Urodynamics, Female Pelvic Medicine and Urogenital Reconstruction, published a joint guideline on recurrent uncomplicated UTIs in 2019 (later amended). That guideline, chaired by Jennifer Anger, MD, MPH, defines recurrent UTI as two or more culture-proven episodes of symptomatic acute bacterial cystitis within six months, or three or more within twelve months.
The same guideline sets out why history matters at all. Roughly 60 percent of women experience symptomatic acute bacterial cystitis in their lifetime. Of those who have had one episode, an estimated 20 to 40 percent will have another, and 25 to 50 percent of that group will go on to have multiple recurrences. Evaluation and treatment of UTIs cost approximately $2 billion per year in the United States, per the AUA guideline. A documented history is not a footnote for these patients; it drives decisions about prophylaxis, vaginal estrogen in postmenopausal women, and further workup.
Recurrent and chronic are not interchangeable, and the code changes depending on which one the provider means. Three separate infections that each cleared with antibiotics is a recurrent picture, coded through the N39.0 plus Z87.440 approach when active, or Z87.440 alone once resolved. An infection that never fully clears despite repeated antibiotic courses is chronic, and it points to codes like N30.20 for chronic cystitis or N11.9 for chronic kidney involvement. Assigning Z87.440 simply because the note says “chronic UTI” is incorrect if the infection is still active. Coding should reflect the patient’s current clinical status, not just the wording in the documentation.
Can Z87.440 be a primary diagnosis?
No. Z87.440 appears on the Medicare Code Editor’s list of codes that are unacceptable as a principal diagnosis. The MCE flags codes that describe a circumstance influencing health status rather than a current illness or injury, and Z87.440 is one of them. If it is submitted as the principal diagnosis on an inpatient claim, the claim is returned to the provider for correction. The Integrated Outpatient Code Editor applies the parallel logic to first-listed diagnoses on the outpatient side.
The reason follows from what the code is. A personal history code, by definition, does not represent the reason a patient needs care today. Something else does: an active infection, a surgical procedure, a follow-up examination, a screening. That active reason is sequenced first. Z87.440 is sequenced after it, as a secondary code that adds context and, often, medical necessity for monitoring or preventive treatment.
There is a narrow-looking exception worth naming so it does not become a trap. If a patient presents purely for follow-up after completed UTI treatment, the encounter is coded with the appropriate follow-up examination code (from the Z08 or Z09 categories, depending on the situation) sequenced first, with Z87.440 added as secondary. Even then, the history code is not standing alone as the principal diagnosis. It rides in the second position.
Documentation that supports Z87.440
The most consequential coding advice on this code has nothing to do with the code itself. It concerns where the diagnosis comes from in the chart.
Coding Clinic for ICD-10-CM/PCS, Third Quarter 2021 (pages 32 to 33), addresses this directly for outpatient encounters. Coders should not assign diagnoses based solely on entries in the past medical history, the problem list, or the medication list. A “history of UTI” line sitting in a templated PMH section is not, by itself, enough to bill Z87.440. The provider has to document that the personal history affected the care and management of the patient for that specific encounter.
That standard is easy to meet with a little discipline, and easy to fail without it. Documentation that supports Z87.440 looks like a note where the clinician connects the history to a decision: ordering a urinalysis because of the recurrence pattern, prescribing prophylaxis, referring to urology, counseling on prevention. Documentation that fails is a bare problem-list entry with no thread to the visit.
A short checklist keeps this clean:
- The record states the UTI is resolved and no longer being treated
- The patient is asymptomatic for a current infection at this encounter
- The provider (not a copied template field) links the history to today’s assessment, plan, or monitoring
- If recurrence is claimed, the note reflects the pattern rather than a single prior episode
Two other cautions apply. First, do not attach Z87.440 to a claim where the same UTI is being actively worked up as present; that is a current diagnosis, coded with N39.0 or a site-specific code. Second, watch the “history of” language itself. When a provider documents “history of UTI” but the patient’s laboratory results, symptoms, and treatment plan indicate an active infection, do not automatically assign a history code. Instead, query the provider for clarification. Providers sometimes use the phrase as clinical shorthand, but coding should reflect the patient’s actual documented clinical condition.
Z87.440 is a small code with a narrow job: it records that a patient has had urinary tract infections that are now resolved but still relevant to their care. Use it when the infection is genuinely past and untreated, sequence it as a secondary code because Medicare will not accept it as principal, and pair it with N39.0 when a recurrent infection is active. Recurrent, chronic, febrile, and unspecified histories all resolve to this one code, so the accuracy lives entirely in the documentation, specifically in a provider note that ties the history to the encounter rather than a problem-list line copied forward. Coders who hold to that standard clear claims and survive audits. Those who bill history from a template alone tend to do neither.





