The cardiostimulator was a Federation medical device used to restart a stopped heart.
In 2154, Doctor Phlox attempted to use cardiostimulators to save Major Hayes. Unfortunately, the Major's injuries were too extensive, and he died. (ENT: "Countdown")
Doctor Leonard McCoy used a portable version of the device aboard the USS Enterprise during an operation on Ambassador Sarek, after the power to sickbay had failed and the operating table's own cardiostimulator had ceased functioning. (TOS: "Journey to Babel")
In 2371, The Doctor used a cardiostimulator to revive Commander Chakotay after his bio-neural energy was displaced by the Komar. (VOY: "Cathexis")