The Hach WIMS Direct Server-Side Interface to Custom Utility Q13643 is a utility that pushes data from WIMS into various LIMS tables for processing/reporting by the LIMS. Which Variables to push is defined in the Variable's Additional Info fields, see Supported Variable Configuration.
There are two (2) LIMS Destination table types that are supported by the Utility.
Type 1 are essentially wide format tables with an OP_DATE field and a series of fields for each value to be transferred. The following tables are Type 1: L_DIGESTERS,OP_ALLFLOWS,OP_CHEMICALS,OP_COMMENTS, OP_DIGESTERS.
Type 2 is a special table that has a Value and it's associated TS_Value with the following structure:
Utility Workflow:
For each WIMS facility with a variable cross referenced to the Utility:
-
Find all WIMS variables with the variable additional info fields VARDESC_I.LIMS_TABLE_NM and VARDESC_I.LIMS_COLUMN_NM filled in (i.e. not null)
Select VARDESC.VARNUM,VARDESC.VARID,VARDESC.SHORTNAME,VARDESC.DESCRIPTION, VARDESC.VARTYPE,VARDESC_I.LIMS_TABLE_NM,VARDESC_I.LIMS_COLUMN_NM,VARDESC_I.LIMS_CONVERSION_FACTOR_NUM,
VARDESC_I.LIMS_DECIMAL_PLACES_NUM,VARDESC_I.LIMS_TS_VARID,VARDESC_I.LIMS_PT_GROUP
FROM VARDESC,VARDESC_I
WHERE VARDESC.VARID=VARDESC_I.Varid AND VARDESC_I.LIMS_TABLE_NM IS NOT NULL AND LIMS_COLUMN_NM IS NOT NULL
-
For each variable found in step 1, get all data that has been changed, is approved (Status = 0), and SENT_TO_LIMS_DATE is null in the import date range:
Select DATATBL.*,DATATBL_I.SENT_TO_LIMS_DATE
FROM DATATBL LEFT OUTER JOIN DATATBL_I ON DATATBL.VARID = DATATBL_I.VARID
AND DATATBL.DATESTAMP=DATATBL_I.DATESTAMP
WHERE DATATBL.VARID = 19997
AND DATATBL.AUDITTIMESTAMP >= TO_DATE('21-Feb-2012 12:00:00 AM', 'dd-Mon-yyyy HH:MI:SS AM')
AND DATATBL.AUDITTIMESTAMP <= TO_DATE('22-Feb-2012 04:17:00 PM', 'dd-Mon-yyyy HH:MI:SS AM')
AND DATATBL.STATUS = 0
AND DATATBL_I.SENT_TO_LIMS_DATE IS NULL
-
Writes the Datatbl data to the LIMS Destination table (i.e. OP_DIGESTER, OMD_TBL...)
-
Writes the current date/time to the Datatlb_I.SENT_TO_LIMS_DATE to flag that the data point has been sent.