Doctor attends traffic court while in surgery