Enter multiple symbols separated by commas

A Prescription for Profits

A stealthily placed mandate for medical prescriptions that made its way into the Iraq spending bill could push business toward companies like Quality Systems and Allscripts, Cramer said.

The provision will make it illegal for non-electric prescriptions to be written on anything but tamper-resistant paper. Congress hopes the move will reduce medical expenses and save money on overbilling as more and more doctors and hospitals generate prescriptions electronically.

That should open up a world of growth for Quality Systems and Allscripts. The market for electronic medical records is “fragmented and underpenetrated,” Cramer said, with only 25% of doctor’s offices having them. A quarter of the market is controlled by QSII, MDRX, General Electric – parent company of CNBC – and a privately held company, so there’s room for consolidation as well.

So which is the better play? QSII trades at a discount – 19 times forward earnings versus MDRX’s 33 times forward earnings – but that’s because it doesn’t offer guidance or backlog data. Cramer said it’s worth it to pay more for a stock with transparency. Not to mention, Allscripts has a better reputation, he said.

For that reason, “Allscripts deserves the premium valuation,” Cramer said. So if forced to choose between that and QSII, he recommends Allscripts.

Questions for Cramer? madmoney@cnbc.com

Questions, comments, suggestions for the Mad Money website? madcap@cnbc.com

Cramer's New Book