The Hach WIMS Direct Server-Side Interface to Custom Utility Q14669 is a utility that pushes data from WIMS into csv files for processing/reporting by the LIMS. Which Variables to push is defined in the Variable's User Defines 3 field, see Supported Variable Configuration.
Utility Workflow:
For each WIMS facility with a variable cross referenced to the Utility:
-
Find all WIMS variables with the variable User Defined 3 field VARDESC.UD3 = 'Y'
Select Vardesc.Varnum,Vardesc.Varid,Vardesc.Name,Vardesc.VarType,Vardesc.Units,Location.Path
from Vardesc,Location where VarDesc.Locid = Location.Locid and VarDesc.UD3 = 'Y'
-
For each variable found in step 1, get all data that has been entered, changed or deleted and 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 = 1286
AND ((DATATBL.DATESTAMP >= '2021-07-01 00:00:00'
AND DATATBL.DATESTAMP <= '2021-07-19 14:24:00')
OR (DATATBL_I.DATESTAMP >= '2021-07-01 00:00:00'
AND DATATBL_I.DATESTAMP <= '2021-07-19 14:24:00'))
AND DATATBL.STATUS = 0 AND DATATBL_I.SENT_TO_LIMS_DATE IS NULL
Note: Deleted data is selected in a different query, looking at the audit trail with action = 3
-
Writes the Datatbl data to the csv file.
-
Writes the current date/time to the Datatlb_I.SENT_TO_LIMS_DATE to flag that the data point has been sent.