accused was ordered to be transferred from jail to a mental health facility