コード例 #1
0
ファイル: GuideManager.java プロジェクト: skoba/gdl-tools
  public Collection<GuideDTO> getGuidesStrict(
      ElementInstanceCollection elementInstancesCollection) {
    Set<String> guideIds = new HashSet<String>();
    // Get all idElements
    Set<String> idElementsEHR = elementInstancesCollection.getElementIdsByIdDomain(Domains.EHR_ID);

    for (String idGuide : _elementInstanceCollectionByIdGuideMap.keySet()) {
      ElementInstanceCollection eic = _elementInstanceCollectionByIdGuideMap.get(idGuide);
      Set<String> idElementsEHRAux = new HashSet<String>();
      idElementsEHRAux.addAll(eic.getElementIdsByIdDomain(Domains.EHR_ID));
      idElementsEHRAux.addAll(eic.getElementIdsByIdDomain(ElementInstanceCollection.EMPTY_CODE));
      if (idElementsEHR.containsAll(idElementsEHRAux)) {
        guideIds.add(idGuide);
      }
    }
    return getGuideDTOs(guideIds);
  }
コード例 #2
0
ファイル: GuideManager.java プロジェクト: skoba/gdl-tools
  public Collection<GuideDTO> getGuidesNormal(
      ElementInstanceCollection elementInstancesCollection) {
    Set<String> guideIds = new HashSet<String>();
    // Get all idElements
    Set<String> idElementsEHR = elementInstancesCollection.getElementIdsByIdDomain(Domains.EHR_ID);

    for (String idGuide : _elementInstanceCollectionByIdGuideMap.keySet()) {
      ElementInstanceCollection eic = _elementInstanceCollectionByIdGuideMap.get(idGuide);
      Set<String> idElementsEHRAux = new HashSet<String>();
      idElementsEHRAux.addAll(eic.getElementIdsByIdDomain(Domains.EHR_ID));
      idElementsEHRAux.addAll(eic.getElementIdsByIdDomain(ElementInstanceCollection.EMPTY_CODE));
      Iterator<String> i = idElementsEHRAux.iterator();
      boolean contains = false;
      while (i.hasNext() && !contains) {
        if (idElementsEHR.contains(i.next())) {
          guideIds.add(idGuide);
          contains = true;
        }
      }
    }
    // TODO Look for linked guides
    return getGuideDTOs(guideIds);
  }