Igros Moshe (YD III #132) The definition of when a person is dead is stated explicitly in the gemora (Yoma 85a) in the case where a person is buried under a pile of rubble. It says he can be dug out even on Shabbos and then his nostrils are examined to determine if he is still breathing. Rambam and Shulchan Aruch rule that if breathing is not detected he is considered dead. Thus we determine death by the absence of breathing. Even if the breathing is very slight he is considered alive. This can readily be determined with the aid of a feather placed near the nostrils. If the feather or a small piece of paper doesn’t move at all, he is presumed dead. Nevertheless he should be examined a number of times as I have explained previously to ensure he hasn’t just fainted because it is impossible to live without breathing. This test is valid only if the person is under constant watching. However since this is not realistic and it is possible he regained his strength a bit and was able to briefly get a few weak breathes it is impossible to properly determine death except by repeated testing. If these tests reveal there is no breathing at all than that is a sign the person is dead. This is more fully discussed by the Chasam Sofer. This is also relevant with the typical sick person who is close to dying, but is not dependent on a respirator. However there are many sick people who can not breathe without a respirator. Thus it is possible with a respirator to continue breathing even after death and these people are not considered alive. If it is not clear that he is alive from other indicators e.,g. he doesn’t respond even if stabbed with a needle such as being in a state known as a coma. Then as long as the respirator is working it is prohibited to remove it from his mouth because he might be alive and by the removal he is being killed. However when the respirator stops working for example when the oxygen tanks are depleted, it is not required to put him back on the respirator when it starts working for a period of 15 minutes. If he is no longer alive as seen by the absence of breathing then it means he has died. IKn contrast if he is living as can be seen from the fact that he is breathing even without the respirator even if it is with difficulty and interruptions then he should be returned to the respirator immediately. This should be done a number of times until his condition improves or it is apparent that he can’t breathe on his own and is dead.
You say that now there is a test that allows the great doctors to determine by the injection of a special fluid into the veins that can show whether the connection of the body to the brain has been stopped If this fluid does not go to the brain it is clear that the brain is no longer attached to the body and it also indicates the brain is already completely rotted and the patient is considered functionally decapitated. If this is true then we should be strict with those, especially if they don’t feel anything anymore and don’t respond if stuck with a needle and they no longer can breathe independently .to not declare them dead without doing this test. . That means if we see that the brain is still connected to the body even though they can’t breathe without a respirator to keep them on the respirator even for a long time. Thus we should say that the test of independent breathing should be done in conjunction with this test to determine death. This might be relevant also for those who have taken an overdose of sleeping pills or other medication. Until all the medication gets out of the body they can not breathe. In such cases the respirator needs to be connected for longer periods in order to clarify if they are dead since death can not be determined readily as long as the drugs remain in the body.