For the first time, the Medicare program and the health insurance industry have agreed on a set of ratings to gauge how well doctors do their jobs.

Leaders of the federal Centers for Medicare and Medicaid Services and the trade group America’s Health Insurance Plans announced Tuesday that they have reached a consensus on how to measure physician quality in seven medical areas, from primary care to treatment of patients with cancer or AIDS.

The ratings will not be used immediately but are intended to have a big effect within a few years on U.S. health care.

They will serve as building blocks on which both private health plans and Medicare, the vast public insurance program for older Americans, rely in shifting how doctors are paid. Increasingly, both private and public insurance are moving toward payments based on the “value” of care, rather than on how much care a doctor provides. The new measures are designed to help gauge that value.

But they also are designed to lessen the paperwork burden on physicians, who typically face different requests for quality data from each insurer with which they have contracts. From patients’ vantage point, uniform quality ratings are intended to help them compare and choose doctors.

The specific points in the agreement cover, for example, how well primary care doctors control patients’ high blood pressure, how well doctors who treat patients hospitalized for heart failure prevent readmissions, how successfully doctors keep HIV in check for patients infected with the virus, and what therapies doctors use to treat various cancers.

CMS acting director Andy Slavitt said in a call with reporters that the agreement reflects “something rare” in the U.S. health-care system: harmony among parties that often are at odds. The agreement drew immediate praise from the American Medical Association, several medical specialty groups and patient advocacy organizations, as well as the insurance industry.

The quality measures, the result of 18 months of negotiations, remain a work in progress. While the agreement is new, the scores of measures themselves are not. Nearly 90 percent match ones already approved by the National Quality Forum, a nonprofit organization that endorses evidence-based standards for measuring health care.

Federal officials and insurance executives said they will keep working to develop ratings agreements for other areas of medicine. Within each, the methods will evolve as research continues to develop ways of gauging doctors’ quality.

Helen Burstin, the quality forum’s chief scientific officer, said in an interview that more ratings eventually should be based on the outcome on patients’ health rather than the steps that doctors take.

For Medicare, the ratings list must go through federal regulations before it can be used. For private insurance, Carmella Bocchino, executive vice president of America’s Health Insurance Plans, said most health plans would adopt the list when they renew contracts with doctors.