If you only said 'I have been to a doctor to check my heart,' that would be fine. You're using the present perfect to tie yourself to the current time. But when you use that phrase 'a long time ago, you are putting the action in the completed past, so the past tense is necessary: "I went to a doctor ..." Similarly, fo