The heart of a normal human body has been beating rhythmically. There is a command system to direct the heart to beat regularly. The starting point of this command system is the sinoatrial node, which transmits its exciting impulses step by step (sinoatrial node-internodal bundle-atrioventricular node-left and right bundle branches-Purkinje fibers) until each muscle fiber forms the heartbeat of the heart. Because the rhythm of exciting impulse comes from sinoatrial node, it is called sinus rhythm. Sinus arrhythmia, junctional rhythm, atrial premature beats, ventricular premature beats, etc. May occur during illness. So the doctor was right when he said "the heart is fine".
The pain you're talking about is not pain in the heart, but intercostal neuralgia caused by inhalation.