After he was discharged, he chased a woman into an apartment building on E. 18th St. and First Ave., where he was captured on surveillance camera after the woman managed to lock him out, authorities said.