A 12-year-old uncircumcised boy presents with difficulty ret…

A 12-year-old uncircumcised boy presents with difficulty retracting his foreskin and pain during urination. On examination, there is ballooning of the foreskin when voiding and signs of urinary obstruction. What is the most appropriate next step in the management of this patient?