In situ diagnosis and simultaneous treatment of cardiac diseases using a single-device platform