Gov. Deval Patrick is planning to sign into law a bill overhauling the oversight of compounding pharmacies in Massachusetts.

Patrick will sign the bill Thursday at the Statehouse. The legislation stemmed from a nationwide meningitis outbreak blamed on a tainted steroid produced by the now-closed New England Compounding Center in Framingham. The outbreak resulted in 64 deaths and hundreds of illnesses.

The bill reorganizes the board that oversees the pharmacies and requires it to participate in any national reporting systems. It also requires board inspectors be trained in sterile compounding and non-sterile compounding practices. Compounding pharmacies typically custom-mix medications.

The legislation also authorizes the board to levy fines against a pharmacy of up to $25,000 per violation, and up to $1,000 for each day a violation continues after the date it should have been corrected.