Conditions for Applying System-managed Portion Attributes
If a portion's Location Code is changed, then:
- The portion's Checked In Date is set to the current server date-time.
- The portion's Checked In By User Code is set to the current user.
- If the location's Sample Prep Action is set to No Sample Prep Marking, then do not update the sample preparation scheme's Started Date and Completed Date.
- If the location's Sample Prep Action is set to Mark Sample Prep Started, then for any sample preparation scheme that does not have its Started Date populated, update the sample scheme's Started Date to the current server date-time, Started By to the current user, and Workflow Status to Started (which triggers the cascade engine).
- If the location's Sample Prep Action is set to Mark Sample Prep Completed, then for any sample preparation scheme that does not have its Completed Date populated, update the sample scheme's Completed Date to the current server date-time, Completed By User to the current user, and Workflow Status to Completed (which triggers the cascade engine).
If the portion's Sample Handling Code is changed, then:
- If the sample handling's Set Portion Is Active is set to Yes, then the portion's Is Active is selected.
- If the sample handling's Set Portion Is Active is set to No, then the portion's Is Active check box is cleared.
- The portion's Sample Handling Started Date is set to the current server date-time.
- The portion's Sample Handling Started By User Code is set to the current user.
- The portion's Sample Handling Due Date is set to the portion's Sample Handling Started Date + the sample handling's Duration. For example, 'In lab, Store 90 days' has 90 days duration, and 'Dispatched for subcontracting' has 0 days as it is an immediate change of sample handling.
