The emergency-room patient said he was in agony because he had cancer and had run out of OxyContin during a trip to Philadelphia.

He wanted a prescription to tide him over.

For physicians such as Jeanmarie Perrone, an emergency-medicine specialist at the Hospital of the University of Pennsylvania, such tales of woe stir a mix of sympathy and skepticism.

"Anyone could come up with that story," she said of the hypothetical case. "If I could look up his prescription records, and then say, 'Well, I'm not sure this is true,' it would help."

Abuse and diversion of opioid painkillers such as OxyContin, Percocet, and Vicodin have become a lethal scourge, surpassing vehicle crashes as a cause of accidental deaths in many states, studies show. About 14,800 overdose deaths in 2008 involved prescription painkillers, more than cocaine and heroin combined, according to federal data.

Recognizing that health-care providers play a crucial role in this problem, 36 states - and counting - have developed prescription monitoring programs that doctors can check before writing orders for addictive painkillers.

In Pennsylvania - which has one of the nation's highest rates of drug-overdose deaths - a database with information entered by pharmacists already exists, but only law enforcement officials may use it.

That could change. On Tuesday, the state House of Representatives' Human Services Committee voted 19-1 to support a bill that would make the database more comprehensive and timely, and let physicians access it. A vote in the full House is expected early in the new year.

"We've been working on this for two years," said the sponsor, Rep. Gene DiGirolamo (R., Bucks). "So many people have a stake in it. We think we finally have a bill that everyone can support."

Pharmacists have worried about the burden of reporting, while some doctors have feared that the widespread underprescribing of adequate pain medications could be worsened by a monitoring program.

The two-year-old Pennsylvania Pain Coalition, an advocacy group comprising health professionals, helped craft the bill.

"It has excellent provisions to protect patient privacy," said coalition chair Michael Ashburn, a pain and palliative-care specialist at Penn. "It strikes a good balance between the pharmacy industry and doctors. This bill should save lives."

New Jersey this year awarded a contract to establish a prescription-drug monitoring program that doctors will be able to access.

Whether or not prescription monitoring prevents deaths, studies suggest it improves patient care. In Ohio, physicians changed their intended opioid prescriptions 41 percent of the time after checking the database. While 61 percent of these checks led doctors to decrease or deny opioids, the remaining 39 percent led them to boost dosages - a sign that patients who need greater pain relief get it.

Behind the growth in painkiller addiction and diversion, experts say, is a boom in opiate products and sales. Since 1999, sales have jumped 300 percent, one study found.

"Once they are dispensed, prescription drugs are frequently diverted to people using them" to get high, the Centers for Disease Control and Prevention says. "In 2010, 2 million people reported using prescription painkillers nonmedically for the first time - nearly 5,500 a day."

How do they get the drugs? Lying to doctors is one method. But more than half of illicit users simply score free pills from friends or relatives. An additional 15 percent buy or steal from the same sources.

Still, the problem is broader than illicit use, Ashburn said. Many patients battling pain quickly develop a tolerance and dependence on opioids, then slip into "aberrant" patterns - taking pills too often, asking for early refills.

"One out of five patients on chronic opioids engage in aberrant behavior within six months," he said.

Prescription monitoring, while not a panacea, will help. In Minnesota, Perrone said, a colleague confronted a patient who was abusing opioids with printouts from that state's database.

"The patient broke down and admitted it and asked for help," Perrone said. "She went straight from the ER to drug rehab."

Contact staff writer Marie McCullough at 215-854-2720 or mmccullough@phillynews.com.