Surgery

A 45 years old male presented with recurrent attacks of cholangitis. MRCP and ERCP findings are given below. What is the treatment of choice for this condition?