Detecting physical illness in patients with mental disorders