The primary endpoint was a composite of readmission for recurrent gallstone-related complications ( pancreatitis , cholangitis , cholecystitis , choledocholithiasis needing endoscopic intervention , or gallstone colic ) or mortality within 6 months after randomisation , analysed by intention to treat .