She's a ward of the state, deemed incapable of making her own decisions. Her mother isn't her legal guardian, and her doctors have no authority outside expressing their medical judgement. Really, this was so clear-cut, it shouldn't have even gone to court. The State's authority supersedes everyone else's.
This, by they way...state authority exercised for the health of the community? Fascism.