Examples of FollowDownReason


Examples of beans.directory.simple.entities.FollowDownReason

     */
    @Override
    public boolean fixFollowUp() throws ClipsServerException {
        HashMap<Integer, FollowDownReason> fdmap = new HashMap<Integer, FollowDownReason>();
        FollowupReason upReason = findEntity(FollowupReason.class, 3);
        FollowDownReason downReason = findEntity(FollowDownReason.class, 1);
        List<FollowDownReason> fdList = findEntityList(FollowDownReason.class);
        for (FollowDownReason fd : fdList) {
            fdmap.put(Integer.parseInt(fd.getExtKey()), fd);
        }

        Set<Entry<FollowUpKey, ArrayList<EventKey>>> entrySet = followMap.entrySet();
        if (counter == null) {
            counter = 0;
        }
        if (size == null) {
        System.out.println("Запись диспансеризаций - начало процесса");
            size = followMap.size();
        }
        for (Iterator<Entry<FollowUpKey, ArrayList<EventKey>>> it = entrySet.iterator(); it.hasNext();) {
            Entry<FollowUpKey, ArrayList<EventKey>> entry = it.next();
            ArrayList<EventKey> bigEventKeyList = entry.getValue();
            //сортируем по дате постановки диагноза
            Collections.sort(bigEventKeyList);
            ArrayList<ArrayList<EventKey>> dividedList = divideEvents(bigEventKeyList);
            for (ArrayList<EventKey> eventKeyList : dividedList) {
                ArrayList<Diagnosis> diagList = new ArrayList<Diagnosis>();
                for (EventKey eventKey : eventKeyList) {
                    diagList.add(findEntity(Diagnosis.class, eventKey.diagID));
                }

                Diagnosis diagUp = diagList.get(0);
                /*определяем diagDown - если при последнем диагнозе было снятие с
                 диспансеризации то diagDown не нулл
                 * */
                Diagnosis diagDown = diagList.get(diagList.size() - 1);
                int disp = 0;
                int dispSn = 0;
                for (EventKey eventKey : eventKeyList) {
                    if (eventKey.diagID == diagDown.getId()) {
                        disp = eventKey.disp;
                        dispSn = eventKey.dispSn;
                    }
                }
                if (disp != 4) {
                    diagDown = null;
                }

                Followup followup = new Followup();
                followup.setDateup(diagUp.getDate());
                followup.setDatedown(diagDown == null ? null : diagDown.getDate());
                followup.setCollaboratorUp(diagUp.getServiceRender().getDisease().getCollaborator());
                followup.setCollaboratorDown(diagDown == null ? null : diagDown.getServiceRender().getDisease().getCollaborator());
                followup.setUpReason(upReason);
                FollowDownReason fd = fdmap.get(dispSn);
                if (fd == null) {
                    fd = downReason;
                }
                followup.setDownReason(diagDown == null ? null : fd);
                followup.setValue(null);
View Full Code Here

Examples of beans.directory.simple.entities.FollowDownReason

  protected boolean isMale(Object[] itm) {
    return isMaleID(getClienSex(itm).getId());
  }

  protected boolean isCloseByDie(Object[] ds){
    FollowDownReason    reason = getDownReason(ds);
    return reason == null? false: getDownReason(ds).getId() == FollowDownReason.CLOSE_BY_DIE;
  }
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.