OMAHA — The thought only crossed Madisyn Cox’s mind for a moment, piercing through the swirl of confusion, shock and heartbreak last spring when the coronavirus pandemic forced the postponement of the 2020 Tokyo Olympics by a year. But its sheer gravity demanded it be heard and considered: Was this a sign that her Olympic dream was over? Was it time to quit swimming and go learn how to be a doctor?

At the time, the list of unknowns was lengthy: Would the McGovern Medical School in Houston grant Cox a deferral so she could keep training? Could she maintain the level of training at which she had been operating for another year? And would the Tokyo Olympics actually take place in 2021 as promised?

“All these questions were running through my head,” Cox, 26, recalled recently. “But ultimately, I thought, ‘This is my last chance at going for the Olympics.’ I couldn’t one day turn around and say, ‘Oh, I’m going to go back to training.’ Our bodies are primed at a certain time, and I can’t go back at 40 and decide I want to do this. But I can always push medical school back a year. So I decided to go that route.”

So far, at least, her decision to push toward the Olympics has been validated. The med school granted her a deferral. The Tokyo Games, by all accounts, are going to happen. And Cox is swimming as well as at any time in her long career. On Tuesday night at the U.S. Olympic trials at CHI Health Center Arena, she sailed into the final of the 200-meter individual medley, posting a time of 2:10.22 to finish second in her semifinal heat.

On Wednesday night, she will swim the event again for a spot on the Olympic team. Seeded fourth in the final, with the top two finishers earning berths on Team USA, she will need a faster swim than the one she turned in Tuesday night. But she has one in her: The 2:08.51 she swam last month remains the best time by an American this year.

Should Cox make it to Tokyo, it would complete a remarkable journey unlike that of any of her teammates. The postponement of the Tokyo Games was not the first time Cox had wondered whether she was being sent a signal that she should give up the dream and get on with real life.

In March 2018, less than two years after falling just short of making the 2016 Olympic team and just eight months after winning a gold and a bronze at the 2017 world championships, Cox was informed that she had tested positive for trimetazidine, a banned metabolite. The result was confirmed by both an “A” and a “B” sample.

Cox was adamant she had not knowingly taken a banned substance and appealed the finding, which had not been made public. FINA, swimming’s governing body, reduced the standard four-year suspension to two years after finding her testimony credible and concluding she had not knowingly taken the substance. In a report announcing that decision, FINA called her “an honest, very hardworking and highly credible athlete who is not a ‘cheat.’ ”

But it could not reduce the suspension further without a concrete explanation for how the substance entered her system. Cox’s family spent months — and a considerable amount of money — searching for that explanation in hopes of clearing her name.

Finally, in August 2018, a World Anti-Doping Agency-accredited lab determined four nanograms of trimetazidine were present in both opened and factory-sealed bottles of a multivitamin Cox had been taking for seven years, and which she had listed on every form at every doping test she had ever taken. She was effectively cleared of any wrongdoing but still had to serve a six-month suspension — which forced her to miss qualifying trials for the 2019 world championships and set back her training for Tokyo.

“In hindsight, [that experience in] 2018 definitely prepared me for 2020,” Cox said. “The difference is, in 2018 I was going through it alone. It was this thing that was hush-hush. The only people who knew [about the positive test] were my parents and my coach. … In 2020, we were all going through the pandemic together.”

On the day in 2018 when the Court of Arbitration for Sport cleared her of any wrongdoing, Cox, through tears, called the experience “hell,” telling reporters: “Everything happens for a reason. I don’t know the reason for this, but I’m glad it’s over.”

Maybe the reason was hiding within the applications for medical school that she would start filling out in 2019 — all of which, pretty much uniformly, contained an essay topic along the lines of: “Tell us about a time in your life when you overcame adversity. How did you handle it? How did it change you?” Cox had a pretty good answer for that one.

“In all the med school interviews she went to — and she went to a lot — they all said, ‘We can’t tell you how impressed we are at how well you handle adversity, the way you handled it with grace and dignity.’ Every one of them said that,” said Cox’s mother, Sandy. “It completely turned it into a positive.”

By the time the pandemic shutdown came along, Cox, who graduated from the University of Texas in 2017, already had put off her dream of attending medical school for three years to train for Tokyo. Everything had fallen into place. She had her acceptance from McGovern. She was moving up the world rankings in her best event, the 200 IM. She had the next chapter or two of her life pretty well mapped out.

On the day the postponement was announced, “We sat there in just stunned silence,” Sandy Cox recalled. “Madisyn had a good cry. But you sit around and finally realize, ‘We have some regrouping to do.’ ”

The first mission was to petition McGovern for a deferral, which Cox did in a lengthy, heartfelt letter that spelled out her twin dreams of swimming in the Olympics and becoming a doctor. The deferral was quickly granted. Itching to get started on the next part of her education, Cox started taking classes at the school toward a master’s degree in public health, which she will finish concurrently with medical school.

No matter what happens Wednesday, Cox knows her competitive swimming career, which has lasted 22 years, is coming to an end this summer. It is a notion — her final chance to fulfill a lifelong dream — that could have filled her with self-imposed pressure. Instead, it brings her peace.

“This could be the last meet I go to,” Cox said of the Olympic trials. “So it’s about embracing that and just having fun with it. This is the most fun I’ve ever had in the sport. There is some pressure. I want to have done all this work all my life for something. But I think I’ve come to the point where I’ve genuinely enjoyed the journey enough that the pressure really isn’t too heavy on the outcome.”

The timing of the Tokyo Games is such that, should Cox make the U.S. team, she would wind up going straight from the Olympics to medical school, the classes for which will have already started. It could require her to get off a plane in Houston, jet-lagged and ragged, and hustle straight to a classroom.

It would be a chaotic and frantic transition, and it might require copious amounts of caffeine to pull off. But it would also be perfect — exiting one of the most grueling endeavors in human existence, training as an Olympic swimmer, and entering another, being a first-year med school student — and Madisyn Cox hopes it happens exactly like that.