Most federal penitentiaries have an intake process for inmates. An assessment is made of all inmates and they are directed to one or another prison depending on their security risk and their program needs.
Have you heard of the Regional Mental Health Centre, in Quebec?