A trip to the mountains despite a heart condition?

Cardiologists are in agreement that generally exercise in the mountains is a very good way to prevent or reduce the occurrence of cardiovascular diseases. Nevertheless what about those people who have a pre-existing cardiovascular condition? Under what circumstances is it safe for them to reside or holiday in high mountainous regions, and what rules should they apply to their conduct whilst there?