int recordCount = dbf.getRecordCount();
DirectorySurname dirSurname = DirectoryLocator.getDirectory(DirectorySurname.class);
DirectoryName dirName = DirectoryLocator.getDirectory(DirectoryName.class);
DirectoryPathron dirPathron = DirectoryLocator.getDirectory(DirectoryPathron.class);
DirectorySpeciality dirSpec = DirectoryLocator.getDirectory(DirectorySpeciality.class);
DirectoryReceptionType dirRecType = DirectoryLocator.getDirectory(DirectoryReceptionType.class);
DirectoryDvr dirDvr = DirectoryLocator.getDirectory(DirectoryDvr.class);
DirectoryMedicalAidType dirVmu = DirectoryLocator.getDirectory(DirectoryMedicalAidType.class);
colDataList = new ArrayList<CollabData>();
colClientMap = new HashMap<ColDataKey, ArrayList<ClientLocal>>();
for (int i = 0; i < recordCount; i++) {
try {
dbf.read();
if (dbf.deleted()) {
continue;
}
if (fields.get(Col.FAMILY).get().trim().isEmpty()) {
continue;
}
String extKey = fields.get(Col.ID).get().trim();
DirectorySurnameItem surename = dirSurname.getItemFromTitle(fields.get(Col.FAMILY).get().trim());
if (surename == null) {
DirectoryItemDetails d = new DirectoryItemDetails(fields.get(Col.FAMILY).get().trim());
surename = new DirectorySurnameItem(d);
dirSurname.getItems().append(surename);
}
int surnameID = surename.getID();
DirectoryNameItem name = dirName.getItemFromTitle(fields.get(Col.NAME).get().trim());
if (name == null) {
DirectoryItemDetails d = new DirectoryItemDetails(fields.get(Col.NAME).get().trim());
name = new DirectoryNameItem(d);
dirName.getItems().append(name);
}
int nameID = name.getID();
//Финт ушами - исправление отчества
String father = fields.get(Col.FATHER).get().trim();
if (father.equals("Тимирьянович")) {
father = "Тимерзянович";
}
DirectoryPathronItem pathron = dirPathron.getItemFromTitle(father);
if (pathron == null) {
DirectoryItemDetails d = new DirectoryItemDetails(father);
pathron = new DirectoryPathronItem(d);
dirPathron.getItems().append(pathron);
}
int pathronID = pathron.getID();
int specID = dirSpec.getItemFromExtKey(fields.get(Col.KOD_SPEC).get().trim()).getID();
DirectoryReceptionTypeItem recType = dirRecType.getItemFromExtKey(fields.get(Col.KOD_PRIEM).get().trim());
if (recType == null) {
recType = dirRecType.getItemFromExtKey("600");
}
int receptionTypeID = recType.getID();