The problem with that is you cannot put 'finite' sentences upon a patient's hospital stay.
We just saw that with the stabbings of two young children by their grandmother---a woman who had been recently released by a mental hospital:
A California woman suspected of fatally stabbing her 18-month-old granddaughter and wounding her daughter and another young granddaughter spent nearly a decade in a state psychiatric hospital and outpatient treatment program
before a jury ruled in 2015 that her sanity had been restored.
Nicole Darrington-Clark, 43, was sent to the psychiatric facility after being found not guilty by reason of insanity in the stabbing of her 14-year-old son and throwing of her 10-year-old daughter out of a moving minivan in 2005.
The daughter was the same one who was stabbed Monday, according to police.
Darrington-Clark was transferred to an outpatient facility several years later, and two years ago a Los Angeles County Superior Court jury found that her sanity had been restored, which meant she no longer required court-mandated psychiatric treatment.
http://abcnews.go.com/US/wireStory/police-seek-grandma-suspected-stabbings-killed-baby-47857758
So this woman did horrible things to her children in an attempt to kill them, was sent to a psych hospital, and then 10 yrs later, she is out and she goes and kills the grand baby and tried to kill the rest of the family too.
So sending someone to the psych ward is not always that safe an option. imo