The prescription drug monitoring database in Massachusetts, which has been in operation for two years, appears to have helped stem “doctor shopping,” according to state health officials.

Among healthcare providers participating in Massachusetts’ prescription drug monitoring database, there was a 30 percent drop in the number of patients with “questionable activity,” officials announced Wednesday. Such activity was defined as patients who filled at least four narcotic prescriptions from at least four pharmacies, within six months, The Boston Globe reports.

In contrast, there was an 8 percent decrease in such activity among patients of health care providers who did not participate in the program.

Health officials compared activity of patients between July and December of 2010, when the program started, and the same time period in 2011. The database provides the most recent year of data about patients’ prescription drug use. It shows the name and address of every provider who prescribed a narcotic to the patient, and where the patient had the prescription filled.

In May, the health department sent letters to the 100 prescribers with the most patients who showed questionable prescription activity, encouraging them to enroll in the program. Currently, only about 2,800 of the tens of thousands of providers in the state who can prescribe narcotics are enrolled.

A bill requiring providers to enroll in the program was passed by the state Senate earlier this year, and is pending in the House.