Package beans.doctor.diagnosis

Examples of beans.doctor.diagnosis.DiagnosisDetails


                //Больничного нет, пробегаем
                counter++;
                continue;
            }

            DiagnosisDetails diag = null;
            CollaboratorFunctionsChunk cfc = null;
            for (int i = 0; i < sstData.dniList.size(); i++) {
                DniData dni = sstData.dniList.get(i);
                System.out.println("Поиск больничного по посещению (" + counter/size*100 + "%)");

                String serviceCode = dni.mes.substring(3);
                int serviceID = serviceMap.get(serviceCode).getID();
                cfc = findCollFuncByExtKey(String.valueOf(dni.idWrach), sstData.vmu);

                try {
                    diag = updaterStattalonBean.get().getDiagnosisDetails(serviceID, emcID, cfc.getId(), dni.date);
                    if (diag != null) {
                        break;
                    }
                } catch (Exception ex) {
                    updaterStattalonBean.clear();
                    System.out.println(MessageBox.parseException(ex));
                    out.println(MessageBox.parseException(ex));
                }
            }
            if (diag != null) {
                SicklistDetails s = null;
                try {
                    //Проверить есть ли на данный диагноз и посещение больничный
                    s = updaterStattalonBean.get().getSicklist(diag.id);
                } catch (Exception ex) {
                    updaterStattalonBean.clear();
                    System.out.println(MessageBox.parseException(ex));
                    out.println(MessageBox.parseException(ex));
                    counter ++;
                    continue;
                }
                if (s == null) {
                    //Только если есть диагноз и больничный для него отсутствует в базе то создаем больничный
                    s = new SicklistDetails();
                }
                // s.organizationID = UserInfo.get().getCollaborator().getLpu().getID();
                EmcLocal emc = new EmcLocal(emcID, am);
                List<JobLocal> jobList = emc.getClient().getJobList();
                if (jobList.size() > 0) {
                    s.entID = jobList.get(0).getEnterprise().getID();
                }
                s.diagOpenID = diag.getId();
                s.disabID = sstData.blPrich != 0 ? sstData.blPrich : 1;
                if (!sstData.blSex.isEmpty() || !sstData.blAge.isEmpty()) {
                    //Указаны поля по уходу
                    s.disabID = DisabilityType.DISABILITY_TYPE_DISEATED_SUPPORT;
                }
                s.openerID = cfc.getCollaborator().getID();
                s.dateOpen = sstData.blBeg;
                SickLongDetails sld = new SickLongDetails();
                sld.collID = cfc.getCollaborator().getID();
                sld.date = sstData.blEnd;
                sld.serrenID = diag.serviceRenderID;
                s.sickLongList = new ArrayList<SickLongDetails>();
                s.sickLongList.add(sld);
                /*try {
                    sickListBean.get().initByID(s.id, UserInfo.get().getSessionId());
                    sickListBean.get().updateImpl(s);
                } catch (Exception ex) {
                    sickListBean.clear();
                    System.out.println(MessageBox.parseException(ex));
                    continue;
                }*/
                //Создан успешно теперь выставляем серийник.
                s.serial = "АА 0000000";
                s.registratorID = UserInfo.get().getCollaborator().getID();
                /*try {
                    sickListBean.get().initByID(s.id, UserInfo.get().getSessionId());
                    sickListBean.get().updateImpl(s);
                } catch (Exception ex) {
                    sickListBean.clear();
                    System.out.println(MessageBox.parseException(ex));
                    continue;
                }*/
                //Серийник выставлен успешно теперь закрываем.
                s.dateToWork = DateTimeUtils.getNextDay(sstData.blEnd);
                s.diagCloseID = diag.getId();
                s.serrenCloseID = diag.serviceRenderID;
                s.closerID = cfc.getCollaborator().getID();
                try {
                    sickListBean.get().initByID(s.id, UserInfo.get().getSessionId());
                    sickListBean.get().update(s);
View Full Code Here


        Iterator i = list.iterator();
        List<Pair<DiseaseDetails, DiagnosisDetails>> detailsList = new ArrayList<Pair<DiseaseDetails, DiagnosisDetails>>();
        while(i.hasNext()) {
            Disease s = (Disease) i.next();
            DiagnosisDetails diagnosysDiagnosis = map.get(s);
            DiseaseDetails diseaseDetails = s.getDetails((RightChecker) this);
            detailsList.add(new Pair<DiseaseDetails, DiagnosisDetails>(diseaseDetails, diagnosysDiagnosis));
        }
        return detailsList;
    }
View Full Code Here

        int mainDiagId = 0;
        for (DiagnosChunk dc : c.diagList) {
            //записываем диагнозы
            DiagnosisBeanRemote bean = getBean(DiagnosisBean.class);
            bean.initByID(0, getSessionId());
            DiagnosisDetails d = new DiagnosisDetails();
            d.author = null;              //Кто поставил (только если из др клиники)
            d.date = dc.dateDs;           //Дата постановки диагноза
            d.mkbID = dc.mkbID;           //диагноз по мкб
            if (dc.diagTypeID == 0) {
                if (mainDiagId == 0) {
View Full Code Here

        serviceRender.initBy(serRen);
    }

    @Override
    protected DiagnosisDetails getNewDetails() {
        return new DiagnosisDetails();
    }
View Full Code Here

    public List<DiagnosisLocal> getFullDiagnosisList(int diseaseID) throws ClipsException {
        List<DiagnosisLocal> res = new ArrayList<DiagnosisLocal>();
        try {
            List<DiagnosisDetails> list = getBean().getFullDiagnosisList(diseaseID);
            for (int i = 0; i < list.size(); i++) {
                DiagnosisDetails dd = list.get(i);
                SerRenLocal serren = new SerRenLocal(dd.serviceRenderID, getAuditListener());
                DiagnosisLocal diagnosisLocal = new DiagnosisLocal(dd, serren, getAuditListener());
                res.add(diagnosisLocal);
            }
        } catch (ClipsServerException ex) {
View Full Code Here

TOP

Related Classes of beans.doctor.diagnosis.DiagnosisDetails

Copyright © 2018 www.massapicom. 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.