In a move to tamp down the opioid crisis, Colorado Governor Jared Polis signed a measure that will allow doctors to recommend medical cannabis for any condition meriting a painkiller prescription in lieu of opioids.

The move could buoy sales of medical marijuana, which have declined as purchases of adult-use cannabis have soared.

The new law is scheduled to go into effect Aug.2, after passing through Colorado’s General Assembly.

State health officials reported 1,635 prescriptions opioid-related overdose deaths in Colorado between 2013 and 2017. According to Colorado’s drug-monitoring program, nearly 3.7 million opioid prescriptions were issued in the state in 2017.

The law applies to patients over and under the age of 18. Patients who are below the age of 18, must ingest it in an edible form when using it on school grounds or transportation.

The new proposal says medical marijuana can be recommended to patients struggling with cancer, glaucoma, HIV and AIDS, PTSD or other chronic disorders that cause severe pain, seizures and nausea and almost includes all conditions in which opioids could be prescribed.