Retains Testing involves testing Samples from a specific production batch that were set aside and stored for later analysis. These Samples may be used to investigate future issues such as quality concerns, customer complaints, or regulatory questions. In some cases, such as under Food and Drug Administration Regulation 21 CFR 211.170 in the United States, setting aside samples for Retains Testing may be mandated by law.
You can only configure Retains Testing within a Batch Release Spec Data.
How to Configure Retains Testing
In order to configure retains testing for use, perform the following steps:
- Set
retain__vto Active on the Mode of Sample Creation and Sample Association Type picklists. - Update the following objects:
- Spec Execution
- Remove the
state__v = 'effective_state__vSpec Data VQL and move it to the Object Type level for the following types:- Batch Release
- Stability
- Prepared Consumable
- Update the
name_prefix__cfield to:
If(object_type__vr.api_name__v="quality_control_sample__v", "QCSample",if(object_type__vr.api_name__v="operational_criteria__v","OpCriteria",if(object_type__vr.api_name__v="retain_testing__v", "Retain","")) - Remove the
- Spec Data
- Default
retains_testing_frequency__vto1 - Default Retains Testing Unit to
RecordByUniqueField($quality_unit_of_measure__v, {$name__v:"Years"}, true)
- Default
- Retain Testing Input
- Add the following custom fields:
- Current Location (
current_location__c): Lookup from Release Lab Sample - Release Sample Received Date: Default from Release Sample
- Current Location (
- Create a new object layout with the following layout rules:
- Override Next Retain Pull Date
not(override_next_retain_pull_date__v)Read Only: Next Retain Pull Date - Location Change
new_location__v != current_location__c && not(isBlank(new_location__v))Required: Quantity Pulled, Unit of Measure - Unscheduled Pull
not(scheduled__v)Required: Comments, New Location
- Override Next Retain Pull Date
- Add the following custom fields:
- Spec Execution
- Make the following changes to Object Types:
- Retain Testing Spec Execution
- Set Status to Active.
- Release Lab Sample
- Add the following fields to the Lab Sample Details section of the object layout:
- Retain Testing
- Retains Testing Frequency
- Retains Testing Unit
- Add the following fields to the Key Dates section:
- Last Retain Pull Date
- Next Retain Pull Date
- Add the following layout rule:
Lab Sample: Retain
not(retains_testing__v)Hide field(s): Planned Quantity, Quantity Stored, Next Retain Pull Date, Last Retain Pull Date, Retains Testing Frequency, Retains Testing UnitHide section(s): <any retains-related sections>
- Add the following fields to the Lab Sample Details section of the object layout:
- Retain Lab Sample
- Set Status to Active.
- Create object lifecycle stages. You can mimic the configuration for Release Lab Samples.
- Create a new object type layout.
- Retain Inventory
- Set Status to Active.
- Create a new object type layout.
- Retain Inventory Summary
- Set Status to Active.
- Retain Testing Spec Execution
- Make the following additions and changes to the Lab Sample object lifecycle:
- Retained lifecycle state:
- User Action(s)
- Initiate Retains Testing
- Entry Action(s):
If Retains Testing = Yes && Retains Testing Unit = YearsNext Retain Pull Date = DateTimeValue(spec_execution__vr.batch_manufacture_date__v + Years(retains_testing_frequency__v))If Retains Testing = Yes && If Retains Testing Unit = MonthsNext Retain Pull Date = DateTimeValue(spec_execution__vr.batch_manufacture_date__v + Months(retains_testing_frequency__v))If Retains Testing = Yes && If Retains Testing Unit = DaysNext Retain Pull Date = DateTimeValue(spec_execution__vr.batch_manufacture_date__v + Days(retains_testing_frequency__v))
- User Action(s)
- Testing Complete state:
- Optional: If Object Type is Retain Lab Sample, add a workflow to modify the Quantity Returned
- Unreceived state:
- User Action(s):
- Update the Deliver Sample workflow conditions to include Retains Testing Spec Execution
- Update the Receive Sample workflow conditions to include Retains Testing Spec Execution
- User Action(s):
- Retained lifecycle state:
- Make the following changes to workflows:
- Lab Sample: Sample Receipt
- Update the Change state based on Type step to use the standard
retains_testing__vfield- Change State to Retained formula:
object_type__vr.api_name__v = 'release_lab_sample__v' && (retains_testing__v = true || (sample_type__v = Picklist.sample_type__v.retains__v || sample_type__v = Picklist.sample_type__v.qc_backup__v)) - Change State to Not Started formula:
not(object_type__vr.api_name__v = 'release_lab_sample__v' && (retains_testing__v = true || (sample_type__v = Picklist.sample_type__v.retains__v || sample_type__v = Picklist.sample_type__v.qc_backup__v)))
- Change State to Retained formula:
- Update the Change state based on Type step to use the standard
- Lab Sample: Modify Returned Amount
- In the Instructions field, add Enter the total quantity of this sample that has been returned to storage.
- Add prompts for the Quantity Returned and Unit of Measure fields.
- Lab Sample: Disposal
- On the Start step, add Instruction 2: Confirm that the sample should be moved to the disposed location and that the remaining Retain Inventory should be disposed.
- Add the following Start step rules:
-
Retain Inventory exists Formula:
retains_testing__vHidden: Instruction 1 -
Retain Inventory does not exist
- Formula:
not(retains_testing__v) - Hidden: Instruction 2
- Formula:
-
- Add an Action step to update Retain Inventory:
If Retains Testing = YesUpdate related record field: InventoriesDisposed? = trueDate of Disposal = Now()Quantity Disposed = inventory_record__vr.quantity_remaining__v
- Lab Sample: Sample Receipt
Required Permissions
The following permissions are required to work with the Retains Testing feature:
Design Data Admin Permission Set
- SDSA Object
- Text Creation Exclusion (Read, Edit)
LIMS Retains User Permission Set
- Retain Inventory Object Type
- Read, Create, Edit
- Retain Inventory Summary Object Type
- Read, Create, Edit
- Retain Lab Sample Object Type
- Read, Create, Edit
- Retain Testing Spec Execution Object Type
- Read, Create, Edit
- Retain Testing Input
- Read, Create, Edit
Groups
- Add LIMS Retains Specialist security profile to:
- All LIMS Users
- LIMS Sample Coordinators