**Mathematical modelling **

Modelling the cost-effectiveness evaluation of different strategies for the detection of syphilis in inmates' populations requires the following three components:

__i. A mathematical model representing the evolution of the disease in prison population__: For our case study (a Chilean inmate population) and based on the data available, we consider the following three assumptions: 1) Currently the disease is in a steady state in both the general population (outside the prison) and in the inmate population; 2) The population is isolated, that is, inmmates do not have sexual contacts with people from outside the prison or with workers of the prison and; 3) The number of innmates is constant. Considering these assumptions, we adapt the model published by Garnett et al. to a prison context [15]. The result is a compartmental model, a system of Ordinary Differential Equations (ODE), with the inmates distributed into six groups: Susceptible (S), Infected in stage 1 , Infected in stage 2 (), Latent infection (L), Tertiary syphillis (T) and Immune (I). See Appendix 1 for model details.

__ii. Representation of different strategies to be evaluated__: In the mathematical model previously described, we included the action of different detection strategies to be evaluated (including treatment of confirmed cases). These strategies affect the evolution of the disease, modifying transitions of inmates between different disease stages (compartments). The different strategies can be divided into two broad categories: 1) passive detection, that examines syphilis suspect cases among persons who spontaneously seek health care, and 2) active case finding, through the screening of apparently healthy people. The later could be performed at the entrance to imprisonment (entry screening), or once inside the prison, through periodic mass screening. The modelling of how detection strategies affect the disease evolution must consider the sensitivity and specificity of each involved test. The tests included in the analysis are Rapid Test (RT), Non Treponemal Test (VDLR), and Treponemal Test (FTA-ABS). Depending on the combinations of the screening strategy, the detection tests, and the order in which they are applied, we simulated and compared the following strategies:

**Strategy 0 (current situation, passive detection):** classic Non Treponemal Test upon spontaneous consultation (inside the prison), based mainly on symptoms, followed by a Treponemal confirmation Test;

**Strategy 1 (entry screening**): systematic detection of a large proportion of prisoners entering the prison using the Rapid Test, followed by a non-treponemal test to determine a titer;

**Strategy 2a, 2b, 2c and 2d (mass screening):** periodic mass screening of inmates using the Rapid Test, with three different frequencies (i.e., every 1, 2, 5, or 10 years), in each case followed by a non-treponemal test to determine a titer;

**Strategy 3** **(current situation, reverse algorithm**): detection test upon spontaneous consultation (inside the prison) using the Rapid Test, based mainly on symptoms, followed by a non-treponemal test to determine a titer.

Strategies 1 and 2 are incremental to Strategy 0, considering the potential detection of spontaneous visitors to health centers.

In Appendix 1 we include the modelling of these strategies representing the downstream effects of each of them in the disease evolution. For instance, when new inmates who test positive for syphilis enter the prison they have to be assigned to different stages of the disease, which would be different if considering entry screening or the other strategies.

__iii. Model of the cost and health outcomes associated with each strategy__: With the previous two components, the model estimates the number of infected and non infected inmates as the direct result of the detection and treatment according to each of the strategies. Therefore, the effectiveness of the strategies, that we assessed using quality adjusted life years (QALY), are derived from these outputs, while the costs are derived from the number of tests applied (detection and confirmation) and the number of treatments delivered. The mathematical modelling of costs and health outcomes for our case study are described in Appendix 1.

**Parameters, background, and source of data **

In order to run the model previously described and to proceed with the cost-effectiveness evaluation of strategies considered, a next step is to identify different parameters involved in the model. Based on the available data, in this procedure several assumptions need to be considered.

In our case study,** **most of the parameters, mainly those related to the disease dynamic and test performance were obtained from systematic searches of indexed (PubMed, Cochrane, Scielo) and non-indexed (Chilean Ministry of Health reports, clinical guidelines) literature, complemented with epidemiological textbooks. Based on previous work that measured the syphilis prevalence in two Chilean prisons using rapid tests for detection and non-treponemal tests for confirmation [14], we calibrated the model taking into account the available values for parameters in order to obtain a stationary 3% prevalence as an outcome for the Strategy 0 (see Table A2.1 in Appendix 2). For the values of some key parameters (transmission probabilities, number of sexual partners, and inmates turnover) we proceeded as follows: (i) we assumed that the current situation in the prison, represented by the initial condition used in the dynamics, is at equilibrium; (ii) for some choice of the mentioned parameters, we computed the corresponding steady state of the system describing the disease dynamics and we compared it with the initial condition (square norm of the difference); (iii) we chose the set of parameters in ranges indicated by the references in Table A2.1 (Appendix 2), whose corresponding steady state best approximates the initial condition (with respect to the square norm criterium) –i.e. a least-square parameter estimation, considering obtained steady states. This procedure is explained in Appendix 1.

Test performance and treatment effectiveness were also obtained from the literature review. Table A2.2 in Appendix 2 shows the sensitivity and specificity values for the detection and confirmation tests. Treatment depended on the disease stage, using penicillin in different doses and routes of administration, and tetracycline for the allergic (2%). We also assumed a re-treatment probability of 10% [16,17].

The health outcomes associated with uninfected and infected inmates were assessed using QALY. In the case of infected individuals, the QALY were measured through the application of the EuroQol-5 Dimension questionnaire (EQ-5D), in its 3L version provided in Spanish by Euroqol Research Foundation (after registration to use and authorization). We used a convenient sample of 29 infected inmates from the prison of Arica city, interviewed in January 2016 as part of the prevalence study mentioned before [14], and additionally 67 infected patients from a hospital outpatient clinic of sexually transmitted infection (UNACCES) of the “Sótero del Río” Hospital, in Santiago, interviewed between March and November 2017. The EQ-5D profiles were valued based on a previous study commissioned by the Superintendencia de Salud [18] in order to obtain the quality of life coefficients by stage. The value for infected individuals was calculated as the mean value for the combined sample for the 96 individuals (with no significant differences between the two sub-samples mean values), resulting in a value of 0.737 (see Table A2.2 in Appendix 2). In the case of uninfected inmates, “perfect health” was assumed, with a value of 1 according to the EQ-5D profile valued by the same study [18].

For both detection and treatment costs, Chilean protocols and clinical guidelines were reviewed [19–22] and unstructured interviews were carried out with key informants (Ministry of Health-MoH –STI Responsible; Institute of Public Health –STI Laboratory Responsible; Gendarmeria Chile – Head of Health Department; UNACESS Sótero del Río –health professionals STI Unit; Arica Prison –health officer), in order to identify the usual practice regarding the detection algorithm, type of test utilized for detection and confirmation, and treatment for each stage of the disease (see Figure 1). In addition, in order to assign monetary values to the resources that were identified and measured (see Table A2.2 in Appendix 2) we used Chilean National Health Fund (FONASA) fees for health services and centralized national procurement agency (CENABAST) prices for medicines.

**Figure 1. Use of resources**

** **

(*) Early latent represents 45% of the latent cases and late latent 55% of these cases.

(**) The analysis also considers a chance of developing neurosyphilis at every stage of the disease (0.9% primary, 3.8% secondary, 3.1 early latent and 7.1% in late stages) [23].

For the cost-effectiveness analysis we estimated the incremental cost-effectiveness ratio (ICER), comparing the discounted cost and health outcomes obtained from the model for each of the strategies (1, 2 and 3) with strategy 0 as a reference. The coverage for both the entry point strategy and mass screening was 80%, the time period was 40 years, and a discount rate of 3% was applied according to the Chilean guidelines for cost-effectiveness analysis [24].

Finally, to take into account the uncertainty associated with relevant parameters (see Table A2.2 in Appendix 2), a probabilistic analysis (1000 iterations) was performed. This analysis used ranges for the values according to the literature review, and statistical distribution based on a published cost-effectiveness analysis [25].