Home : Dashboard Sample Due
Q14784 - INFO: Dashboard Sample Due

Used to place Lab Cal Sample Information for the next time certain samples are due in the next X days:

 

  

1. Pick the Sample Definitions to display using the ... button.  NOTE: You can enter any valid SQL Where Clause using the LC_SAMPLEDEF table (aliased as D).

2. Pick how may days out you want to search

3. Number of records to locate.

4. Fields to display in result.

This will locate Sample Information for the next date/time any of these samples are due. 

SEE ALSO: SDI function to find the next time in the future a specific sample is due (i.e. show me the next time Radionuclides is due even if it is still 3 years in the future)

Example: Display if my radionuclides or quarterly metals are due in the next 60 days.

Since these are infrequent samples, I want to display them on my dashboard so we are aware these samples are coming up and can prep for taking them.

Radionuclides is once every 6 years and quarter metals are due quarterly.

  • Go to Dashboard, Samples Due
  • Use the ... button and choose the Radionuclides and quarter metals samples.  The Where will be set to D.ID IN (113,120) where 113 and 120 is the LC_SAMPLEDEF.ID.
  • Choose days, 2 records, and fields to display.

HINT: Locate the Sample Number, then use the STI to retrieve more information on the sample such as Location, Tests....

This locates SQLFIRST and SQLRESULT functions.

 

Tech Notes: 

Basic SQL Statement:

SELECT ID,Name,DCD,SAMPLENUM FROM
(SELECT D.NAME,D.ID, MIN(DATECOLLECTIONDUE) DCD, MIN(SAMPLENUM) SAMPLENUM
FROM LC_SAMPLEDEF D LEFT OUTER JOIN LC_SAMPLE S ON D.ID=S.SAMPLEDEFID
WHERE D.ID IN (78,113,120) AND S.SAMPLESTATUS = 0 GROUP BY D.NAME, D.ID) DD
WHERE DCD < '2024-04-12 00:00:00'

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 3/13/2024 5:33 PM.
Last Modified on 3/13/2024 5:33 PM.
Last Modified by Scott Dorner.
Article has been viewed 131 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article