If it were dementia, she wouldn't have been institutionalized, she'd be in an extended care facility. Dementia isn't usually treated as solely a mental health condition--more like a physical one.
More than likely, its something else.
Her being locked away in lieu of a punishment makes more sense--- often, people are not just institutionalized because they could hurt themselves, but because they could hurt *others*, which she obviously did. She will get treatment, and will *not* be released until she is no longer a harm to herself *or others*. Depending on what's wrong? That could be a LONG time. And institutions in some ways are just as bad as being imprisoned-- minus the UFIA. (Yes, a Fark reference. ) I know someone who simply spent a few days on the mental health wing of the hospital-- and was heartily glad to leave after all the screaming and distress of others she was subjected to....