Warren Buffett is making another big bet on health care.

His company Berkshire Hathaway (BRKA) recently took a $358 million stake in Teva Pharmaceutical (TEVA), an Israeli company that makes generic drugs. It fills about one in six generic prescriptions in the United States.

The company's stock spiked about 7% after the market closed.

Buffett's stake, reported in an SEC filing on Wednesday, is part of his attempt to improve the health care industry. Last month, Berkshire, Amazon (AMZN) and JPMorgan Chase (JPM) announced they would form a company to give their U.S. workers and their families better health insurance.

"The ballooning costs of health care act as a hungry tapeworm on the American economy," Buffett said at the time.

Related: Jeff Bezos, Warren Buffett and Jamie Dimon want to fix health care

Health spending is a growing expense for businesses and people. National health spending, which includes spending by federal and state governments, the private sector and people, has risen from just 5% of the economy in 1960 to 18% two years ago. It's projected to rise to almost 20% by 2025.

Experts expect Amazon to break into the prescription drug distribution business.

Related: Jeff Bezos and his two friends just spooked health care stocks

Berkshire Hathaway also dumped almost all its IBM (IBM) stock over the last three months. Buffett's company sold 35 million shares, leaving it with about 2 million.

The disclosure didn't appear to affect IBM stock, which ticked higher after hours. That may be because investors already knew Buffett was souring on it. Last May, he said he had gotten rid of a third of his IBM shares.

"I don't value IBM the same way that I did six years ago when I started buying," he told CNBC at the time. "I think if you look back at what they were projecting and how they thought the business would develop, I would say what they've run into is some pretty tough competitors."

Buffett's company also ditched 10 million shares of General Motors (GM) and 6 million shares of Wells Fargo (WFC). And it bought more than 31 million shares of Apple (AAPL).

— CNN's Jeanne Sahadi contributed to this report.