Hashtable hashtable = getPatientHashtable();
for (Enumeration e = hashtable.keys(); e.hasMoreElements();) {
HealthRecord patient = (HealthRecord) hashtable.get(e.nextElement());
String patientName = patient.getName().getValue();
//deleting possible spaces
patientName = patient.getName().getValue().substring(patientName.lastIndexOf(" ") + 1, patientName.length());
if (patientName.toLowerCase().startsWith(stringToMatch.toLowerCase())) {
returnVector.addElement(patient);
}
}
return returnVector;