medical-records1Turning the U.S.’s rickety paper-based system of health records into a state-of-the-art electronic one is no pretty task.

But someone’s got to do it.

Medsphere Systems Corporation, an open-source electronic health records provider, said it raised $12 million today to meet demand from hospitals racing to keep their eligibility for federal funds by revamping their records systems.

Carlsbad, Calif.-based Medsphere is one of several companies that are adapting VistA, or the Veteran Health Administration’s electronic medical records system, for commercial use. For budget-conscious hospitals, taking the open-source route is a cheaper alternative to buying private software. Medsphere’s variation, called OpenVista, is used by 20,000 people and 2,500 doctors, according to the company.

The federal government is trying to push hospitals toward adopting electronic records by promising $19 billion stimulus funds to those that make the transition by 2011. If they don’t make the leap, they face financial penalties, losing a percentage of their Medicare payments starting in 2015.

Azure Capital Partners, Epic Ventures, Thomas Weisel Venture Partners and Western Technology Investment participated in the round.