Legal challenges in some areas have resulted in supreme court decisions that a person does not have to agree with a psychiatrists characterization of the issues as constituting an "illness", nor agree with a psychiatrists conviction in medication, but only recognize the issues and the information about treatment options.Proxy consent (also known as surrogate or substituted decision-making) may be transferred to a personal representative, a family member, or a legally appointed guardian. Moreover, patients may be able to make, when they are considered well, an advance directive stipulating how they wish to be treated should they be deemed to lack mental capacity in the future. The right to supported decision-making, where a person is helped to understand and choose treatment options before they can be declared to lack capacity, may also be included in the legislation. There should at the very least be shared decision-making as far as possible. Involuntary treatment laws are increasingly extended to those living in the community, for example outpatient commitment laws (known by different names) are used in New Zealand, Australia, the United Kingdom, and most of the United States. The World Health Organization reports that in many instances national mental health legislation takes away the rights of persons with mental disorders rather than protecting rights, and is often outdated. In 1991, the United Nations adopted the Principles for the Protection of Persons with Mental Illness and the Improvement of Mental Health Care, which established minimum human rights standards of practice in the mental health field.
In 2006, the UN formally agreed the Convention on the Rights of Persons with Disabilities to protect and enhance the rights and opportunities of disabled people, including those with psychosocial disabilities.The term insanity, sometimes used colloquially as a synonym for mental illness, is often used technically as a legal term. The insanity defense may be used in a legal trial (known as the mental disorder defence in some countries). Perception and discrimination
Stigma
The social stigma associated with mental disorders is a widespread problem. The US Surgeon General stated in 1999 that: "Powerful and pervasive, stigma prevents people from acknowledging their own mental health problems, much less disclosing them to others." Additionally, researcher Wulf Rössler in 2016, in his article, "The Stigma of Mental Disorders" stated 

"For millennia, society did not treat persons suffering from depression, autism, schizophrenia and other mental illnesses much better than slaves or criminals: they were imprisoned, tortured or killed". In the United States, racial and ethnic minorities are more likely to experience mental health disorders often due to low socioeconomic status, and discrimination.