Vector allHealthRecords = ((HealthRecordViewModel) getModel()).getHealthRecordIndex().getAllHealthRecords();
Vector singleHealthRecord = new Vector();
Hashtable ht;
setVectorHealthRecords(new Vector());
Vector healthRecordNameId = new Vector();
String st;
for (int i = 0; i < allHealthRecords.size(); i++) {
ht = (Hashtable) (allHealthRecords.elementAt(i));
healthRecordNameId.add(((org.resmedicinae.resmedlib.term.String) ht.get(HealthRecordIndex.NAME)).getValue() +
"###" + ((org.resmedicinae.resmedlib.term.String) ht.get(HealthRecordIndex.FIRSTNAME)).getValue() + "###" +
((org.resmedicinae.resmedlib.term.String) ht.get(HealthRecordIndex.ID)).getValue());
}
SortedSet sortedSet = Collections.synchronizedSortedSet(new TreeSet(healthRecordNameId));
Iterator iterator = sortedSet.iterator();
while (iterator.hasNext()) {
st = iterator.next().toString();
singleHealthRecord = new Vector();
String st1 = st.substring(0, st.indexOf("###"));
st = st.substring(st.indexOf("###") + 3);
String st2 = st.substring(0, st.indexOf("###"));
st = st.substring(st.indexOf("###") + 3);
singleHealthRecord.add(st);
singleHealthRecord.add(st2);
singleHealthRecord.add(st1);
getVectorHealthRecords().add(singleHealthRecord);