The database that collects and stores prescription information is called the Prescription Drug Monitoring Program (PDMP), Michigan is one of the 45 states, it maybe more now, that participate. It was implemented to help prevent "doctor shopping" for obtaining multiple prescriptions for the same drug.
Even before the PDMP was implemented, many years ago when I was employed in law enforcement, the DEA Agent assigned to pharmacy prescription inspections would stop by and let us know who was buying alot of the same prescription drugs from multiple pharmacy's.