Telehealth startup Opternative filed a suit against South Carolina today over a law that bars consumers there from getting a prescription for new glasses or contacts with an online eye exam. Technically, the lawsuit is a constitutional challenge to the state’s statute.

As TechCrunch previously reported, Opternative’s app generally allows users to take an eye exam from the comfort of their own home using their smartphone and a laptop or personal computer.

Data gathered by Opternative’s platform is reviewed by human ophthalmologists, who then deliver prescriptions through the app so their patients can get new contacts or glasses.

Opternative blatantly instructs users not to consider their app as a replacement for a full, medical eye exam. The company recommends that users have a full, in-person eye exam every two years, following the most conservative recommendations of the American Optometric Association.

Users who are not within the age range of 18-50, and who are at risk for the development of eye health or vision problems, are not permitted to use Opternative according to the company’s terms of service. Opternative also restricts use of the app to people within a certain prescription range. You can’t, in other words, use it to get new trifocals or lenses that would correct for extreme near- or short-sightedness.

The Institute for Justice, which is known as a libertarian law firm, filed the suit on behalf of the Chicago startup. The senior attorney heading up the case, Robert McNamara, explained in an e-mail to TechCrunch why his firm was keen to work on this matter.

“Patients and doctors, not the state legislature, should be in charge of managing their healthcare decisions. And patients and doctors should be in charge of deciding how best to use new technologies to expand access to care. By effectively prohibiting ophthalmologists from using Opternative’s technology, South Carolina is using government power simply to protect the profit margins of favored businesses. That’s not just wrong, it’s unconstitutional,” the attorney wrote.

IJ has been one of the law firms advocating for the rights of drivers and newer transportation companies that have challenged incumbent taxi cartels around the country.

In a recent case, taxi business owners sued the City of Chicago trying to force the city government to kick out ride-hailing services like Uber and Lyft. A small group of independent drivers, represented by IJ, contended that the taxi businesses had no legal basis to keep them out of the market. The drivers won in the U.S. Court of Appeals for the Seventh Circuit.

McNamara said South Carolina’s law is particularly troubling because it appears to be driven by a wish to protect business interests rather than public health and safety.

The state recently adopted a law that legalizes telemedicine broadly, as long as doctors using this technology meet a certain standard of care in their treatment of patients.

McNamara said, “Although telemedicine is actually generally legal in South Carolina…the state has a law on the books banning online eye exams specifically. That’s not because telemedicine is more dangerous for ophthalmologists than it is for dermatologists and their patients. It’s because private businesses successfully lobbied the state legislature to keep Opternative out.”

Asked if the startup has plans to file suits in other states, like Georgia or Indiana, that limit the use of apps like Opternative, CEO and co-founder Aaron Dallek said, “I have every hope that we can find ways to work productively and legally in all 50 states without litigation. But we absolutely believe in our constitutional right to earn a living free from arbitrary government interference.”

Corrections: This post previously stated that Opternative did not offer bifocal prescriptions. It does. The post also said Opternative requires, but instead it recommends, that its users get a full, medical eye exam every two years.