I've assisted in six esophageal resections, all of which were free of complications. 如果这个句子逗号改为分号,which就得改为them. 人称代词them显然指代six esophageal resections。all of them/which中,of表示部分与整体关系,如one of them, some of them, most of them, all of them. of介词短语为定语,中心词是为all. 由于二个分句之间为逗号,说明二个分句不是并列关系,而是主从关系,所以用关系代词which替换人称代词them, 就得到你的句子。