HR Module
Biometric & Mobile Import
Deduplication & Duplicate Detection

Deduplication & Duplicate Detection

Source: ImportBiometricAttendanceBO.csConstructAndUpdateEmpDT() + FindExistsInDB()

Deduplication Flow

Binary Search Performance

The system uses a sorted DataView for fast duplicate detection:

// DataView sorted by EmployeeId + DateAndTime
dvPreviousImports.Sort = "EmployeeId, DateAndTime";
 
// Binary search: O(log n) instead of O(n)
int index = dvPreviousImports.Find(new object[] { employeeId, dateAndTime });
bool exists = (index >= 0);

On-Duty (OD) Record Creation

The import process also checks t_SiteVisit_GPS for field visits and can auto-create OD records: