List<Patient> patientList = patientDAO.loadAll();
Map<Date, Integer> freqMap = new Hashtable<Date, Integer>();
for (Patient patient : patientList) {
if (patient.valid()){
DateMidnight dm = new DateMidnight(patient.getVisitDate());
int i = (freqMap.get(dm.toDate()) == null? 0: freqMap.get(dm.toDate()));
freqMap.put(dm.toDate(), ++i);
}
}
Set<Date> keys = freqMap.keySet();
for (Date date : keys) {