The lame-duck U.S. Congress is poised to take a regrettable step before the end of the year: weakening a law that provides a much-needed window into the financial ties between doctors and industry,

The aptly named Physician Payment Sunshine Act, passed in 2010 as part of the Affordable Care Act, made public the legal but staggering sums paid to doctors by drug and medical device manufacturers for research, consulting, travel, promotional talks or meals. The information has been searchable since 2014 on the Open Payments section of the website run by the federal Centers for Medicare and Medicaid Services. It also details providers’ ownership interests in such firms.

Undermining the law would be a serious mistake because of the staggering sums involved and because more transparency is needed — not less — in health care as President-elect Donald Trump’s administration designs new programs to replace the ACA.

In 2015, “health care industry manufacturers reported $7.52 billion in payments and ownership and investment interests to physicians and teaching hospitals. This amount consists of 11.90 million total records attributable to 618,931 physicians and 1,116 teaching hospitals,’’ according to a statement by Iowa Republican Sen. Chuck Grassley.

Grassley was one of the Sunshine Law’s strongest champions, arguing sensibly that shining a light on these payments is timely and important. Patients should be able to decide for themselves if their doctor’s financial interests may have influenced a prescription for an expensive drug or particular medical device.

From a system standpoint, the information sheds a harsh but positive light on the practices that lead to the use of new or brand-name drugs over less expensive medications. Understanding the reasons driving the soaring sums spent on prescription drugs nationally is necessary to control these costs for consumers and for taxpayer-funded programs such as Medicare, which covers those age 65 and up.

Unfortunately, a provision tucked within a bill known as the 21st Century Cures Act would put a barn-sized loophole in the Sunshine Act. The change would exempt disclosure for payments made under the umbrella of “continuing medical education (CME),” such as for educational courses, books or journals. These are not small sums. “Last year, industry support for CME totaled $693 million, a 2 percent rise, from the previous year,” according to a report in STAT, a respected online health care publication.

Grassley has threatened to throw a procedural roadblock in the path of the 21st Century Cures Act unless the provision is removed. The act would provide a needed 10-year, $4.8 billion funding boost to medical research, but his congressional colleagues ought to heed the senior senator from Iowa. These payments shouldn’t be hidden again.