Congenital Heart Defect ICD-10: Code the Defect or Z87.74 After Repair?

Last updated: By Manikandan JFact-checked by Manikandan J, CPC, CRCR, 10+ years in US RCM · Editorial policy

Congenital heart defect ICD-10 coding turns on one question: is any part of the defect still there? Code the defect from the Q20-Q28 block while it remains, and use Z87.74 only after full correction.

So a closed ASD with no residual shunt gets Z87.74, not Q21.10. A repaired tetralogy with a residual VSD keeps Q21.3.

TL;DR: Fully corrected defect: Z87.74, plus Z95.818 if a closure device is documented. Partially corrected defect that still needs care: code the defect itself. A residual VSD after tetralogy repair indexes to Q21.3, not Q21.0. Findings outside the defect’s definition, such as RV dilation, get their own code.

Written by Manikandan J, CPC, CRCR, a certified coder and revenue cycle specialist. Published 30 November 2026. Last updated: 30 November 2026.

Table of Contents

Do you code Q21.10 and Z87.74 after ASD device closure?

No, not both for a fully closed ASD. Use Z87.74, plus Z95.818 for the occluder device. The official guidelines say a corrected malformation gets a personal history code. Code Q21.1- only when the echo shows a residual shunt.

The rule is in Section I.C.17 of the FY 2027 ICD-10-CM Official Guidelines. It says Chapter 17 codes may be used throughout the life of the patient. Once the defect is corrected, the history code takes over.

Z87.74 means personal history of a corrected congenital malformation of the heart and circulatory system. Z95.818 means presence of other cardiac implants and grafts. A status code is a Z code that shows a device is present. A history code is a Z code that shows the condition is gone.

Pick the right ASD code too. Q21.11 is secundum ASD, and Q21.12 is patent foramen ovale. Q21.10 is the unspecified code, so use it only when the note gives no type.

Example scenario (fictional names), part 1

Congenital heart defect ICD-10 example: what happened

Marisol Quennell-Adeyemi codes for Bluewater Pediatric Heart Clinic, a fictional practice in Oregon. Dr. Caspian Lindqvist-Oduya read a complete congenital echo, 93303, for a patient with repaired tetralogy of Fallot.

The note said “s/p TOF repair.” It also listed a small residual VSD and moderate RV dilation. Marisol coded Z87.74 alone, since the defect was “repaired.”

A fictional commercial plan denied the echo with a CO-11 denial code. CARC 11 reads “The diagnosis is inconsistent with the procedure.”

Was the history code wrong, or the payer? Keep reading, or jump to how the claim was resolved.

When is a congenital heart defect considered corrected for coding?

Diagram of when a congenital heart defect is considered corrected for coding: read past s/p repair, use Z87.74 only after full correction, and code findings that are not inherent
Code the defect from Q20-Q28 while any part remains. Use Z87.74 only after full correction, and add Z95.818 when a device is documented.

It is corrected when the provider documents no remaining defect. The Z87.7 category covers conditions classifiable to Q00-Q89 that have been repaired or corrected. Its Excludes2 note sends partially corrected defects that still need medical treatment back to the condition code.

So “status post repair” alone does not settle it. Read the rest of the note. For example, a residual shunt, leak or stenosis means the defect is still present.

Outpatient rules agree. Section IV.J says code conditions that coexist and affect care, but not conditions that no longer exist. History codes may be added when the past condition affects current care.

How do you code repaired tetralogy of Fallot with a residual VSD?

Code Q21.3 when a residual VSD is documented. The ICD-10-CM index lists Defect, ventricular septal, in tetralogy of Fallot under Q21.3. So you do not switch to Q21.0 for the leftover VSD.

The Q21.3 inclusion note lists four parts: VSD, pulmonary stenosis or atresia, dextroposition of the aorta and right ventricular hypertrophy. Any of these that the note says remains is part of Q21.3.

Do not add Z87.74 for the same defect. Z87.74 describes a corrected defect, so it does not fit a defect you still report as current.

Documented finding.ICD-10-CM code.Why.
ASD closed by device, no residual shunt.Z87.74 + Z95.818.Corrected defect, device present.
ASD closed, residual secundum shunt.Q21.11.Defect still present.
Repaired TOF, residual VSD.Q21.3.Index: VSD in tetralogy of Fallot.
Repaired TOF, RV dilation documented.Q21.3 + I51.7.Dilation is not a Q21.3 component.
Repaired TOF, no residual defect.Z87.74.Fully corrected.

All codes and notes come from the FY 2027 tabular and index files on the CMS ICD-10 codes page, effective October 1, 2026.

Is RV dilation coded separately with tetralogy of Fallot?

Yes, when the provider documents it. Section I.C.17 says inherent parts of an anomaly are not coded separately. It also says to add codes for manifestations that are not inherent.

Q21.3 names right ventricular hypertrophy, not dilation. The index entry Dilatation, ventricular points to Hypertrophy, cardiac, which is I51.7. I51.7 includes ventricular dilatation.

Code RV hypertrophy into Q21.3, though. It is one of the four named parts, so a separate code would double count it.

Can you use congenital heart defect codes for adult patients?

Yes. The guidelines say Chapter 17 codes may be used throughout the patient’s life. A defect may also be found later in life, and a Q code still applies once the provider diagnoses it.

No official rule says to keep a Q code until a transplant. The test is the same at every age: is the defect still present?

For risk adjustment, the code must match the note. See our risk adjustment code vs documentation answer for that problem.

What documentation supports a congenital heart defect code?

The note should name the original defect, the repair and what remains. Words like “no residual shunt” or “small residual VSD” decide the code. Echo reports often state this in the findings.

In my 10+ years in medical billing, many congenital heart claims went wrong on one phrase. The note said “s/p repair,” and the coder stopped reading there.

If the note is unclear, query the provider. For echo claims tied to coverage rules, see our 93306 diagnosis not covered answer. Our radiology diagnosis coding guidelines answer covers coding test findings.

How do you fix a congenital heart defect coding error on a claim?

Recode from the note, then send a corrected claim. A wrong history code often shows up as a CARC 11 diagnosis mismatch. Our CO-11 denial guide explains that denial.

  1. Reread the note for residual defects, and query the provider if it is vague.
  2. Swap Z87.74 for the Q code when a defect remains, or the reverse when it is gone.
  3. Send a corrected claim with frequency code 7, using our corrected claim guide.

If the payer still denies, our appeal letter generator drafts the appeal. Keep the ICD-10-CM guidelines cheat sheet open while you recode.

Example scenario (fictional names), part 2

How the congenital heart defect claim was resolved

  1. Marisol reread the Z87.7 notes. Partially repaired defects that still need care are coded to the condition.
  2. The residual VSD meant the tetralogy was not fully corrected. The index sent her to Q21.3.
  3. RV dilation is not in the Q21.3 definition, so she added I51.7.

Fix: she sent a corrected claim, frequency code 7, with Q21.3 first and I51.7 second. Z87.74 came off the claim.

Outcome: the echo paid on reprocessing. The clinic now asks for “no residual defect” wording before anyone uses Z87.74.

Names and details are illustrative; no real patient data.

3-step checklist

  1. Check the note for any residual defect before you pick a code.
  2. Use the Q code while a defect remains; use Z87.74 only when it is fully corrected.
  3. Add Z95.818 for a documented device and separate codes for non-inherent findings.

FAQ

What is the ICD-10 code for history of ASD closure?

Use Z87.74 when the ASD is fully closed and nothing remains. Add Z95.818 when the note documents the closure device. The ICD-10-CM index sends Presence, device, cardiac NEC to Z95.818.

Can you code Q21.3 for an adult with repaired tetralogy of Fallot?

Yes, when the provider documents residual defects that still need care. The guidelines say Chapter 17 codes may be used throughout the life of the patient. Age does not change the rule.

Do you code Q21.0 for a residual VSD after TOF repair?

No. The ICD-10-CM index lists Defect, ventricular septal, in tetralogy of Fallot under Q21.3. The VSD is part of the tetralogy code, so Q21.0 is not added.

Is a patent foramen ovale coded as an ASD?

It has its own code. Q21.12 is Patent foramen ovale, under the Q21.1 atrial septal defect subcategory. Do not use Q21.10 when the note says PFO.

Who decides if a heart defect is corrected?

The provider does. The coder reads the note and codes what it states. If the note says only status post repair, query the provider about residual defects.

Sources

My methodology was simple. I checked the official guidelines and the FY 2027 tabular and index files line by line.

  • CMS, ICD-10-CM Official Guidelines for Coding and Reporting FY 2027, sections I.C.17, I.C.21 and IV.J (linked above). Accessed 30 Nov 2026.
  • CMS, FY 2027 ICD-10-CM tabular list and alphabetic index (linked above). Accessed 30 Nov 2026.

Read about the author, or contact us with a question. See our editorial policy.

Last updated: 30 November 2026 · Educational content for U.S. coding and billing teams. Payer policies may be stricter than the national rules shown here.

Manikandan J

Written by

Manikandan J

CPC (AAPC), CRCR (HFMA)

Manikandan J is a CPC (AAPC) and CRCR (HFMA) certified medical billing professional with billing and RCM experience at athenahealth, Omega Healthcare, UnitedHealthcare, Blue Cross Blue Shield and Access Healthcare. He writes Medical Billing 101's guides on denial codes, appeals and patient billing help for US billers, providers and insured patients.

10+ years in US revenue cycle management. How we fact-check · LinkedIn profile

More about the author →