mooving functions from "PSUL" code to lims_utils.py