When your doctor writes you a prescription, that’s just between you, your doctor and maybe your health insurance company -- right?

Wrong. As things stand now, the pharmaceutical companies that make those prescription drugs are looking over the doctor’s shoulder to keep track of how many prescriptions for each drug the physician is writing.

By obtaining data from pharmacies and health insurers, the drug companies learn the prescribing habits of thousands of doctors. That information has become not just a powerful sales and marketing tool for the pharmaceutical industry but also a source of growing concern among some elected officials, healthcare advocates and legal authorities.

The identity of patients is not disclosed in such data, but knowing in detail what individual doctors are prescribing enables drug makers to fine-tune their messages when sales reps call on doctors. They can lobby for use of an alternative drug made by their own company, for instance, bolstering the pitch with specially selected research data or free samples.

What worries some government officials and patient advocates is that keying sales tactics to an individual doctor’s prescribing preferences -- known as data mining -- may distort decision-making and fuel prescribing of new, high-cost drugs.

Legislation limiting or outlawing the practice has been passed in three states, has been considered in at least 20 others in recent years and has even been floated by federal lawmakers.

Many doctors have trouble finding time to examine a plethora of studies and weigh the results carefully, say critics of data mining, making them especially easy targets for drug reps armed with seemingly solid studies. And, given the rising concern over drug costs, free samples or other inducements could similarly influence decisions for non-medical reasons.

The result, according to critics of the practice, is increased prescribing of the newest and costliest, though not necessarily more effective, drugs.

“It really interferes with the doctor-patient relationship and leads to more spending on more expensive drugs,” said Sharon Treat, a member of the Maine House of Representatives and executive director of the National Legislative Assn. on Prescription Drug Prices. Maine is one of three states that have passed laws restricting use of physicians’ prescribing information.

Data miners say they’re actually helping to contain costs and improve quality by quickly providing doctors with information on which treatments work best.

“These data don’t make the decision about which drug is used. The physician does,” said Randy Frankel, vice president of external affairs for IMS Health Inc., a leading medical data provider. “All these laws do is make the system more inefficient” by impeding the flow of information.

States weigh in

Mined data have been employed by drug companies for years, but rising costs and complaints from physicians that it violates their privacy have prompted a search for legislative fixes. The concern over prescription data mining is part of a larger pattern of unease over the aggressiveness of drug companies’ sales tactics.

Legislation requiring drug makers and other health product providers to disclose gifts, travel, entertainment and other items given to physicians has been folded into both the House and Senate versions of the healthcare overhaul bill.

On the state level, New Hampshire in 2006 and Vermont in 2007, along with Maine the same year, have passed laws against the use of prescriber data in drug marketing. Depending on state laws, the bans can also apply to prescribing by nurse practitioners and dentists.

The issue is far from settled even in those states. A district court overturned Maine’s ban on the grounds that it violated drug companies’ 1st Amendment commercial speech rights, and the state is currently appealing that decision. Data firms, meanwhile, are appealing an adverse ruling in their suit against the Vermont law, and in June, the U.S. Supreme Court declined to hear an appeal of a ruling upholding New Hampshire’s ban.

A prescriber’s profile includes his or her identity and specialty and the drugs prescribed. Such information enables sales reps, also known as “detailers,” to know who prescribes competitors’ drugs and who prescribes large quantities of drugs for particular conditions. It also allows them to spot so-called early adopters -- physicians who tend to prescribe the newest drugs.

Because drug sales reps know which drugs doctors prescribe, they can precisely tailor their pitches to maximize their chances of persuading them to switch products, said Marcia Hams, director of prescription access and quality for Community Catalyst, a Boston-based advocacy group.

“What they bring to the doctor will be selective information that will focus on their drug as a better choice,” said Hams. “It really undermines the doctor-patient relationship because the rep is trying to influence the behavior of the physician.” There’s also a patient safety risk, Hams argued, because the newest drugs don’t have lengthy track records.

The Pharmaceutical Research and Manufacturers of America, the main drug industry trade group, has a different take.

In a statement, the group said use of prescriber records helps “companies properly educate doctors about prescription drugs and their characteristics . . . in a more targeted and expedited manner.” A PhRMA spokesman declined to address questions about the role of mined data on consumer drug spending.

Drug companies spent $6.5 billion on detailing in 2008, according to data compiled by the Kaiser Family Foundation. That doesn’t include the value of samples, which had a retail value of $15.9 billion in 2004, the most recent year for which the foundation had data.

FDA, AMA stances

The Food and Drug Administration has periodically issued directives limiting direct-to-consumer ads, and the agency is in the midst of a study on how to regulate medical product advertising on the Internet. But the FDA has been silent on prescription data mining.

Within the medical community, the AMA’s involvement in data mining is controversial.

The association collected $47.6 million in 2008 by licensing its data, an unspecified portion of which comes from the sale of information from a master database of nearly all physicians in the U.S. to IMS and other data miners.

The file contains the names of more than 800,000 physicians, including about 250,000 AMA members.

AMA spokesman Dr. Jeremy Lazarus defended drug data mining as a source of educational information for physicians. He said it’s unfair to single out prescriber profiling as a prime culprit in increased drug spending because physicians receive information about drugs from a variety of sources.

“There’s advertising on TV, there’s written stuff in the mail, there’s peer-reviewed journals, there are conferences,” said Lazarus, a Denver psychiatrist and speaker of the AMA’s House of Delegates. “As far as I know, in and of itself, [prescriber profiling] is not a major cost driver.”

If physicians don’t want their prescribing information used by drug detailers, they can opt out by filling out a form on the AMA website, Lazarus said. To date, just under 24,000 doctors have done so, an AMA spokesman said.

The opt-out process is cumbersome and puts the burden on physicians, said Dr. Michael Mendoza, an assistant professor of family medicine at the University of Rochester School of Medicine and Dentistry. “It should be an opt-in process,” said Mendoza. “I shouldn’t have my prescribing data used in this way.”

azajac@latimes.com