added security check to patient prescriptions