Using marijuana as a medication in the state of Pennsylvania is one step closer to becoming a reality. Keystone State senators Tuesday afternoon approved a bill that would legalize pot for medical applications, setting up a vote in the state House. The bill passed decidedly with a 40-7 vote.

If the bill successfully passes the House, patients suffering from at least one of 15 medical conditions would be permitted under the law to use marijuana to treat ailments such as cancer, epilepsy, poststress traumatic disorder and HIV/AIDS.

Although smoking marijuana would remain illegal, patients would be able to use the weed in a number of other methods, including as oil, pills, gels and ointments. Edible marijuana products would also remain illegal, but there would not be a measure in place to prevent patients from mixing the medication into food before eating, the local ABC News affiliate reported Tuesday.

Gov. Tom Wolf vowed to sign the bill into law if it passes successfully through the House, and the House majority leader has all but assured that he will do all he can to make that a reality, according to the Morning Call.

"We've got too many kids and too many citizens in general that can potentially benefit from the use of medical marijuana," Dave Reed said in January. "We just need to make sure it's regulated in the most appropriate fashion possible and that we're not creating a lot of unintended consequences."

Twenty-three states and the District of Columbia have effectively legalized medical marijuana, and seven more states have pending legislation. Eleven other states have had legalization bills either stalled or completely failed. Four states and D.C. have legalized the recreational use of marijuana.

As with the other states that have legalized medical marijuana, patients must obtain explicit written approval from a physician certifying that cannabis would be an appropriate form of treatment for the condition patients are suffering from.