The Cancel Samples module allows a user to cancel a sample and all of its children/grandchildren samples. Furthermore, all test and result records associated with the selected sample and all of its children are canceled as well, down to the bottom of that specific parentage tree.
For example, if a user cancels an interstitial water (IW) whole-round sample, LIME cancels that sample, the liquid sample squeezed out of the sample, the squeeze cake, all of the IW splits taken from the first liquid sample, and all of the measurements performed on any of those samples, along with the associated results.
The Cancel Samples process is reversible for the most part through the Uncancel Samples module.
Data insight: The Cancel Samples function operates by copying the current status of a sample to the previous_status field and then changing the status of the sample to the canceled state. Thus, restoring the sample is a simple matter of switching the previous_status (active, in this case) with the status (canceled, in this case).
The user account privileges for the Cancel Samples module are based on sample type. A user may be given sample type = ALL, in which case their account can operate on all sample types (typically restricted to curatorial staff and laboratory officers). In most cases, users are granted privileges for specific sample types depending on their laboratory functions (e.g., samples taken at the sampling table).
1. |
Determine what samples need to be canceled and why. |
2. |
Perform a search as described in “Search Functions.” The query returns only active samples. |
3. |
The results table displays with the sample tree collapsed by default. Click “Expand All” to view the sample hierarchy. (Use the arrows at each level of the tree to collapse or expand specific levels.) |
4. |
Select checkboxes for one or more samples to be canceled. Note that checking some samples automatically unchecks other samples to ensure a valid operation occurs. Once at least one sample is selected, the “CANCEL SAMPLES” button on the left panel activates. |
5. |
Click the “CANCEL SAMPLES” button. |
6. |
An audit trail pop-up window (Fig. 13) appears, prompting for a reason for taking this action. Enter a reason (5–150 characters). |
7. |
Click “Save Reason and continue” to start the cancel function. The “NO CHANGE and return” button returns the user to the previous state and no database action occurs. |
8. |
Once “Save Reason and continue” button is clicked, the selected samples are canceled (a counter appears on the screen to indicate progress), after which the original SEARCH is run again; the canceled samples and their children no longer appear in the query results table. |
Figure 13. Audit Trail Popup Window.
· |
If a TEXT_ID search was used, note that after the samples are canceled and the search runs again, those TEXT_IDs will not be found, returning a “TEXT_ID not found” error. This is the correct behavior for this module and confirms that the samples have been canceled. |
· |
If a Parameter search was used, only samples matching the parameter appear in the results table (without children). For example, if samples are searched by sample type, the children of a sample will not be found, as they are not of the specified sample type. |
· |
If a sample with many children, grandchildren, and tests and results is canceled (e.g., a core or section), the cancelation process may take some time. The user should be careful not to cancel high-ranked samples without good reason. |
· |
Selecting a child sample unchecks its parent sample, as that is an invalid action. |
· |
Selecting a grandchild sample unchecks the child and parent samples above it. |
· |
Selecting a parent sample unchecks any children or grandchildren samples below it. |
· |
Samples shown on the results table are limited by user account privilege and therefore may not show the complete hierarchy tree. |