Next year, the legislature will consider a new law requiring doctors and pharmacists to check a state database before writing and filling prescriptions.