Assessing missed opportunities for HIV testing in medical settings