A television station’s analysis has found that thousands of Minnesota doctors aren’t complying with a law requiring them to create an account with the state’s Prescription Monitoring Program.

The law applies to those registered with the U.S. Drug Enforcement Administration.

KSTP-TV reports that more than 5,000 doctors, dentists, pharmacists and other medical professionals failed to register with the program by July.

The program allows doctors to check patients’ prescription history and aims to make it more difficult for people to obtain large amounts of painkillers.

Ruth Martinez is the executive director of the Minnesota Board of Medical Practice, one of the regulatory boards enforcing the law. She says the board doesn’t know which doctors haven’t registered because it doesn’t have the ability to obtain and maintain DEA registrations.