New York is set to require mental health discharge planning for inmates who received treatment in prison.
A new law taking effect at the end of February says they will also get an appointment with a doctor who can prescribe interim medications.
Inmates who refused treatment in prison may also get discharge planning and an appointment.
Legislative sponsors say patients treated in prison should not be put at risk in the community for lack of care.
They noted that a mentally ill ex-inmate stabbed two children in a Brooklyn elevator, killing a six-year-old, on June 1. That was only nine days after being released from prison without medications or a doctor.