I should have added, but didn't for brevity, that a lawyer is appointed by the state for the person incarcerated by a mental institution. Public defenders, in many cases, are well known for giving little care to their clients plight. In our case she was in need of treatment. What was disturbing however was that the lawyer appointed to her didn't even care to show up in court on the appointed date, even if he had he would have done exactly what the treatment facility wanted, mental health being outside of his repertoire, and she could have been held indefinitely.
In no way was she abused (just propositioned by a now wrote up staff member), and the facility let her out early, but what is she hadn't had someone on her side? Someone to visit, inquire of staff, to be there even if she had been drugged out of her mind?
Basically, unless rich, one has to trust the mental healthy industry to make the right calls and tell the truth. A very scary proposition. I see now way out of it. It is where the famous horror stories of woman locked away and driven insane come from (some, if few, true).