Model flow An example of model flow with sample values is depicted in Figure 1. ‘Ill patients’ refers to patients with PCP; ‘well persons’ refers to persons without PCP (although persons in this group likely have another illness, since they are undergoing testing). At a given PCP prevalence among persons tested, the number of ill patients correctly diagnosed is calculated as the sensitivity of the diagnostic procedure (Table 1) multiplied by the total number of ill patients. The number of well persons incorrectly classified as ill is equal to the total number of well persons, minus the procedural specificity (Table 1) multiplied by the total number of well persons. The total number of persons classified as ill is the sum of these values. Total diagnostic procedural costs are calculated as a sum of the health care worker and laboratory staff costs and material costs for the specimen collection and the diagnostic test procedures (Table 1 and Tables S1 and S2). Figure 1 Model flow. ‘Ill patients’ refers to patients with PCP. ‘Well persons’ refers to persons without PCP, regardless of their health status otherwise. Patients successfully treated are assumed to gain one life-year. All persons diagnosed as PCP-positive (correctly or incorrectly) are assumed to receive a full course of treatment. Treatment failure rates are considered as a combination of failure-to-adhere and breakthrough infection rates (Table S3). The number of patients who fail treatment is equal to the number of ill patients correctly classified as ill who undergo treatment, multiplied by the treatment failure rate. Because each patient is assumed to gain a single year of life from correct treatment, total life-years gained is equal to the number of ill patients correctly diagnosed minus those for whom treatment did not successfully treat infection (Figure 1). The proportion of ill patients successfully treated is represented by the number of patients successfully treated divided by the number ill, while the proportion unnecessarily treated is equal to the number of well persons treated divided by the total number of well persons. Total treatment costs are equal to the total number of well persons and ill patients who receive treatment, multiplied by the estimated treatment cost. Finally, the total diagnostic and treatment cost per life-year gained (the cost-effectiveness ratio) is equal to the sum of the total diagnostic costs and the total treatment costs, divided by the number of ill patients successfully treated. The incremental cost-effectiveness ratios of the most effective options were then calculated. Relapse rates are not considered. Start-up and indirect costs (building costs, laboratory equipment purchase, electricity, training) are also not considered, as they will differ greatly by region and available pre-existing infrastructure.