ICD 10 code for HIV

ICD 10 Code for HIV (Human Immunodeficiency Virus) is listed below:

HIV – B20

Symptomatic HIV – B20

HIV Positive – Z21

Asymptomatic HIV – Z21

HIV Negative – Z71.7

Code only the confirmed cases

ICD 10 code for HIV should be coded only when it’s confirmed from the provider

For example:

Assume patient admitted for anemia with possible HIV infection

ICD 10 Code for Anemia is D64.9

In the above example we have coded only anemia, as the HIV is not yet confirmed from the physician.


Selection and sequencing – ICD 10 code for HIV

  • Patient admitted for HIV related condition

The primary ICD 10 code should be HIV B20 and the secondary diagnoses code is HIV related condition.

Example 1:

HIV with pneumocytosis

ICD 10 code for HIV with pnemocytosis is B20, B59

Example 2:

A patient with AIDS developed Encephalitis as a manifestation of AIDS and is seen in the office for encephalitis

ICD 10 code is B20, G05.3

  • HIV Patient admitted for unrelated condition

If HIV patient met with an accident and admits the hospital then it’s an unrelated condition, in this case the primary diagnosis code will be unrelated condition, secondary diagnoses code will HIV(B20) and followed by any HIV related condition. The sequencing of code will be in below order.

  1. Unrelated condition
  2. HIV – B20
  3. HIV related condition

Example 1:

A symptomatic HIV patient is at initial visit for sprained left ankle

ICD 10 code is S93.402A, B20

Example 2:

A 48 year old female patient with HIV is at the subsequent right hip fracture

ICD 10 code is S72.001D, B20


  • Asymptomatic HIV- Z21

Asymptomatic means showing no symptoms. If the provider document without any symptoms like HIV positive, known HIV or HIV test positive, then we need to assign the Z21 code.


Patient admitted with acute appendicitis and positive HIV

ICD 10 code is K35.80, Z21


  • Patient with HIV infection during pregnancy, childbirth and the puerperium

In this case, the primary diagnosis code will be always O98.7_, followed by HIV(symptomatic-B20 or asymptomatic-Z21) and HIV related condition.

Example 1:

A pregnant patient in her third trimester at 38 weeks with a symptomatic HIV infection present for check up

ICD 10 code is O98.713, B20, Z3A.38

Example 2:

A pregnant patient in her first trimester (8 weeks) diagnoses with HIV, she has not experiencing HIV related condition.

ICD 10 code is O98.711, Z21, Z3A.08


  • Encounter for testing for HIV

ICD 10 code for Encounter for screening is Z11.4

ICD 10 code for counseling code is Z71.7

Example 1:

A 32 year old female patient present and request to do HIV test as she had unprotected test. Provider performs screening test and spent 25 minutes for counseling

ICD 10 code is Z11.4, Z71.7

Example 2:

A 40 year old female patient present for her HIV test result, doctor advise her that HIV is asymptomatic and spent 35 minutes for counseling.

ICD 10 code is Z21, Z71.7

Conclusion: With the above examples we determine how to code the HIV codes when the cases not confirmed, when the patient encounter for HIV testing, when patient with HIV during pregnancy, when HIV patient with unrelated condition.