Where echocardiography assesses the structure and function of the heart, in contrast the electrocardiogram (ECG) assesses the electrical function and conduction system of the heart. This is a simple non-invasive. painless but very valuable test that can be performed in the rooms.