The expert panel supplied the research team with 26 documents and 18 articles were identified via unstructured searching (Fig. 2). A further 3435 citations were identified via database searching and 663 through grey literature searching. After duplicates were removed, 3381 titles and abstracts were screened, and 457 articles remained for full-text review. 11 documents from the expert panel and 9 articles from the unstructured search (Additional file 2) were used in framework, process, and provisional programme theory development. 29 empirical articles (Table 3) were used in programme theory refinement. These were supplemented with a further 11 articles identified through purposive unstructured searching (Additional file 3).

Fig. 2 Flow diagram detailing the search results of the rapid-realist review. Diagram design guided by recommendations made by the PRISMA Group (2009) [80] Full size image

Table 3 Characteristics of phase 2 studies, summarising first author/year, country, prison, disease, study design, method of data collection, aims of research, relevance, and quality assessment score (acceptable: b, good: c, excellent: d Full size table

Process theory and contextual framework

Reports identified by the expert panel were used to develop a generic process for opt-out testing (Additional file 4). A range of potential outcomes of public health interest were identified. The research team focused on the proportion of intake offered a test and the proportion offered that accepted testing, as these outcomes were highlighted by the Steering Group as key targets for the opt-out intervention [16, 27]. A framework was also developed, to aid the research team conceptualise the sphere of contextual influences that could affect these outcomes (Fig. 3).

Fig. 3 The different spheres of context, influencing the reasoning process of two key actors involved in the opt-out test offer Full size image

Provisional programme theory

Using data from phase one, provisional programme theory was constructed around the two outcomes selected (Fig. 4).

Fig. 4 Provisional programme theory developed using articles acquired from phase one Full size image

It was hypothesised that the timing of the test offer would influence the proportion of prisoners offered a test [28,29,30].

In terms of test uptake, educational information covering transmission risk, symptoms, and the importance of testing was anticipated to play a priming role during the test offer, helping prisoners more accurately interpret their risk of infection and assess costs and benefits of testing [31].

The way testing was offered was also expected to influence uptake. Offering testing in an opt-out manner is not be the norm for health workers, therefore training was considered essential to ensure test offers were opt-out in practice (Fig. 4) [32].

Finally, the unstructured searches carried out during phase one, found literature that suggested the Default Effect, a component of Nudge Theory, underpinned opt-out [18, 25]. The Default Effect suggests that for any choice or action, there is a tendency for individuals to stick with the default option [4]. By aligning the default option of a BBV testing programme with the public health objective (prisoner takes a test), opt-out was hypothesised to encourage test uptake in a variety of ways [4, 33, 34]:

1. Switching cost: Individuals incur a cost (e.g. having to justify decision or fill out a form) when opting-out of testing. If this cost exceeds the benefit of opting out, then it is irrational for the individual to do so [35]. 2. Loss aversion: Individuals tend to weight losses more heavily against equivalent gains. By making testing the default option, loss of benefits provided by testing are weighted more heavily against potential gains of not testing [36]. 3. Cognitive effort: Making an active decision requires cognitive effort. By making testing the default option, opt-out testing exploits individuals bias not to expend this effort, encouraging those who do not exhibit a strong preference to test [35]. 4. Recommendation: Making testing the default option, acts as an implicit or inferred recommendation to test [4, 36].

Refined programme theory

6 CMOcs for the proportion offered testing and 7 for test uptake are presented. Additional file 5 contains the full list of CMOcs developed from the RRR.

Under each CMOc, background information is provided. The configuration is then presented in italics, with components explicitly highlighted: C = context, MR = mechanism resource, MRE = mechanism reasoning response and O = outcome. Exemplifying data, where available, is then presented, providing the reader access to empirical evidence that contributed to theory development and refinement. As reported in other realist reviews, empirical evidence rarely presented a clear description of all three constituents, making abductive reasoning critical to ensure complete CMOc articulation.

Proportion offered testing

There was significant variation in the proportion offered testing between different prison-based opt-out programmes, ranging from 13 to 100% [13, 37,38,39,40,41,42,43]. Failure to offer testing was an implementation issue, operating at various conceptual levels of prison context (Fig. 3).

CMOc 1: Delayed test offer

The timing of the test offer was a salient factor affecting the proportion offered testing [5, 11, 13, 39, 42,43,44,45,46,47]. When prisoners first arrive, all new intake usually undergo a first night health check. Seven studies reported opt-out testing conducted during this process [8, 37, 38, 45, 46, 48]. Seven other articles reported testing taking place anywhere between 3 and 14 days after first reception, often during a secondary health check [39, 40, 44, 49,50,51,52]. Testing at a secondary clinic often occurred because of a perceived lack of time during the first night or because the first night health check was reserved for dealing with urgent healthcare problems that required immediate intervention [39, 40, 44, 49,50,51,52].

In a prison that has a rapid population turn-over (C), a programme mandated delay in engaging intake with an opt-out test offer (MR) reduces the proportion of intake offered a test (O), as some individuals have already been released or transferred (C).

This was exemplified during Beckwith’s et al. (2012) evaluation of rapid-HIV testing within three urban jails. A 3–4 day delay in the Baltimore Department of Corrections, resulted in a 13% test offer proportion compared to 100 and 89% respectively in the Philadelphia Prison System and District of Columbia Department of Corrections, which offered testing during a first night health check [53].

CMOc 2: Early testing and capacity to consent

The desirability of first night testing was tempered by the need for informed consent [11, 37, 42, 43, 47, 54].

A higher proportion of prisoner’s lack capacity to consent on the first night (e.g. undergoing substance abuse withdrawal) (C). As opt-out testing requires informed consent (C), health workers that identify this lack of capacity (MR) and view it as important (MRE) will not offer testing (O).

This was highlighted in two prospective control trials conducted in US jails, which found 10–11% of new intake were not medically competent to be tested immediately upon entrance, limiting the utility of first night testing [42, 43]. This dropped to 0–4% when testing took place 1–7 days after first reception [42, 43].

CMOc 3: Prioritisation of security and prison processes

Prison officers were important gatekeepers, as they tended to dictate prisoner movement within the prison environment [44,45,46, 51, 55].

Prison officers have a challenging role, particularly when budget cuts have strained the workforce (C). Opt-out testing often requires prison officers to collect prisoners, bring them to clinic, and supervise them (MR). Officers prioritise security and prison processes over escorting and monitoring prisoners at clinic (MRE), meaning prisoners frequently do not arrive, or are not allowed to be at the clinic, to be offered testing (O).

This process of prioritisation was demonstrated in quotes from qualitative work with prison officers: “the issue with the health should be considered, if its’ not life threatening.. .then security should be the priority” [51]. This was also highlighted by health workers: “I think you can’t get away from the fact that we’re entirely dependent on prison officers to deliver healthcare services.. .We’ve lost, since I’ve been here, 25% of prison officers.. .Who would have thought that ‘do not attends’ are a massive problem in prison?” [30].

CMOc 4: Provider capacity to run clinics

Stretched health teams meant that testing clinics could not be properly run, resulting in prisoners being missed [5, 11, 47, 56].

Prisons are a demanding place to work (high burden of mental illness, physical morbidity, and regular medical emergencies) (C) and budget deficits result in health staff cuts (C). These working conditions reduce the capacity of health staff (MR), forcing them to prioritise certain activities (MRE), such as dealing with urgent conditions or emergencies, resulting in testing clinics being delayed or cancelled and prisoners not offered a test (O).

Insufficient staffing was most frequently reported in response to the question “what other barriers did you encounter when trying to complete an HIV test.. .at intake?”, delivered to providers in a New York City Jail [47].

CMOc 5: Refusal to attend clinic

Prisoner agency also acted as a barrier to offering testing under certain conditions [13, 44, 45].

When testing is conducted concurrently with other prison activities (C), attendance at clinic becomes an opportunity cost for the prisoner (MR). If health is a lower priority, relative to the other activity (MRE), the prisoner will not attend clinic (O).

Programme stakeholders reported prisoners refusing to come to clinic because they were sleeping, watching TV, playing sport, and attending gym [13, 44, 45].

CMOc 6: Rebooking prisoners

When prisoners failed to attend clinic or when clinics were cancelled, health workers were required to rapidly rebook them for testing [5, 11, 47, 56].

Budget deficits have led to health staff cuts (C). Stretched health workers (C) that are required to re-book prisoners (MR), prioritise medical emergencies and conducting other tasks that require immediate attention (MRE), further delaying the test offer (O). Overworked health staff (C) may also forget to rebook a prisoner (MRE), delaying the realisation of the test offer (O). In high-turnover prison settings (C), a failure to rapidly rebook a prisoner (MR), reduces the proportion of people offered testing (O), as individuals may be released or transferred by the time they are rebooked (C).

Test uptake

The proportion of prisoners that accept a test under opt-out varied from 22 to 98% [13, 37,38,39,40,41,42,43]. There was a notable lack of switching costs, with most programmes simply requiring prisoners to verbally opt-out [8, 41, 48, 53]. Several costs and gains associated with opt-out BBV testing within a prison context were also identified. These were activated and modified depending on the presence of certain programme resources.

CMOc 1: Confidentiality and stigma (loss aversion)

Confidentiality was a key resource for opt-out testing programmes, as the enclosed environment of prison amplifies fear of infectious disease amongst prisoners and staff [51, 57, 58].

BBVs are stigmatised within the prison context (C). Maintenance of confidentiality (MR) is therefore crucial, as prisoners will feel safe (MRE) to share personal information (O). If a prisoner distrusts prison healthcare’s ability to maintain confidentiality (MR), they may fear stigma (MRE), encouraging opt-out (O).

Officers view infectious prisoners as a personal risk and may attempt to elicit confidential information from health staff [51, 58]. The close contact between staff and prisoners also means information can be spread, both within and between staff and prisoner groups: “Would I tell somebody else, a close friend, if I knew they were in contact? Possibly yeah?” (prison officer) [51]. Breaches in auditory and visual confidentiality can also occur when conducting testing, as a result of the confined environment, security requirements, and the increasing reliance on prisoners for the maintenance of the prison environment [39, 47, 51, 57,58,59,60,61].

CMOc 2: Coping with a positive diagnosis (loss aversion)

Incarceration is stressful and the potential diagnosis of an infectious disease, often perceived as terminal, can be daunting [13, 38, 43, 54, 59, 60, 62,63,64].

BBVs are a situational concern for many people within prison (C). The provision of supportive information (e.g. treatment options, dispelling myths around prognosis, and psychosocial support) (MR), reassures a prisoner about coping if they test positive (MRE), encouraging test uptake (O). Failure to provide supportive information (MR) can leave people in prison feeling unable to cope with the perceived burden associated with a positive diagnosis (treatment, stigma, psychological distress, lifestyle changes) (MRE), encouraging opt-out (O).

This was captured in quotes from health staff: “Some clients will refuse to take the test out of fear of a positive result” [38] and prisoners: “Er, I don’t know really, [pause] er, I don’t really know, I mean, I think like I say, I think people are just frightened ye na. People are frightened to get the test ye na, thinking that it could be a killer not knowing what, not knowing what it actually is, what it actually does to you, I mean?” [60].

CMOc 3: Fear of an invasive procedure (loss aversion)

A fear of needles was frequently highlighted as a justification for opt-out [12, 13, 40,41,42, 57, 64,65,66].

A proportion of prisoner’s fear needles (C). When testing is conducted using a venous sample method (MR), prisoners that are uncomfortable with the method of blood acquisition (MRE) may opt-out (O).

This was captured in quotes from health workers: “.. . I would say nine out of ten people say ‘I hate needles’ and tense up and freak out, and some people are really upset by it” and “They were definitely more compliant with it [oral testing]; they’re more willing to get it done as opposed to getting their blood drawn” [41]. Less invasive sample measures, such as DBST or oral testing, may therefore help to minimise discomfort as a barrier to testing.

CMOc 4: Institutional recommendations and trust (loss aversion/recommendation)

Making testing the default option acts as an implicit recommendation to test. Positive encouragement from staff can also reinforce this message [44, 45].

Recommendations to test in circumstances of trust (C) provide an institutional social pressure (MR) that encourages an individual to comply with the perceived positive action (MRE), encouraging test uptake (O). However, institutional distrust is prevalent in prison (C). Institutional social pressure (MR) can be perceived as a coercive process of surveillance, triggering resistance from the individual (MRE) and encouraging opt-out (O) [59, 64, 67].

CMOc 5: Personal interpretation of risk (loss aversion)

Educational information on BBVs was an important resource for opt-out programmes [13, 40, 47, 48, 57, 60, 63, 68].

Misconceptions around BBVs are common amongst prisoners (C). Prisoners that have been informed about modes of transmission and symptoms of the disease (MR) are empowered (MRE) to accurately interpret their risk of infection (O). For prisoners that self-identify as “at risk” (C), testing can be an opportunity to confirm serostatus (MR), allowing the individual to either confront infection (MRE) or be reassured by a negative result (MRE), encouraging test uptake (O).

In the absence of supportive resources, people in prison that see themselves as “at risk” may feel unable to cope and instead opt-out (see CMOc 2 in this section) [13, 38, 60].

Prisoners that interpret themselves as low risk (C), but that face no other barriers to testing (MR), may still seek reassurance (MRE), encouraging test uptake (O). Prisoners that face other barriers to test uptake (e.g. fears around confidentiality or dislike of test method) (MR), may view testing as an unnecessary burden (MRE) and opt-out of testing (O).

A range of articles reported issues with the delivery of educational information, with this stage of testing often being truncated [13, 42, 43, 45,46,47, 54, 60]. In the absence of educational information, people in prison often inaccurately interpreted themselves as low risk, due to a lack of symptoms, or because they had tested previously [13, 37, 38, 40, 42,43,44, 46, 50].

CMOc 6: Defaults and capacity to consent (cognitive effort)

New prisoners often suffer from substance withdrawal, have untreated mental health conditions, are physically exhausted, and emotionally overwhelmed [11, 42, 43]. By making testing the default option and offering testing soon after prison entrance, individuals may be tested without understanding what it is they are testing for [8, 69].

New prisoners frequently lack capacity to provide informed consent (C). If the health worker fails to identify this and proceeds with an opt-out test offer (MR), these individuals may misunderstand what is taking place (MRE) or be unable to make an active decision to opt-out (MRE), instead appearing to comply with testing (O).

Grodensky et al. (2016) found that out of 871 patients undergoing an opt-out HIV test, 103 were not aware of being tested, 94 did not want to be tested, and 30 were not aware they were tested and did not want a test.

CMOc 7: Opt-out fidelity

The distinction between eliciting consent in an opt-in, opt-out, or mandatory manner is nuanced and difficult to operationalise in practice [5, 8, 48, 70]. The review highlighted variation in the delivery of an opt-out test, which may partially account for variation in test uptake.

If programme implementers misinterpret how to deliver an opt-out test (C), training and scripts provided to health workers (MR) will encourage them to comply (MRE) with the delivery of either an opt-in (O) or mandatory (O) test offer. An opt-out test offer is not the norm (C). When health workers have little training, and no standard script (MR), the meaning of opt-out may be misinterpreted (MRE) resulting in either opt-in (O) or mandatory (O) test offers. The way testing is offered, when there is no standard script (MR), can also morph with each encounter, with rapport (C), situational distractions (C) and fatigue (C) all potentially influencing test delivery (O).

A survey conducted by Rosen et al. (2015) as part of an opt-out testing programme that had a 95% test uptake [8, 48], found that less than 40% of prisoners identified testing as voluntary, which was attributed to an ambiguous consent process and widespread failure of nurses to mention a prisoner’s right to decline the test [8].