A 4-week-old male infant is admitted to the hospital for persistent projectile vomiting. He appears dehydrated and has a weight below the 10th percentile. Laboratory findings reveal hypokalemia, hypochloremia, and metabolic alkalosis. Abdominal ultrasound confirms hypertrophic pyloric stenosis.What is the next best step in the management of this patient?