Following error is seen in eHealth log.
06/06/14 15:34:18,Error,Pgm nhiRegStats[Active]: Sql Error occurred during operation select r.sample_time, r.element_id, nvl(r.delta_time,0),
Please run the following command from eHealth server:
$NH_HOME/bin/sys/nhisql "select count(*) from nh_reg0_wip where delta_time < 0"
If the returned count is anything other than zero then the issue is with the poll times for some rows of data came in as negative values. Since a negative time is impossible, the nhiRegStats process which actions the data fails out continuously.
This issue can be fixed by changing those values to a positive number. Please follow the steps below to resolve.
Note: You may experience a temporary performance issue after fixing the negative values, as the nhiRegStats process will start working on the accumulated data that it couldn't touch while the error was in effect. You will want to watch the DB drive to be sure that there are no space issue during this time. If you see that the drive is filling up, you can run the following command to clear out old archive logs.
e:/ehealth/bin/nhDbMaint -u $NH_USER -d $NH_RDBMS_NAME -deleteArchiveLogs