(Courtesy of Chad Hayes/ )

The first time I really thought about my heart was when I was 23 years old. I was in the Navy and planning a career as a submarine officer. Just as I completed my nuclear power training, I was handed a one-page medical history form to complete — just to make sure I’d be okay driving their submarines around. I started checking “no” to every answer, just as you do, without paying much attention. And then one question grabbed me: “Have you ever lost consciousness or passed out?”

I had, in fact, passed out — twice that week. And several times the month before. I took the form home with me and talked to my wife about it. Although I hadn’t thought anything of it before I saw that question, I knew what checking “yes” would mean. When I turned it in the next day, my suspicion was confirmed: “Well, sir, looks like you won’t be driving submarines.”

And so began a long and stressful period of doctors’ visits and waiting. I fired my first two cardiologists, both of whom told me I needed a pacemaker. I was young and invincible. I routinely ran 10 miles or more for fun. A pacemaker just wasn’t going to happen. The third cardiologist tried three different medicines, one of which didn’t seem to work at all and the other two of which had intolerable side effects.

And despite numerous visits and a week on a portable monitor, nobody was ever able to capture one of my fainting episodes. One day, cardiologist No. 3 decided to admit me to the hospital to test for a heart rhythm problem called Brugada syndrome. The test involved giving me a medicine and repeated EKGs to see if anything changed. It didn’t.

I spent the whole day lying in a hospital bed, just waiting. I hate waiting. My wife was at home with our then-2-year-old daughter, who had gone to bed by the time they sent me home. I wasn’t allowed to eat while I was being tested, and I was starving. One of my favorite restaurants was on my way home, and it was closing in half an hour. When the nurse finally got discharge orders from the cardiologist, she came in to take out my IV, which her predecessor had been thoughtful enough to secure with eight layers of tape.

And then I heard a noise and opened my eyes to a room full of chaos. Nurses everywhere. A crash cart — used for emergency resuscitations. Someone holding paddles. I tried to speak but couldn’t. And then I got it out: “Please don’t.”

The room full of nurses stopped moving. The one with the paddles slowly put them down. Another said: “Are you okay? I’ve never seen that before.”

I was confused. “I just passed out. I’m fine. What’s going on?” The nurse formerly known as “the one with the paddles” ran out of the room and came back with a printout of my heart rhythm. It showed what in the medical field is called asystole — basically, I had flat-lined.

Maybe I wasn’t fine

Apparently, when I passed out, my heart stopped beating for about 13 seconds. Weird, right? But it started back — no big deal. And then I thought: What if it hadn’t? What if that had been it? What if instead of 13 seconds, that pause had lasted forever?

I gave my wife a call to let her know I wouldn’t be coming home that night: Hospitals like to “observe” people after a stunt like that. She pressed me for details, and when I explained what had happened, I think her heart may have stopped briefly, too. The next week, I got a pacemaker.

It was a pretty simple procedure. The cardiologist placed a device about the size of a matchbox under the skin on my chest, with wires running down into my heart to tell it when to beat. It took a little while to fine-tune the settings, but now I rarely notice it.

And I never pass out. As far as a cause of my blackouts, I never got a great answer, but the pacemaker works well — so well, in fact, that I had it replaced a few months ago when the batteries ran out after eight years.

Here’s what I learned from this experience:

Life is uncertain. If there’s something that you need to do before you die, do it. If your life has no meaning, do something meaningful. If you dream of a better life, take the next step to make it happen. Enjoy your family, and be sure they know how much you love them. If you’re not comfortable with what will happen when you die, now is the time to figure it out.

Life is great. My family is amazing. I have big plans for the future, and I love helping to make other people’s lives better. I’m glad to be alive.

Life is imperfect. Medicine is imperfect. Doctors are imperfect. Waiting is hard. Get over it.

The path to your future can include unexpected detours. In my case, a medical discharge from the Navy led to a career in medicine. I’m now 31 years old and finishing my medical training. I love taking care of kids, and I’m looking forward to starting my own practice. Ten years ago, I never would have guessed this is where I would be.

So if the road you’re on turns into a dead end, find the path you’re supposed to be on, and keep on walking.

Hayes is a pediatrician in South Carolina and a member of the American Academy of Pediatrics. He blogs at chadhayesmd.com.