Accurate diagnosis sequencing is one of the most critical skills in medical coding. When it comes to HIV-related admissions, small sequencing mistakes can lead to claim denials, compliance issues, or exam failure.
In ICD-10-CM, B20 (Human immunodeficiency virus [HIV] disease) has very specific sequencing guidelines that every medical coder must understand clearly.
Let’s walk through it step-by-step.
Understanding Code B20
Code B20 is assigned when a patient has:
A confirmed diagnosis of HIV disease
AIDS
Any documented HIV-related illness

Once a patient has been diagnosed with HIV disease, B20 is used on every subsequent admission, regardless of the reason for visit — unless documentation specifically states otherwise.
But sequencing depends entirely on why the patient is being admitted.
And that’s where coders often get confused.
Scenario 1: Admission for HIV Treatment or HIV-Related Condition
This is the most straightforward situation.
If the patient is admitted for:
HIV infection itself
AIDS
Any HIV-related complication (e.g., opportunistic infections, HIV-related pneumonia, HIV-related malignancy)
Then:
👉 B20 is sequenced as the principal diagnosis.
👉 Additional codes are assigned for the specific HIV-related conditions.
Why?
Because the reason for admission is HIV or its complication. Therefore, HIV disease drives the entire encounter.
Example:
A patient is admitted for treatment of HIV-related tuberculosis.
Coding sequence:
B20 – HIV disease (Principal diagnosis)
Tuberculosis code (Additional diagnosis)
The logic is simple: HIV caused or is responsible for the complication being treated.
This is the golden rule most exam questions test first.
But now comes the twist.
Scenario 2: The Important Exception – Hemolytic-Uremic Syndrome
There is one major sequencing exception that medical coders must remember.
If the patient is admitted for:
Hemolytic-uremic syndrome associated with HIV disease
You do NOT sequence B20 first.
Instead, assign:
D59.31 – Infection-associated hemolytic-uremic syndrome (Principal diagnosis)
B20 – HIV disease (Additional diagnosis)
Why Is This an Exception?
Because ICD-10-CM guidelines specifically state that in this scenario, the hemolytic-uremic syndrome takes sequencing priority.
This is not about logic alone — it’s about official coding guidelines.
Exams love testing this because many coders automatically put B20 first whenever HIV is involved.
That instinct will cost marks here.
Scenario 3: Admission for an Unrelated Condition
Now let’s move to a very common real-world situation.
A patient with known HIV disease is admitted for something completely unrelated, such as:
Fracture due to fall
Motor vehicle accident injury
Appendicitis
Acute myocardial infarction
Kidney stone
In this case:
👉 The unrelated condition becomes the principal diagnosis
👉 B20 is coded as an additional diagnosis
👉 Any HIV-related conditions are also coded as additional diagnoses
Example:
A patient with known HIV disease is admitted after a road accident with a femur fracture.
Coding sequence:
Femur fracture (Principal diagnosis)
B20 (Additional diagnosis)
Why?
Because the reason for admission is the fracture — not HIV.
Remember this simple principle:
The principal diagnosis is always the condition chiefly responsible for admission.
HIV status does not automatically make B20 principal unless it is the reason for admission.
Understanding the Logic Behind Sequencing
Instead of memorizing rules blindly, think in terms of clinical reasoning:
Ask yourself:
Why is the patient in the hospital?
What condition required inpatient care?
What drove the medical decision-making?
Once you answer that, sequencing becomes clear.
Common Coding Mistakes to Avoid
Let’s highlight frequent errors:
1. Automatically Sequencing B20 First
Many coders assume HIV must always be principal. That is incorrect in unrelated admissions and the hemolytic-uremic syndrome exception.
2. Missing the Exception
For hemolytic-uremic syndrome associated with HIV, sequencing D59.31 first is mandatory.
3. Confusing HIV Infection vs. HIV Disease
B20 is assigned only when the patient has confirmed HIV disease or AIDS — not suspected or possible cases.
Exam Tips for Medical Coders
If you’re preparing for CPC, CCS, or other coding certification exams, here’s how exam questions are usually framed:
They will describe an HIV patient admitted for a specific complication.
They may try to trick you with unrelated injuries.
They may hide the hemolytic-uremic syndrome detail in the middle of the question.
Your strategy:
Identify reason for admission.
Check if it is HIV-related.
Look for the hemolytic-uremic syndrome exception.
Then sequence accordingly.
Always read the full question before choosing an answer.
Quick Memory Trick
Use this 3-step mental checklist:
🟢 HIV treatment admission → B20 first
🔴 HIV + Hemolytic-uremic syndrome → D59.31 first
🟡 Unrelated condition → That condition first, B20 additional
If you remember this framework, you will rarely go wrong.
Why Correct Sequencing Matters in Real Practice
This isn’t just about exams.
Incorrect sequencing can lead to:
Claim denials
Delayed reimbursement
Audit risks
Compliance issues
Reduced facility reimbursement
Payers review principal diagnosis closely because it determines DRG assignment and reimbursement category.
In inpatient coding especially, principal diagnosis selection directly impacts hospital payment.
That’s why mastering sequencing rules is essential for both career growth and accuracy.
Final Takeaway
HIV coding is not complicated — but it is precise.
The key is understanding that sequencing depends entirely on:
The reason for admission
Official ICD-10-CM guidelines
Specific documented exceptions
Remember:
B20 is principal when HIV drives the admission
D59.31 is principal in hemolytic-uremic syndrome associated with HIV
Unrelated conditions take priority when they are the reason for admission
Once you internalize that logic, you won’t just pass exams — you’ll code confidently in real clinical scenarios.





1 thought on “HIV ICD-10 Coding Sequencing Guide for Medical Coders”