Cause of decease is the main factor that will determine if an organ is fit for transplantation, this evaluation is done after live saving measures have been attempted unsuccessfully and the patient is declared brain dead, is preferred this way because during brain dead the organs still receive blood and therefore they can be preserved contrary to cardiac demise.
I hope you find this information useful and interesting! Good luck!