BackgroundNew York City Health and Hospitals Corporation (HHC) is the largest municipal health-care system in the USA, comprising 11 acute-care hospitals and six community clinics. Since 2005, HHC has made HIV testing routine, with the goal of reducing incidence and late-stage diagnosis. In this analysis we aimed to: identify proportional markers to signal that a facility's HIV screening efforts had reached stable, routine levels; and identify a marker that, if maintained, would suggest programme goals would be achieved. MethodsSince 2005, 17 HHC facilities have submitted monthly HIV testing reports. We analysed data from 2006–12 to identify patterns in newly diagnosed patients and to assess the rate of concurrent HIV/AIDS diagnoses. Time trends and associations between the reach of screening and screening outcomes were explored with scattergrams and lowess plots, and we used linear and piecewise-linear mixed effects regression models of these outcomes over time. A linear spline of calendar year with knots at 2008 was the fixed effect, with random intercepts at the facility level. To test the association of screening reach with yield of new HIV diagnoses, we estimated mixed effects piecewise linear models of new HIV diagnosis and concurrent HIV/AIDS diagnosis with a linear spline of screening reach with join points at 10% and 20% as fixed effects, and facility-level random intercepts. FindingsBetween 2006 and 2012, 7 381 847 patients aged 13 years and older were seen at 17 HHC facilities. 1 157 830 unique patients were tested, and 11 781 HIV-positive diagnoses were made, 4963 of them new. Rates of concurrent HIV/AIDS diagnosis for newly diagnosed patients went from 32·26% (190 of 589) in 2006, to 25·27% (94 of 372) in 2012. The proportion of age-eligible patients who were screened went from 9·41% (92 123 of 979 376) in 2006, to 18·03% (198 938 of 1 103 079) in 2012. Facility annual proportions ranged from 5·49% (5505 of 100 248) to 39·23% (3909 of 9964), with nine facilities annually screening 20% or more by 2012. In sites with higher proportions of age-eligible population screened, the proportion of tests leading to new HIV diagnoses declined in a curvilinear fashion. We found that when more than 20% are screened, the yield of new HIV diagnoses levels off at approximately 0·3%. The proportion of newly identified patients with a concurrent HIV/AIDS diagnosis declined almost linearly up to a screening proportion of 40%, at which point the predicted and observed rate of concurrent AIDS diagnosis is zero. InterpretationRoutine HIV screening within health-care systems should see a significant decline in undiagnosed HIV patients if they annually reach 20% of their age-eligible patient population. The goal of reaching patients early in their diagnosis and avoiding concurrent HIV/AIDS diagnoses would appear to be reached through routine screening when 40% of age-eligible patients are screened annually. Screening efforts must consider prevalence when interpreting results for other areas; the prevalence of HIV infection in New York City was 1·36% in 2012. The strength of these results related to concurrent HIV/AIDS rates are limited by the number of facilities reaching rates above 20%. FundingFunding for HIV testing expansion and evaluation was provided by continuing support from the New York City Council and through grants including from New York State Health Foundation and a Gilead Sciences FOCUS Award.