Competence involves being able to understand the consequences of receiving medical treatment, and not receiving it, and being able to make a decision based on that understanding.
The suspicion of cognitive impairment should prompt a thorough evaluation of competence and mental state.Various medical and psychiatric disorders produce cognitive disturbances that result in temporary or permanent incompetence. That incompetence will affect an individual's decision-making capacity and ability to give informed consent.
Treatment of incompetent people should be dictated by their best interests, advance directives, or substituted judgement.
Usually, an ethics committee and the patient's doctors will determine his best interests.
Advance directives are the durable power of attorney, a living will and perhaps orders for "do not resusitate". It is best to provide for these directives before the patient loses his capacity for making those decisions.
Substituted judgement is that made by the Conservator of the Person. It can be conferred by the court or determined by advance directive.
Often the medical profession is uncertain both as to the circumstances in which the guidance of the court can be sought in relation to ethical decisions regarding individual patients and the way to go about requesting such guidance.That is because quite often competent people can make imprudent or irrational decisions.
Therefore, if your 90 year old mother suddenly takes up with a handsome 50 yr old, begins to fix up his double-wide and plans a trip to Hawaii, she is not necessarily incompetent. It is just her "last hurrah".