Examples of DirectoryPathron


Examples of clips.delegate.directory.simple.pathron.DirectoryPathron

        }
        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) {
View Full Code Here

Examples of clips.delegate.directory.simple.pathron.DirectoryPathron

            throw new ClipsException("Ошибка при чтении данных из файла " + dbf.getName(), ex);
        }
        int recordCount = dbf.getRecordCount();
        DirectorySurname dirSurname = DirectoryLocator.getDirectory(DirectorySurname.class);
        DirectoryName dirName = DirectoryLocator.getDirectory(DirectoryName.class);
        DirectoryPathron dirPathron = DirectoryLocator.getDirectory(DirectoryPathron.class);
        DirectoryDisabilityType dirDisability = DirectoryLocator.getDirectory(DirectoryDisabilityType.class);
        ArrayList<LNumberChunk> lNumberChunkList = new ArrayList<LNumberChunk>(recordCount);
        HashSet<Integer> lnumSet = new HashSet<Integer>();
        for (int i = 0; i < recordCount; i++) {
            try {
                dbf.read();
                if (dbf.deleted()) {
                    continue;
                }
                LNumberChunk c = new LNumberChunk();
                c.lnumber = Integer.parseInt(fieldsKadr.get(ColKadr.LNUMBER).get().trim());
                if (lnumSet.contains(c.lnumber)) {
                    continue;
                } else {
                    lnumSet.add(c.lnumber);
                }


                c.famID = dirSurname.getItemFromTitle(Converter.firstUpper(fieldsKadr.get(ColKadr.FAMILY).get().trim(), true)).getID();
                c.nameID = dirName.getItemFromTitle(Converter.firstUpper(fieldsKadr.get(ColKadr.NAME).get().trim(), true)).getID();
                c.patronID = dirPathron.getItemFromTitle(Converter.firstUpper(fieldsKadr.get(ColKadr.FATHER).get().trim(), true)).getID();
                c.born = null;
                try {
                    Calendar bornDate = ((DateField)fieldsKadr.get(ColKadr.BITHDATE)).getCalendar();
                    bornDate.set(Calendar.HOUR_OF_DAY, 0);
                    bornDate.set(Calendar.MINUTE, 0);
View Full Code Here

Examples of clips.delegate.directory.simple.pathron.DirectoryPathron

                ClientLocal clientLocal = new ClientLocal(getAuditManager());
                CardInfo cardInfo = ((AppMainWindow) MainWindow.getMainWindow()).getCardInfo();
                if (cardInfo != null){
                    DirectorySurname surname = DirectoryLocator.getDirectory(DirectorySurname.class);
                    DirectoryName name = DirectoryLocator.getDirectory(DirectoryName.class);
                    DirectoryPathron pathron = DirectoryLocator.getDirectory(DirectoryPathron.class);
                    clientLocal.setSurname(surname.getItemFromTitle(cardInfo.surname));
                    clientLocal.setName(name.getItemFromTitle(cardInfo.name));
                    clientLocal.setPathron(pathron.getItemFromTitle(cardInfo.patron));
                    clientLocal.setBorn(cardInfo.born);
                    clientLocal.setInn(cardInfo.inn);
                    clientLocal.setSex(dirSex.getItemFromTitle(cardInfo.sex));
                    clientLocal.setSnils(cardInfo.snils);
                }
View Full Code Here

Examples of clips.delegate.directory.simple.pathron.DirectoryPathron

    public ErrorList fillRegLpu(List<RegisterData> list) throws xBaseJException, IOException, ClipsException {
        try {
            DirectorySurname dirSurname = DirectoryLocator.getDirectory(DirectorySurname.class);
            DirectoryName dirName = DirectoryLocator.getDirectory(DirectoryName.class);
            DirectoryPathron dirPatron = DirectoryLocator.getDirectory(DirectoryPathron.class);
            DirectoryReceptionType dirRecType = DirectoryLocator.getDirectory(DirectoryReceptionType.class);
            DirectorySocialStatus dirStatus = DirectoryLocator.getDirectory(DirectorySocialStatus.class);
            DirectoryDocumentType dirDocType = DirectoryLocator.getDirectory(DirectoryDocumentType.class);
            DirectoryRegionIdCode dirRegCode = DirectoryLocator.getDirectory(DirectoryRegionIdCode.class);
            dirInsurer = DirectoryLocator.getDirectory(DirectoryInsurer.class);
            DirectoryKladr dirKladr = DirectoryLocator.getDirectory(DirectoryKladr.class);
            DirectoryKladrType dirKladrType = DirectoryLocator.getDirectory(DirectoryKladrType.class);
            DirectoryDiseaseResult dirDisResult = DirectoryLocator.getDirectory(DirectoryDiseaseResult.class);
            DirectoryDvr dirDvr = DirectoryLocator.getDirectory(DirectoryDvr.class);
            DirectoryDiagnosisEncounter dirDiagEnc = DirectoryLocator.getDirectory(DirectoryDiagnosisEncounter.class);
            DirectoryMedicalAidType dirVmu = DirectoryLocator.getDirectory(DirectoryMedicalAidType.class);
            DirectoryVisitingPurpose dirVisPurp = DirectoryLocator.getDirectory(DirectoryVisitingPurpose.class);

            ErrorList target = new ErrorList();
            count = 0;
            for (RegisterData data : list) {
                if (!needWrite(data)) {
                    continue;
                }
                int id = data.id;

                //ID
                lf.id.put(id, target, data.uuid);
                //System.out.println("Запись посещения id = " + id);

                //HISTORY
                if (data.history.trim().isEmpty()) {
                    target.add(id, "Номер мед. карты не указан", ErrorList.CLIENT_ERROR);
                }
                lf.history.put(id, target, data.history);

                //FAM
                if (data.fam == 0) {
                    target.add(id, "Фамилия не указана", ErrorList.CLIENT_ERROR);
                    lf.fam.put(id, target, "");
                } else {
                    String surname = dirSurname.getItemFromID(data.fam).getTitle();
                    if (surname.trim().isEmpty()) {
                        target.add(id, "Фамилия пустая", ErrorList.CLIENT_ERROR);
                    }
                    lf.fam.put(id, target, surname);
                }

                //NAM
                if (data.nam == 0) {
                    target.add(id, "Имя не указано", ErrorList.CLIENT_ERROR);
                    lf.nam.put(id, target, "");
                } else {
                    String name = dirName.getItemFromID(data.nam).getTitle();
                    if (name.trim().isEmpty()) {
                        target.add(id, "Имя пустое", ErrorList.CLIENT_ERROR);
                    }
                    lf.nam.put(id, target, name);
                }

                //FNAM
                if (data.fnam == 0) {
                    target.add(id, "Отчество не указано", ErrorList.CLIENT_ERROR);
                    lf.fnam.put(id, target, "-");
                } else {
                    String patron = dirPatron.getItemFromID(data.fnam).getTitle();
                    if (patron.trim().isEmpty()) {
                        target.add(id, "Отчество пустое", ErrorList.CLIENT_ERROR);
                        patron = "-";
                    }
                    lf.fnam.put(id, target, patron);
                }

                //POL_SER
                lf.pol_ser.put(id, target, data.pol_ser);

                //POL_NUM
                if (data.pol_num.equals("0000000000000000")) {
                    target.add(id, "Полис фиктивный", ErrorList.CLIENT_ERROR);
                }
                lf.pol_num.put(id, target, data.pol_num);

                //BDAY
                if (data.bday == null) {
                    target.add(id, "Дата рождения не указана", ErrorList.CLIENT_ERROR);
                    lf.bday.put("");
                } else {
                    Calendar cal = Calendar.getInstance();
                    cal.setTime(data.bday);
                    lf.bday.put(cal);
                }

                //SEX
                if (data.sex == 0) {
                    target.add(id, "Пол не указан", ErrorList.CLIENT_ERROR);
                }
                lf.sex.put(data.sex);

                //STATUS
                if (data.status == 0) {
                    target.add(id, "Социальный статус не указан", ErrorList.CLIENT_ERROR);
                    lf.status.put(0);
                } else {
                    try {
                        String extKey = dirStatus.getItemFromID(data.status).getExtKey();
                        lf.status.put(Integer.parseInt(extKey));
                    } catch (NumberFormatException ex) {
                        target.add(id, "Код социального статуса должен быть числом", ErrorList.CLIENT_ERROR);
                        lf.status.put(0);
                    }

                }

                //PRED
                lf.pred.put(data.pred);

                //P_STATUS
                if (data.p_status == 0) {
                    lf.p_status.put("");
                } else {
                    lf.p_status.put(data.p_status);
                }

                //P_FAM
                if (data.p_fam == 0) {
                    lf.p_fam.put(id, target, "");
                } else {
                    lf.p_fam.put(id, target, dirSurname.getItemFromID(data.p_fam).getTitle());
                }

                //P_NAM
                if (data.p_nam == 0) {
                    lf.p_nam.put(id, target, "");
                } else {
                    lf.p_nam.put(id, target, dirName.getItemFromID(data.p_nam).getTitle());
                }

                //P_FNAM
                if (data.p_fnam == 0) {
                    lf.p_fnam.put(id, target, "");
                } else {
                    lf.p_fnam.put(id, target, dirPatron.getItemFromID(data.p_fnam).getTitle());
                }

                //C_OKSM
                if (data.c_oksm.trim().isEmpty()) {
                    target.add(id, "Гражданство не указано", ErrorList.CLIENT_ERROR);
View Full Code Here

Examples of clips.delegate.directory.simple.pathron.DirectoryPathron

            public void setSelectedDirectoryItem(DirectoryNameItem item) throws ClipsException {
                getObject().setName(item);
            }
        });
        //Комбо с отчествами
        DirectoryPathron dirPathron = DirectoryLocator.getDirectory(DirectoryPathron.class);
        autoModels.add( new DirectorySimpleFilteredComboBoxModel<ClientLocal, DirectoryPathronItem> (jComboPathron, clientLocal, dirPathron) {

            @Override
            public DirectoryPathronItem getSelectedDirectoryItem() throws ClipsException {
                return getObject().getPathron();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.