Welcome to the forum and thanks for your question. I hope you have recovered well from your heart attack.
The HIV blood tests are among the most accurate diagnostic tests ever developed, for any medical condition. They are very robust and are not affected by any other health condition, including blood transfusion. In theory they may be affected by life threatening conditions like terminal cancer or potent chemotherapy, but even here, there are few if any actual cases of delayed HIV test positivity.
And for what it's worth, you needn't have waited (and maybe worried) for 5 months. The modern HIV tests are definitive after 4-8 weeks, depending on the specific tests (or comination of tests) that are done. For more detail on this, see
http://www.medhelp.org/posts/show/1704700 .
I hope this has been helpful. Best regards-- HHH, MD