Patients fill significantly fewer prescriptions for conditions like nausea and pain in states where medical marijuana is available, researchers reported Wednesday in one of the first studies to examine how medical cannabis may affect approved treatments.

Prescriptions for all drugs that treat pain combined, from cortisone to OxyContin, were nearly 6 percent lower in states with medical marijuana programs. Anxiety medication was 5 percent lower.

The result was a drop of more than $165 million in health care spending in states that had medical marijuana programs running in 2013, according to national Medicare data. The savings would equal 0.5 percent of the entire Medicare program’s drug budget if medicinal cannabis was available in every state.

For years, lawmaker have had little discussion of how medicinal cannabis would change treatments that patients were already receiving.

The new study was published Wednesday in Health Affairs.