A doctor may refer you for an electrocardiogram (ECG) for a number of heart conditions. The procedure is often done in the doctor's office or a hospital room. However, there are portable and wearable ECG devices that monitor for days or even weeks. ECG machines are common medical equipment standard in ambulances and operating rooms. Even some smart watches and other personal devices have ECG capabilities.