As someone who has gone through similar experience with a family member, there are so many things wrong with how she was just "let go" like that from that facility. Honestly, the author is just writing what he thinks the system and law is like.
I would overlook the "plot holes" if this story is at least semi-comedic but since the story is trying to take itself seriously, it just make itself terrible with all those "holes".