Home : Products : Hach WIMS : Interfaces : Hach WIMS Direct Server-Side Interface to Generic LIMS OLE DB : Documentation : Topics specific to the operation of this interface : Using Generic LIMS Interface with ATL Samplemaster
Q14307 - INFO: Using Generic LIMS Interface with ATL Samplemaster

The generic LIMS Interface can be used with the ATL Samplemaster LIMS system.  NOTE:  Q12937 - Hach WIMS Direct Server-Side Interface to ATL Sample Master LIMS can also be used, however the Generic LIMS interface may be preferable when you need to use a custom query to return results from the LIMS. 

Example Query - Used in the Source Configuration, Advanced Settings Source Query field:

Samplemaster stores the results in the RESULTS and ORDERDETAILS tables.

SELECT o.site as SAMPLOC,
           r.param+'-'+o.matrix as ANALYTE,
           coalesce(r.qualifier,'')+r.result as FINAL,
           o.Startcollectdate as SAMPDATE,
           r.Commnt as RESULTCOMMENT,
           r.Qualifier as DataQualifier,
           r.samplenumber as SampleNum,
           r.units as Units
FROM SMSU.results  r, SMSU.orderdetails o 
WHERE o.samplenumber=r.samplenumber and r.resultstatus=3 and r.result is not null  and o.site is not null AND r.approveddate> #SD#   and r.approveddate< #ED# 
ORDER BY SAMPLOC, o.Startcollectdate


The bolded field names are required by the interface.  If they are not present, the query will run in ‘test’ config but the interface will not import any data.

The StartCollectDate is used to set the SAMPDATE (date values are stored in WIMS for).  Please review with the LIMS Admin as you may need to use the CollectDate field depending on how the customer handles composite samples. 

Since the generic interface only allows the entry of the LIMS_LOC and LIMS_TEST in the variable and the customer requires the matrix to be specified, the query concatenates the two ( r.parm+’-‘+o.matrix  ie. pH-WW in var setup)

The FINAL field needs to be the data qualifier and the result. Since not all results will have qualifier, therefore being null, concatenating the two fields will not work.  You must use the 'coalesce(r.qualifier,’’)' so that nulls will be concatenated as empty strings and any qualifiers will just be added.

NOTE: #SD# and #ED# will be replaced with the start date and end date of import date range when the query is executed. They will be formatted properly for the source database type.

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 2/5/2015 5:16 PM.
Last Modified on 2/16/2015 9:52 AM.
Last Modified by Mathew Eckert.
Article has been viewed 2304 times.
Rated 7 out of 10 based on 4 votes.
Print Article
Email Article