The health care system in Maryland could soon look more like that of Switzerland or Germany than Virginia or Pennsylvania, and if successful, it could be a step toward a single-payer structure that could move to other states.

In what’s called an all-payer system, the state will control and budget hospital costs, cap what hospitals may charge and reward hospitals that provide quality rather than quantity of care. Only Vermont and Massachusetts have anything as radical in the works.

“We need to shift away from our near exclusive focus on treating illness and move to a balanced approach that encourages prevention and wellness,” Maryland Gov. Martin O’Malley said in a press release announcing the program in January. “Such a shift will reduce costs for families and small businesses and will simultaneously keep many Americans from dying of preventable causes.”

The experiment is proceeding in Maryland although the beginning of Maryland’s participation in the Affordable Care Act was at best inauspicious. The moment the website opened, it crashed.

On the first day only four people managed to sign up, and according to the Washington Post, incredulous officials checked to see whether they were real. They didn’t believe anyone could actually get through.

Since then, contractors have been fired, lawsuits have been filed, officials resigned, and the website has become a political football for the upcoming gubernatorial campaign.

While the state is working out all the kinks, it is quietly beginning to experiment with its system. For the past 36 years, Maryland has regulated the fees hospitals charge patients. Other states have tried and abandoned regulation for various reasons, but Maryland kept it.

Usually, hospitals negotiate fees with each health insurer individually — including the federal government. The fees are based on the services provided and vary from insurer to insurer. The more procedures, the more fees.

The fees are not the same for all 46 hospitals in the state; a hip replacement at Johns Hopkins in Baltimore does not cost the same as one at the Peninsula Regional Medical Center in Salisbury on the Eastern Shore or at Sacred Heart in Cumberland in the mountain west. And fees vary even within each hospital.

For instance, Fran Downey, then 65, a Baltimore resident, had a near-death experience in 2010 with a massive case of sepsis. She recovered. Her bill from the Greater Baltimore Medical Center, one of the city’s largest, came to $93,000, all but $25 paid by Blue Cross Blue Shield and Medicare.

The fees had been negotiated by the insurers under state regulation. The hospital was paid based on the services provided, including almost $20,000 for the intensive care unit. The patient in the next bed could have been charged a different amount.

Under the new plan, all the state’s hospitals would get an annual budget, based on what they charged the previous year, and would have to limit its total fees to that amount. All patients at each hospital would pay the same for each service.

“It is moving to a more global budget,” said Stuart Guterman, vice president for Medicare and cost control at the Commonwealth Fund.