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.