An ECG machine is available in hospital to test for problems with the electrical activity of human heart. The heart disorders that can be detected include:
Abnormal heart rhythms. If the heart rate is very fast, very slow, or irregular. There are various types of irregular heart rhythm with characteristic ECG patterns.
A heart attack (myocardial infarction) and if it was recent or some time ago. A heart attack causes damage to heart muscle and it heals with scar tissue. These can be detected by abnormal ECG patterns.
An enlarged heart. Basically, this causes bigger impulses than normal.