It has been done, as mentioned by other comments. My recollection is that aside from power & control, the hardest problem is clotting. The natural heart apparently causes the blood to flow in a way that there is no pooling or stagnation, whereas almost any fixed-shape chamber apparently has locations where the fluid will stagnate, and with blood, that will cause clots in a very short time. When those clots get loose, they can then go to the lungs and cause a pulmonary embolism, or to the brain and cause a stroke, both of which are very bad and often fatal. So, getting a mechanism that won't do that even once in years of continuous operation is ... nontrivial.
EDIT - this is what I recall reading, but I'm not a biomed, I'd like to see a more detailed description from someone in the field.