stop_when_n_at_dose function

Stop when there are n patients at a dose.