Script for managing sample status