Salam everyone
Regarding the open heart-valve surgery, i would advise that the individual be thoroughly scrutinized by his cardiologist before he is considered fit to dive. There are two main issues for this kind of surgery, mainly anti-coagulation, and risk of valve leakage.
For the first issue, patients with valve replacement done will need lifelong antiocoagulation meds to prevent blood from clotting, and this is especially so for prosthetic heart valves. And it is a known fact that divers are exposed to minor trauma or even, barotrauma while diving, and this predisposes to bleeding. With anticoagulation meds, this risk becomes greater, due to the thinning effect on the blood by the medication. A diver needs to be aware of this increased risk.
Risk of valve leakage, on the other hand, occurs due to the high-output stresses put upon the prosthetic valves. Because diving is considered a strenuous physical activity, it will cause further stress to the new valve, and because of higher pressure and turbulence (due to increased cardiac output) underwater, this may in turn case the valve to leak (regurgitation).
My advise is that patients who have just underwent open-heart valve surgery, to have a recuperating period for at least a year before thinking of diving again. Even so, he/she should firstly undergo a thorough cardiology examination which involves a exercise stress test to determine the current state of cardiac function.
My two cents' worth...