In the latest chapter in the legal war against Obamacare, a ruling Thursday by a Texas judge imperils the availability of certain HIV drugs, cancer screenings, and other preventive care without insurance copays that have been provided under the landmark law.

While the ruling is likely to be appealed and could be overturned, Massachusetts needn’t rely on the judiciary to protect its residents’ health. The state can protect free access to this care for many Bay Staters by codifying the federal protections in question into state law.

The case, Braidwood Management v. Xavier Becerra, is one of many legal challenges that have been filed against the Affordable Care Act. It does not threaten to overturn the entire health care law, but it does seek to strike down one of its most popular provisions — no copay coverage of preventive care, regardless of what insurance plan one is on.

The case was brought by six individuals and two businesses that objected, for religious and personal reasons, to having to provide or purchase insurance coverage that includes free access to certain types of preventive care, including contraceptives and PrEP drugs. PrEP is a pill taken daily, often by sexually active gay men, that prevents the transmission of HIV. The legal challenge was based on both a religious freedom argument and procedural grounds related to how the federal government decides what services are considered preventive.

Ashley Blackburn, director of private insurance and prescription drug reform for the Boston-based consumer advocacy group Health Care for All, said the decision could also create confusion if some employers offer insurance that covers preventive services without copays and others do not. “Even a modest amount of cost-sharing creates real barriers to care, especially for low-income people and communities of color,” Blackburn said.

As Blackburn said, there is no harm in having the protections codified in state law — even if, in the best-case scenario, the Affordable Care Act is fully upheld and those protections never need to be used.

Read more of the article on the Boston Globe.