Patients undergoing coronary artery bypass grafting , valve replacement surgery , or both were randomly assigned to receive either standard 1-g dosing with vancomycin before and after cardiopulmonary bypass or a single weight-based 20-mg/kg dose before surgery .