On the one hand, I could see arguing that a surgeon's error is independent of the patient. To the extend that's true, it would be important to count errors whether or not the patient is close to death.
But on the other hand, maybe the surgeon is performing a risky, error-prone procedure precisely because the patient is close to death. To the extent that's true, it might be misleading to compare this surgeon's record with someone else's.
I wonder if some of the resistance we hear from doctors about measuring/enforcing these things, is because of difficulties like this that are obvious to them and really screw them over?