add time condition to getMostViewedPatient