Z codes may be used as either a first-listed (principal diagnosis code in the inpatient setting) or secondary code, depending on the circumstances of the encounter.
Certain Z codes may only be used as first-listed or principal diagnosis. They also indicate the reason for the encounter. An interesting Z code to me is Z21. This is Asymptomatic HIV status. That means the patient tested HIV+ but has not shown any signs or symptoms of the disease.
What is the difference between an acute condition and a chronic condition? According to the ICD-10-CM Official