A 29-year-old woman at 25 weeks of pregnancy presents with right flank pain, rigors and vomiting. Her temperature is 39.2°C, pulse 132/min and blood pressure 92/58 mmHg; urine contains leukocytes and bacteria. Ultrasound shows right hydronephrosis with a 7-mm proximal ureteric calculus. After blood cultures and intravenous antibiotics are commenced, which one of the following is the most appropriate next step?