In obese patients with type 2 diabetes , RYGB produces greater weight loss and sustained improvements in HbA1c and cardiometabolic risk factors compared with medical management , with emergent differences over 1 year .