ICD-10 Coding for History of Aspiration Pneumonia

The code you are looking for is Z87.71, which stands for "Personal history of pneumonia." This is the standard placeholder code used when documenting that a patient previously had aspiration pneumonia but is currently being treated for something else. It is not a current illness code. A lot of people conflate the two and end up in audit trouble. Aspiration pneumonia itself falls under J69.0 - Pneumonitis due to inhalation of food and vomit. That is the active condition code. When the patient no longer has the pneumonia and the provider wants to document that this happened in the past, you shift to Z87.71. The distinction matters because payers treat these completely differently. J69.0 is a diagnosis. Z87.71 is a risk factor indicator. I learned this the hard way back in 2019 when I was doing retrospective chart reviews for a mid-sized hospital system. We had a patient admitted with CHF exacerbation who had a documented history of aspiration pneumonia two years prior. The attending physician wrote the clinical note referencing the past event, and the coding team assigned J69.0 as a secondary diagnosis. Three months later, the payer flagged it. The claim was denied during a routine audit because J69.0 implies active disease. The fix required submitting a corrected claim with Z87.71 instead, which cost us about four hours of rework per affected claim and triggered a compliance review. We stopped making that mistake after that.

When to Use Z87.71 Correctly

Use this code when the aspiration pneumonia episode has resolved and the current encounter is unrelated. Common scenarios include routine follow-up visits, admissions for other conditions, or preventive care visits where the historical pneumonia is relevant to the patient's risk profile. Do not use it when the patient is currently being treated for aspiration pneumonia. That stays J69.0 regardless of how long ago symptoms started. There is also an important nuance around combination codes that beginners miss. If the patient has both an active respiratory condition and a history of aspiration pneumonia, you code both. Z87.71 goes on as an additional code. It does not replace the active diagnosis. The coding guidelines are explicit about this sequencing rule.

Common Pitfalls That Get People in Trouble

The biggest error I see is lazy documentation. Physicians will write "history of aspiration pneumonia" in a note but leave it vague about when it occurred or whether it was clinically confirmed. Z87.71 requires that the pneumonia was actually diagnosed by a provider at some point. A family member's recollection of the patient "choking on soup and getting sick once" does not qualify. The medical record needs to show a definitive diagnosis. If the documentation is thin, request clarification from the provider before assigning the code. This usually adds about 15 minutes to the coding cycle but prevents downcoding during audits. Another frequent mistake involves the interaction between Z87.71 and J69.0 on the same claim. Some coders think using both creates a conflict. It does not. The ICD-10-CM guidelines allow concurrent use when both conditions are present and separately treatable. The gotcha is that some payer policies may reject J69.0 as incompatible with certain Z codes if the clinical documentation does not clearly support both. Always verify the payer's specific policy if you are submitting claims regularly.

Get the Full Details

Aspiration Pneumonia ICD-10-CM Codes
Aspiration Pneumonia ICD-10-CM Codes

Documentation Requirements for Compliance

To support Z87.71 with confidence, your documentation should include three elements: confirmation that aspiration pneumonia was diagnosed in the past, evidence that the condition has resolved, and a clear statement that the current encounter is for an unrelated issue. The last element is what most notes skip. Without it, an auditor can reasonably argue that the physician was still treating active pneumonia even if they labeled it "history of." I recommend adding a brief sentence during discharge summaries or follow-up notes that explicitly states the prior aspiration pneumonia is resolved and not contributing to the current admission. Something as plain as "Patient's prior aspiration pneumonia from 2021 is resolved and unrelated to this presentation" does the job. It takes the physician about 10 seconds to write and saves the coder from having to request additional documentation later.

Where to Find Official Guidance

The authoritative source for this code is the annual ICD-10-CM Official Guidelines for Coding and Reporting published by the CDC and CMS. The relevant section covers Chapter 21 codes for factors influencing health status, and Z87.71 falls under personal history of diseases of the respiratory system. The guidelines were updated in the 2024 version to clarify sequencing between history codes and active chronic conditions, which directly affects how you handle cases like this. You can download the current guideline document from cms.gov at no cost. It is roughly 80 pages and not entertaining, but it is the reference every coder should keep bookmarked. Start by confirming the physician's documentation explicitly mentions aspiration pneumonia as a past event. Look for diagnostic language like "diagnosed with," "treated for," or "history of." If the note only says "had pneumonia" without specifying aspiration, you cannot assume Z87.71 is correct. Ask the provider to clarify. Next, verify the condition is resolved. If the patient is still receiving treatment or follow-up for the pneumonia, code J69.0 instead. Then check whether any active respiratory condition exists simultaneously. If yes, add both codes with the active condition listed first. Finally, document your coding decision in the chart so that an auditor can follow your logic without needing a phone call. This process typically takes a trained coder about three minutes per case. When documentation is poor and clarification requests are needed, it can stretch to 20 or 30 minutes per case. The main bottleneck is always the physician not writing clearly enough in the first place. No amount of coding expertise fixes incomplete documentation.