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:

  1. Set retain__v to Active on the Mode of Sample Creation and Sample Association Type picklists.
  2. Update the following objects:
    1. Spec Execution
      1. Remove the state__v = 'effective_state__v Spec Data VQL and move it to the Object Type level for the following types:
        1. Batch Release
        2. Stability
        3. Prepared Consumable
      2. Update the name_prefix__c field 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",""))

    2. Spec Data
      1. Default retains_testing_frequency__v to 1
      2. Default Retains Testing Unit to RecordByUniqueField($quality_unit_of_measure__v, {$name__v:"Years"}, true)
    3. Retain Testing Input
      1. Add the following custom fields:
        1. Current Location (current_location__c): Lookup from Release Lab Sample
        2. Release Sample Received Date: Default from Release Sample
      2. Create a new object layout with the following layout rules:
        1. Override Next Retain Pull Date not(override_next_retain_pull_date__v) Read Only: Next Retain Pull Date
        2. Location Change new_location__v != current_location__c && not(isBlank(new_location__v)) Required: Quantity Pulled, Unit of Measure
        3. Unscheduled Pull not(scheduled__v) Required: Comments, New Location
  3. Make the following changes to Object Types:
    1. Retain Testing Spec Execution
      1. Set Status to Active.
    2. Release Lab Sample
      1. Add the following fields to the Lab Sample Details section of the object layout:
        1. Retain Testing
        2. Retains Testing Frequency
        3. Retains Testing Unit
      2. Add the following fields to the Key Dates section:
        1. Last Retain Pull Date
        2. Next Retain Pull Date
      3. 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 Unit Hide section(s): <any retains-related sections>
    3. Retain Lab Sample
      1. Set Status to Active.
      2. Create object lifecycle stages. You can mimic the configuration for Release Lab Samples.
      3. Create a new object type layout.
    4. Retain Inventory
      1. Set Status to Active.
      2. Create a new object type layout.
    5. Retain Inventory Summary
      1. Set Status to Active.
  4. Make the following additions and changes to the Lab Sample object lifecycle:
    1. Retained lifecycle state:
      1. User Action(s)
        1. Initiate Retains Testing
      2. Entry Action(s):
        1. If Retains Testing = Yes && Retains Testing Unit = Years Next Retain Pull Date = DateTimeValue(spec_execution__vr.batch_manufacture_date__v + Years(retains_testing_frequency__v))
        2. If Retains Testing = Yes && If Retains Testing Unit = Months Next Retain Pull Date = DateTimeValue(spec_execution__vr.batch_manufacture_date__v + Months(retains_testing_frequency__v))
        3. If Retains Testing = Yes && If Retains Testing Unit = Days Next Retain Pull Date = DateTimeValue(spec_execution__vr.batch_manufacture_date__v + Days(retains_testing_frequency__v))
    2. Testing Complete state:
      1. Optional: If Object Type is Retain Lab Sample, add a workflow to modify the Quantity Returned
    3. Unreceived state:
      1. User Action(s):
        1. Update the Deliver Sample workflow conditions to include Retains Testing Spec Execution
        2. Update the Receive Sample workflow conditions to include Retains Testing Spec Execution
  5. Make the following changes to workflows:
    1. Lab Sample: Sample Receipt
      1. Update the Change state based on Type step to use the standard retains_testing__v field
        1. 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))
        2. 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)))
    2. Lab Sample: Modify Returned Amount
      1. In the Instructions field, add Enter the total quantity of this sample that has been returned to storage.
      2. Add prompts for the Quantity Returned and Unit of Measure fields.
    3. Lab Sample: Disposal
      1. 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.
      2. Add the following Start step rules:
        1. Retain Inventory exists Formula: retains_testing__v Hidden: Instruction 1

        2. Retain Inventory does not exist

          1. Formula: not(retains_testing__v)
          2. Hidden: Instruction 2
      3. Add an Action step to update Retain Inventory: If Retains Testing = Yes Update related record field: Inventories Disposed? = true Date of Disposal = Now() Quantity Disposed = inventory_record__vr.quantity_remaining__v

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