Package beans.doctor.checkup

Examples of beans.doctor.checkup.Checkup


            new Field("checkupType.isAnalyse", true)
        };
        List list = findEntityList(Checkup.class, field);
        Iterator i = list.iterator();
        while(i.hasNext()) {
            Checkup j = (Checkup) i.next();
            res.add(j.getDetails((RightChecker) this));
        }
        return res;
    }
View Full Code Here


            new Field("checkupType.isAnalyse", false)
        };
        List list = findEntityList(Checkup.class, field);
        Iterator i = list.iterator();
        while(i.hasNext()) {
            Checkup j = (Checkup) i.next();
            res.add(j.getDetails((RightChecker) this));
        }
        return res;
    }
View Full Code Here

            new Field("checkupShedule", "", Field.OPERATOR_IS_NULL),
        };
        List list = findEntityList(Checkup.class, field);
        Iterator i = list.iterator();
        while(i.hasNext()) {
            Checkup j = (Checkup) i.next();
            res.add(j.getDetails((RightChecker) this));
        }
        //расписание просрочено
        Date current = new Date();
        current = DateTimeUtils.getDateOnly(current);
        Field[] field1 = {
            new Field("serviceRender.renderedDate", "", Field.OPERATOR_IS_NULL),
            new Field("serviceRender.functions", "", Field.OPERATOR_IS_NULL),
            new Field("serviceRender.cancelled", false),
            new Field("checkupType.isAnalyse", true),
            new Field("checkupShedule.date", current, Field.OPERATOR_LESS)
        };
        list = findEntityList(Checkup.class, field1);
        i = list.iterator();
        while(i.hasNext()) {
            Checkup j = (Checkup) i.next();
            res.add(j.getDetails((RightChecker) this));
        }
        return res;
    }
View Full Code Here

            AuditDoc auditDoc, List<AuditDoc> auditDocList) throws ClipsServerException{
        super.onUpdate(entity, details, auditDoc, auditDocList);
        CheckupDicomDetails d = (CheckupDicomDetails) details;
       
        //проверка даты
        Checkup checkup = findEntity(Checkup.class, d.checkupID);
        DicomDeviceParams devise = findEntity(DicomDeviceParams.class, d.deviceParamsID);
       
        entity.setCheckup(checkup);
    entity.setDeviceParams(devise);
    }
View Full Code Here

            AuditDoc auditDoc, List<AuditDoc> auditDocList)
            throws ClipsServerException{
        if (details instanceof HasServiceRenderID) {
            serviceRender = findEntity(ServiceRender.class, ((HasServiceRenderID)details).getServiceRenderID());
        } else if (details instanceof CheckupDicomDetails) {
            Checkup checkup = findEntity(Checkup.class,((CheckupDicomDetails)details).checkupID);
            serviceRender = checkup.getServiceRender();
        } else {
            throw new ClipsServerException("Медицинские данные не относятся к услуге");
        }
        initBeanRights();
        if (isSuperUser()) {
View Full Code Here

                Field fields[] = {
                    new Field("serviceRender", entity),
                };       
                List<Checkup> list = findEntityList(Checkup.class, fields);
                for (int i = 0; i < list.size(); i++) {
                    Checkup checkup = list.get(i);
                    checkup.setCheckupShedule(null);
                    manager.merge(checkup);
                }
            }
        }
    else {//услуга оказана
View Full Code Here

            newI = findEntityList(Checkup.class, fn).iterator();
        }
        ArrayList<AuditDetails> auditDetailsList = new ArrayList<AuditDetails>();
        if (oldI != null) {
            while (oldI.hasNext()) {
                Checkup checkup = oldI.next();
                AuditDoc<Checkup> auditDoc = new AuditDoc<Checkup>(checkup, getCollaborator());
                checkup.setCheckupShedule(null);
                saveEntity(checkup);
                auditDoc.check(checkup);
                auditDetailsList.add(persistAudit(auditDoc));
            }
        }
        if (newI != null) {
            while (newI.hasNext()) {
                Checkup checkup = newI.next();
                AuditDoc<Checkup> auditDoc = new AuditDoc<Checkup>(checkup, getCollaborator());
                checkup.setCheckupShedule(entity);
                saveEntity(checkup);
                auditDoc.check(checkup);
                auditDetailsList.add(persistAudit(auditDoc));
            }
        }
View Full Code Here

        }
        CollaboratorFunctions collFunc = list1.get(0);

        ArrayList<AuditDetails> auditDetailsList = new ArrayList<AuditDetails>();
        while (it.hasNext()) {//шуршим по всем анализам
            Checkup checkup = (Checkup) it.next();           
            AuditDoc<Checkup> auditCheckup = new AuditDoc<Checkup>(checkup, getCollaborator());
            checkup.setCheckupShedule(null);//удаляем из расписания
            saveEntity(checkup);
            auditCheckup.check(checkup);
            auditDetailsList.add(persistAudit(auditCheckup));
            //теперь услуга к которой он привязан
            //так сделано из предположения одна услуга - один анализ
            ServiceRender serren = checkup.getServiceRender();
            AuditDoc<ServiceRender> auditSerren = new AuditDoc<ServiceRender>(serren, getCollaborator());
            if (serren.isRendered()) {
                serren.setRepeat(serren.getRepeat() + 1);
            }
            serren.setFunctions(collFunc);
View Full Code Here

            }
        }
        for (CheckupShedule cs: list2delete) {
            Iterator it1 = findEntityList(Checkup.class, "checkupShedule", cs).iterator();
            while (it1.hasNext()) {
                Checkup checkup = (Checkup)it1.next();
                checkup.setCheckupShedule(null);
                manager.persist(checkup);
            }
            manager.remove(cs);
        }
        manager.flush();       
View Full Code Here

                auditDetList.add(details);
            }

            if (serviceCheckupChunk.xml != null) {
                AuditDoc<Checkup> auditCheckup = new AuditDoc<Checkup>(null, getCollaborator());
                Checkup checkup = new Checkup();
                checkup.setCheckupType(findEntity(CheckupType.class, serviceCheckupChunk.checkupTypeID));
                auditCheckup.addFieldFormat("xml", checkup.getCheckupType().getMetadata());
                checkup.setServiceRender(sm.serren);
                checkup.setXml(serviceCheckupChunk.xml);
                manager.persist(checkup);
                manager.flush();
                manager.refresh(checkup);
                auditCheckup.check(checkup);
                AuditDetails details = persistAudit(auditCheckup);
View Full Code Here

TOP

Related Classes of beans.doctor.checkup.Checkup

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.