Package beans.directory.mkb10

Examples of beans.directory.mkb10.MkbItem


    catch (NumberFormatException ex){
      throw new ClipsException("Некорректный фомат файла! Id не число! \"" + line + "\"", ex);
    }
    String        text = line.substring(mkbIdx + 1, pIDidx).trim();
    text = text.substring(0, 1) + text.substring(1).toLowerCase();
    return new MkbItem(text, mkbID, id, parent);
  }
View Full Code Here


                throwNeedAdminSecurityException("Недостаточно прав для записи диагноза другой датой");
            }
            entity.setDate(d.date);
            entity.setServiceRender(findEntity(ServiceRender.class, d.serviceRenderID));
        }
        Mkb10 mkb10 = findEntity(Mkb10.class, d.mkbID);
        if (mustHaveStage(mkb10) && d.stage == 0) {
            throw new ClipsServerException("При постановке диагноза " + mkb10.getTitle()
                    + "\nнеобходимо указывать стадию заболевания");
        }


        entity.setMkb10(mkb10);
View Full Code Here

        if (mkb10.getId() == Mkb10.MKB10_ALCOHOL_DEPENDENCE) {
            return true;
        }
        //Злокачественные новообразования
        boolean isMN = false;
        Mkb10 m = mkb10;
        do {
            if (m.getId() == Mkb10.MKB10_MALIGNANT_NEOPLASM) {
                isMN = true;
            }
            m = m.getRef();
        } while (m != null);
        return isMN;
    }
View Full Code Here

        return isMN;
    }

    @Override
    public boolean mustHaveStage(int mkbID) throws ClipsServerException{
        Mkb10 mkb10 = findEntity(Mkb10.class, mkbID);
        return mustHaveStage(mkb10);
    }
View Full Code Here

    }
    return false;
  }
     
  protected boolean isValidForLine(DataSetType ds, DiseaseLine line){
    Mkb10      dsMkb = getMkbForItem(ds);
    if (dsMkb == null){
      throw new IllegalStateException();
    }
    if (isIncludedToLine(dsMkb, line)) {
      if (!isExcludedFromLine(dsMkb, line)) {
View Full Code Here

 
  protected String buildMkbString(int[] itemMkbIds) throws ClipsServerException{
    boolean            first = true;
    StringBuffer        itemCodes = null;
    for (int mkb10id : itemMkbIds) {
      Mkb10      mkb10 = findEntity(Mkb10.class, mkb10id);
      if (first) {
        first = false;
        itemCodes = new StringBuffer(mkb10.getCode());
      }
      else {
        itemCodes.append(", ");
        itemCodes.append(mkb10.getCode());
      }
    }
    return itemCodes == null? "": itemCodes.toString();
  }
View Full Code Here

        }
        else{
          return false;
        }
      case SPECIAL_LINE_TYPE_IGNORE_SANATORIUM_HEALING:
        Mkb10      dsMkb = getMkbForItem(ds);
        if (disType == DisabilityType.DISABILITY_TYPE_SANATORIUM_HEALING){
          return isExcludedFromLine(dsMkb, line);
        }
        else if (disType != DisabilityType.DISABILITY_TYPE_DISEATED_SUPPORT
            && disType != DisabilityType.DISABILITY_TYPE_MATERNITY_LEAVE){
View Full Code Here

        Set<Entry<String, Set<String>>> entrySet = cc.mkbVidals.entrySet();
        //хеш   код     mkbID
        HashMap<String, Integer> mapMKB = new HashMap<String, Integer>();
        List mkbList = findEntityList(Mkb10.class);
        for (int i = 0; i < mkbList.size(); i++) {
            Mkb10 mkb10 = (Mkb10) mkbList.get(i);
            //System.out.println(mkb10);
            //if (mapMKB.containsKey(mkb10.getCode())) {
                //throw new ClipsServerException ("Должен быть только 1 элемент МКБ10 с данным кодом " + mkb10.getCode());
            //}
            mapMKB.put(mkb10.getCode(), mkb10.getId());
        }
        //throw new ClipsServerException ("Должен быть только 1 элемент МКБ10 с данным кодом " + mkb10.getCode());
       
        for (Iterator<Entry<String, Set<String>>> it = entrySet.iterator(); it.hasNext();) {
            Entry<String, Set<String>> entry = it.next();
View Full Code Here

        mkb10.setCode(d.code);
        mkb10.setMustNotify(d.mustNotify);
        mkb10.setInfectious(d.infectious);
        mkb10.setShortTitle(d.shortTitle);
        if(d.parentItem > 0) {
            Mkb10 mkb10Parent = findEntity(Mkb10.class, d.parentItem);
            mkb10.setRef(mkb10Parent);
        }
    }
View Full Code Here

  }
 
  int      counter = 0;
 
  void saveItem(Mkb10 parent, MkbItem item){
    Mkb10      entity = item.getMKB10Item();
    if (entity == null){
      entity = new Mkb10();
    }
    entity.setCode(item.getMkbCode());
    entity.setTitle(item.getTitle());
    entity.setRef(parent);
    entity.setTrash(false);
    entity = fastSaveEntity(entity);
    if (counter++ % 100 == 0) {
      System.err.println(counter + " : " + item.getId());
    }
View Full Code Here

TOP

Related Classes of beans.directory.mkb10.MkbItem

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.