Quality variations in drugs can occur at any step of the production process from raw materials to final packaging. Sources of variation include materials, machines, methods, and personnel. These variations can be controlled through material control, manufacturing practices control, packaging control, and distribution control. Key aspects of control include proper personnel training, equipment and facility design, production record keeping, in-process quality checks, and sample retention after distribution. Together, quality control, quality assurance, and quality functions work to minimize variations and ensure product quality is maintained.