Omnicare (NYSE:OCR) shares took a major hit yesterday, skidding 23% as investors chastised the firm for disappointing earnings. The company, which provides pharmaceutical distribution services for nursing homes, explained the results were simply a "rough patch," although the shortfall may raise worries as the firm moves to close its purchase of rival NeighborCare (NASDAQ:NCRX).

Omnicare announced yesterday that it earned $0.58 per share in the quarter, a healthy 32% improvement over the second quarter of 2003. Unfortunately, the latest results fell $0.05 short of expectations, and the company cut its profit outlook for the full year to between $2.35 to $2.45 per share from a prior range of $2.55 to $2.65.

Omnicare remarked that several factors, such as pressures from competitors, drug pricing issues, and an unexpected shift in its payer mix toward Medicaid, are crimping margins. Still, management struck a hopeful tone, explaining that cost savings from past acquisitions have yet to be realized and that measures are already being put into place to control expenses.

Notably, the company appeared to redirect cash during the past three months. Following a ramp up in the past two quarters, the frenetic pace of Omnicare's purchases slowed dramatically in the second quarter. After using $64 million in cash in last year's fourth quarter for acquisitions and $106 million in the first quarter, the company doled out just $38.7 million for deals this quarter. In addition, Omnicare paid down $29 million in bank debt.

Despite the pressure on its earnings, the firm remains committed to buying competitor NeighborCare in a cash deal valued at $1.5 billion. The purchase would be Omnicare's largest yet and would likely add a substantial amount of debt to its balance sheet. To date, the company has managed to squeeze out efficiencies from its many transactions, but this latest disruption may be enough to give some investors pause.

Faced with ongoing budget woes, state-run Medicaid programs may become even more stingy about reimbursement, which does not bode well for Omnicare's margins. Managing a major acquisition and the subsequent integration in this environment will no doubt be a challenge even for Omnicare.

Fool contributor Brian Gorman is a freelance writer in Chicago. He does not own shares of any companies mentioned in this article.