Oprah Winfrey is on the mend.

The media mogul told Ellen DeGeneres Monday that she was "cleared yesterday" after battling pneumonia for several weeks.

Winfrey said she thought she had a cold, but later went to the emergency room, where she was diagnosed with pneumonia.

"Pneumonia is nothing to play with, y'all. It is very serious," she said, adding that eventually she was referred to a lung specialist. "He puts his stethoscope here and I see the 'Oh s--t' face. It was like, 'Oh my God, something's wrong with you.' And I can see it. He didn't hide it."

"He immediately said, 'You must cancel everything.' I've never canceled anything in my life," she continued. "He's like, 'You must cancel everything. You can't fly for a month.'"

PHOTO: Oprah Winfrey speaks at a press conference on Aug. 06, 2019, in Beverly Hills, Calif.
WireImage/Getty Images, FILE
Oprah Winfrey speaks at a press conference on Aug. 06, 2019, in Beverly Hills, Calif.

According to Dr. Kristen Kendrick, a family physician with the ABC News medical unit, the two most common types of pneumonia are viral and bacterial, and because Winfrey also told DeGeneres that she took antibiotics, it would seem that she had the latter. Both are contagious, and viral pneumonia can be caused by influenza, which means a flu shot -- which Winfrey also encouraged viewers to get -- can lower one's risk of of getting sick.

Symptoms for both include a cough that is often wet and produces yellow or green phlegm, shortness of breath, chest or rib pain and abnormal breath sounds, usually accompanied by fever.

Winfrey's case cleared up about a week after she first saw the lung specialist.

"He called me everyday to make sure I was using the inhalers and taking the right antibiotics," she marveled. "When I walked in and I was better, he thanked me three times for getting better and said, 'Can I have a hug?'... I could tell he was like, 'Not on my watch is this gonna happen!'"

The experience was pivotal for the talk show host. Next year, she's launching a nationwide tour, "Oprah's 2020 Vision: Your Life In Focus," in which she'll be "trying to motivate people to take care of themselves."