Capacity for informed consent in psychiatric and general medical populations