private InvestigationRefVoCollection getInvestigationsFromOrderSet(OrderSetForHelpTextVo item) { if(item == null || item.getComponent() == null) return null; InvestigationRefVoCollection coll = new InvestigationRefVoCollection(); for(int i=0; i<item.getComponent().size(); i++) { OrderSetComponentForHelpTextVo component = item.getComponent().get(i); if(component == null) continue; InvestigationSelectOrderVo inv = component.getInvestigation(); if(inv.getInvestigationIndex().getIsProfile()) { if(inv.getAssocInvestigations() != null) { for(int j=0; j<inv.getAssocInvestigations().size(); j++) { InvestigationSelectOrderVo invinv = inv.getAssocInvestigations().get(j); if(invinv == null) continue; coll.add(invinv); } } } else { coll.add(inv); } } return coll; }
private TreeSet<String> getInvestigationNamesFromOrderSet(OrderSetForHelpTextVo orderSet, TreeSet<String> investigationNames, ArrayList<OrderSetForHelpTextVo> visitedOrderSet) { if(orderSet == null || orderSet.getComponent() == null || visitedOrderSet.indexOf(orderSet) >=0) return investigationNames; visitedOrderSet.add(orderSet); OrderSetComponentForHelpTextVoCollection orderSetComponent = orderSet.getComponent(); for(int i=0; i<orderSetComponent.size(); i++) { OrderSetComponentForHelpTextVo component = orderSetComponent.get(i); if(component == null) continue; if(component.getInvestigationIsNotNull() && component.getInvestigation().getInvestigationIndexIsNotNull() && (component.getInvestigation().getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(component.getInvestigation().getInvestigationIndex().getIsProfile()))) investigationNames.add(component.getInvestigation().getInvestigationIndex().getName() + getTurnaround(component.getInvestigation())); //WDEV-16863 if(component.getInvestigationIsNotNull() && component.getInvestigation().getAssocInvestigationsIsNotNull()) { for(int j=0; j<component.getInvestigation().getAssocInvestigations().size(); j++) { InvestigationSelectOrderVo investigationChild = component.getInvestigation().getAssocInvestigations().get(j); if(!investigationChild.getInvestigationIndexIsNotNull()) continue; if(investigationChild.getInvestigationIndex().getIsProfile() == null || Boolean.FALSE.equals(investigationChild.getInvestigationIndex().getIsProfile())) investigationNames.add(investigationChild.getInvestigationIndex().getName() + getTurnaround(investigationChild)); //WDEV-16863 } } getInvestigationNamesFromOrderSet(component.getOrderSet(), investigationNames, visitedOrderSet); } return investigationNames; }