modified overdue esi records query