For the first time in history, a bill to legalize marijuana for medical use in Pennsylvania has bipartisan support.

Its author is a conservative Republican state senator who was diagnosed with non-Hodgkins lymphoma in 2012 and underwent a sea change on marijuana after meeting with cancer patients and epileptic children whose suffering could be alleviated with cannabis.

"I had some preconceived notions before," state Sen. Mike Folmer told The Pittsburgh Post Gazette. "The more I got into it, I'm going, 'Oh my goodness, I was wrong.'"

Folmer met with his pastor in the fall to discuss the issue of legalizing weed and proceeded to put together a comprehensive bill to legalize the drug for certain medical conditions after getting his pastor's blessing, according to a legislative aide who spoke with The Huffington Post on Tuesday.

The resulting bill, titled the Compassionate Use of Medical Cannabis Act, would allow people over age 21 to possess and use up to an ounce of marijuana or three ounces of concentrates to treat a variety of maladies, including cancer, glaucoma, PTSD, HIV, AIDS, cachexia, seizures and Crohn's disease, as long as they have written certification from a doctor.

Children would also be allowed to use marijuana as treatment, if they have their guardian's consent. (Since introducing the bill in January with co-sponsor Daylin Leach, a Democratic state senator who has authored similar bills in the past, Folmer has become a relentless advocate for legalizing medical marijuana. He launched a social media campaign called #MeetThePAKids to push the issue, and he introduces a new child who could benefit from medical marijuana on his website every day.)

The proposed law, which would also set up a regulated system for marijuana to be grown and sold through dispensaries in the state, has picked up more than a dozen sponsors from both sides of the aisle, a legislative aide for Leach told HuffPost. If the bill is passed, it's plausible the system would generate a lot of cash for Pennsylvania.

"Clearly it would be at least hundreds of millions of dollars in Pennsylvania saved, and hundreds of millions more brought in as revenue to help pay for things like roads and schools and bridges and a safety net and all of that," Leach told Lehigh Valley Live.

Still, it's unlikely the bill will become law this year: Pennsylvania Gov. Tom Corbett would veto the measure if it reaches his desk, Corbett spokesman Jay Pagni told HuffPost. "The governor is opposed to the legalization of marijuana in Pennsylvania," Pagni said, adding that Corbett would be only open to legalizing cannabidiol -- a marijuana extract low in THC that may helpalleviate severe seizures -- and only if the U.S. Food and Drug Administration approves it first.

Corbett's stance doesn't line up with the opinions of a vast majority of state residents. A February 2013 poll found that 82 percent of Pennsylvania residents favor letting adults use medical marijuana if a doctor recommends it.