Cardiac replacement was a type of surgical procedure in which an individual's heart was removed and replaced with an artificial organ.
Initially a very dangerous procedure with a poor prognosis for long term survival, by the 24th century the operation had become common-place with a very low mortality rate. Following recovery individuals were able to resume completely normal lives. However some early 24th century artificial hearts were defective and themselves required replacement. Any competent medical team could perform the procedure. ({e|TNG|Samaritan Snare}}). Artificial hearts were custom made by scanning the heart and reviewing medical records. (DS9 novels: Warpath, Fearful Symmetry)
After being stabbed through the heart by a Nausicaan during a bar brawl, Starfleet surgeons were forced to replace Jean-Luc Picard's heart through a cardiac replacement procedure. By 2365, the heart had become defective, forcing Picard to undergo a second cardiac replacement procedure. (TNG episode: "Samaritan Snare")
The Ferengi Ishka suffered a heart attack in 2374 and Doctor Julian Bashir was required to perform a cardiac replacement procedure on her to replace her defective heart. (DS9 episode: "Profit and Lace")
When Captain Kira Nerys was attached by the Jem'Hadar observer Taran'atar, the damage to her heart was so severe that Dr. Bashir was forced to use a cardiac replacement procedure to replace Kira's heart. (DS9 novels: Warpath, Fearful Symmetry)