If the machines and the instruments are keeping the heart beating and the blood circulating, then it is permissible to disconnect them. If they are helping the heart in such a way that it would continue to beat when the machines are disconnected â€“ although with difficulties and weakness â€“ then it is not permissible to disconnect the machines.
It is not obligatory to continue treating the patient in the first case and it is obligatory in the second case.
It is not permissible in such a case if the meat was taken from non-Muslims in a country where non-Muslims are the majority. However, if the meat was taken from a Muslim - even in such a country - and a Muslim claims that it is slaughtered correctly in accordance to Islam then it is permissible to consume it if he finds it probable that the Muslim is saying the truth.