City police officers with specialized training will be able to refer anyone having a mental health or substance abuse crisis to a hospital or treatment facility rather than arrest them for minor crimes, according to federal court documents filed late Thursday.