Package beans.service.create

Examples of beans.service.create.ServiceCheckupChunk


            //создаем чанк услуги и хмл, добавляем в список
            CheckupXMLData xmlData = xmlList.get(i);
            String xml = xmlData != null ? xmlData.getXMLStr() : null;
            int checkupTypeID = xmlData != null ? xmlData.getCheckupType().getID() : 0;

            ServiceCheckupChunk chunk = new ServiceCheckupChunk(selectedServices.get(i).getID(), xml, checkupTypeID);
            chunkList.add(chunk);
        }

                //Отправка на сервер для назначения и принятие результатов (назначенных серренов)
        try {
View Full Code Here


            Iterator iterator = findEntityList(ServiceRender.class, f).iterator();
            while (iterator.hasNext()) {
                ServiceRender sr = (ServiceRender)iterator.next();
                Iterator<ServiceCheckupChunk> servIter = itemChunk.serviceList.iterator();
                while (servIter.hasNext()) {
                    ServiceCheckupChunk chunk = servIter.next();
                    if (chunk.serviceID == sr.getService().getId()){
                        servIter.remove();//выкидываем услугу
                    }
                }
            }
        } else {
//            pchItem = new ProfcheckupItem();
            disease = new Disease();//сделаем заболевание
            Date current = new Date();
            disease.setCreated(current);//дата по первому созданию
            disease.setDateReg(current);
        }

        Polis polis = findEntity(Polis.class, itemChunk.polisID);
        Integer clientID = polis.getClient().getId();
        Field[] f = {new Field("client.id", clientID)};
        Iterator it = findEntityList(Emc.class, f).iterator();
        if (emcMap.get(clientID) == null) {//проверим в кеше
            Emc emc;
            if (it.hasNext()) {
                emc = (Emc) it.next();
            } else {
                throw new EDataIntegrity("у пациента " + polis.getClient().getSurname() + " " +
                        polis.getClient().getName() + " " + polis.getClient().getPathronymic() +
                        " нет медицинской карты");
            }
            emcMap.put(clientID, emc);
        }
        disease.setEmc(emcMap.get(clientID));
        disease.setCollaborator(findEntity(Collaborator.class, getCollaboratorId()));
        if (disease.getId() == 0) {
            manager.persist(disease);//теперь есть заболевание, мона его юзать(или нет?)
        } else {
            disease = manager.merge(disease);
        }
        manager.flush();
        manager.refresh(disease);

        //заполним профчекапитем
        pchItem.setPolis(polis);
        pchItem.setPassed(false);
        pchItem.setDanger(findEntity(Danger.class, itemChunk.dangerId));
        pchItem.setProfcheckup(findEntity(Profcheckup.class, itemChunk.profcheckupId));
        pchItem.setDisease(disease);
        manager.persist(pchItem);//теперь есть профчекапитем, мона его юзать
        manager.flush();
        manager.refresh(pchItem);
        //Пометим список услуг что они с дангерами
        for (int i = 0; i < itemChunk.serviceList.size(); i++) {
            ServiceCheckupChunk scc = itemChunk.serviceList.get(i);
            scc.dangerID = itemChunk.dangerId;
        }
        //создадим услугу
        NewServicesChunk chunk = new NewServicesChunk(disease.getId(),
                                                0,
View Full Code Here

                for (DirectoryServiceItem service : serviceList) {
                    CheckupXMLData xmlData = panelDangerMap.get(pic.getDanger().getID()).getXml(service);
                    String xml = xmlData != null ? xmlData.getXMLStr() : null;
                    int checkupTypeID = xmlData != null ? xmlData.getCheckupType().getID() : 0;

                    ServiceCheckupChunk chunk = new ServiceCheckupChunk(service.getID(), xml, checkupTypeID);
                   
                    pic.serviceList().add(chunk);
                }
            }
        }
View Full Code Here

                //создаем чанк услуги и хмл, добавляем в список
                CheckupXMLData xmlData = xmlList.get(i);
                String xml = xmlData != null ? xmlData.getXMLStr() : null;
                int checkupTypeID = xmlData != null ? xmlData.getCheckupType().getID() : 0;

                ServiceCheckupChunk chunk = new ServiceCheckupChunk(serviceList.get(i).getID(), xml, checkupTypeID);
                chunkList.add(chunk);
            }
            //Отправка на сервер для назначения и принятие результатов (назначенных серренов)
            boolean isMedexam = packetService == null ? false : packetService.getmedexamType().getID() != 0;
            NewServicesChunk newServicesChunk;
View Full Code Here

TOP

Related Classes of beans.service.create.ServiceCheckupChunk

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.