We extracted the following information from the clinical charts: sociodemographic (gender, age, age >=50 years old, low socioeconomic level, illiteracy and elementary school, and access to social security), epidemiologic (current smoking; current illegal drug use; HIV related risk behavior, and clinical (HIV diagnosis previous to admission; time elapsed between HIV diagnosis and hospital admission [days]; CD4+ cell counts [cells/mm3]; CD4+ cell count < 200/mm3; viral load [<50 copies/ml or undetectable viral load]; time to respiratory disease [time elapsed between the onset of symptoms and hospital admission, days]; and hospital stay [days]). Socioeconomic level was based on evaluation of family income, occupation, educational level, number of family members living at the current residence, number of school-age children in the family, construction material of current residence, ownership of current residence, home location (urban or rural), and service availability (electricity, paved roads, piped-in water, and sewage). This information was investigated by a social worker on patient admission and graded on a 7-point scale. We defined individuals from low socioeconomic level as those who were graded points one to three. Current illegal drug use referred to smoking marijuana and inhaled cocaine. There were no patients referring intravenous drug usage. The only HIV related risk behavior was men having sex with men. Given the retrospective design of the study, we did not have information on treatment adherence. Therefore, we used fully controlled viral replication as indicator of full adherence. Fully controlled viral replication was considered when viral load was <50 copies/ml or undetectable viral load. Time to respiratory disease was defined as the time (days) elapsed between the onset of the symptoms and diagnosis of respiratory disease.
Discharge diagnoses were classified in six groups: 1) PJP; 2) Bacterial community-acquired pneumonia; 3) Tuberculosis (pulmonary and disseminated); 4) Other infectious respiratory diseases caused by a single pathogen; 5) Non-infectious respiratory diseases; and 6) Mixed (combination of one or more of previous diagnoses in a single patient). Mortality refers to all-cause in-hospital mortality. Respiratory diagnoses on discharge and causes of death were coded according to the International Classification of Diseases Tenth Revision (ICD-10).