A doctor breached three codes after a botched surgery resulted in a man being left with one lung, a new report says.