Surgery

A 40-year-old man underwent laparoscopic cholecystectomy 2 years earlier. He remains asymptomatic until 1 week before admission, when he complains of RUQ pain and jaundice. He develops a fever and has several rigor attacks on the day of admission. An ultrasound confirms the presence of gallstones in the distal CBD. The patient is given antibiotics. Which of the following should be undertaken as the next step in therapy?