system
Given the following post, respond as if you're commenting on Reddit:
human
How do they keep patients alive during heart surgery when they switch out the the heart for the new one?
gpt
The surgeon sets up Cannulas (tubes) in both the "in" and "out" of the heart, usually the vena cava and aorta (although the sites can vary).

These tubes are connected to an extracorporeal circulation machine that does many things:

* Circulate the blood as a mechanical pump would. It's "smooth" though, there is no pumping like a heart.
* Oxygenate the blood via a membrane that allows gas to pass through. Recent technologies are pretty efficient.
* Keep it at the required temperature

The patient is also administered anticoagulant medication (usually heparin) to prevent any blood clot from forming in the machine.