//if only userid and no ssn, show only one hit for each patient
if (loggedUserid == null && ssn != null) {
//if only ssn remove all duplicate users
for(Iterator<Patientlogview> it = col.iterator(); it.hasNext();) {
Patientlogview logview = it.next();
if(tempCol.contains(logview.getUserid())) {
it.remove();
}else {
tempCol.add(logview.getUserid());
}
}
//if only ssn and no userid, show only one hit for each user
} else if (loggedUserid != null && ssn == null) {
for(Iterator<Patientlogview> it = col.iterator(); it.hasNext();) {
Patientlogview logview = it.next();
if(tempCol.contains(logview.getPid())) {
it.remove();
}else {
tempCol.add(logview.getPid());
}
}
}
//get the patientid once for each patient