I thought only organs of people dying in accidents are donated, and not someone's dying from an illness.
Most organs come from from people, usually braindead, who are definitely going to die, but you have days or at least hours before the body actually loses the fight. And even then the extraction process needs to be started quickly, because in the process of dieing the body will, as it's losing blood, ie. power and oxygen, one-by-one cut off blood flow from organs to try to keep the heart, lungs and brain alive. Most organs that have had their blood flow cut off by the body can't be transplanted, so extraction needs to happen before that point.
So that was probably the case here.