The fetal heartbeat should appear between 5 and 6 weeks of pregnancy, so at 7 weeks it should be possible to detect the fetal heartbeat without problems by Doppler ultrasound.
There is a circumstance that could explain a delay in the detection of the heartbeat. This would occur when the actual time of pregnancy is less than that calculated on the basis of the last menstrual period. Ovulation is normally calculated to occur mid-cycle in women with regular cycles between 25 and 35 days. However, especially in women with irregular cycles, ovulation may be delayed, so that pregnancy would occur later than calculated. Therefore, if we do an ultrasound at 7 weeks of pregnancy and we observe an embryo of smaller size and without a heartbeat, the most prudent thing to do would be to wait a while and repeat the ultrasound to evaluate if the embryo has grown and has developed a heartbeat.
Another situation to take into account would be the case of women with obesity in which the visualization of the embryo can be more difficult due to the interposition of fat. In these women it is sometimes necessary to wait until the size of the embryo is somewhat larger to be able to detect the fetal heartbeat clearly.
However, if we are visualizing a 7-week embryo, with a corresponding size (about 8mm) and it does not have a fetal heartbeat, it is most likely that we are dealing with a miscarriage.