private void prePopulateListTypeTree() { SpecimenCollectionMethodCollection collMethods = LookupHelper.getSpecimenCollectionMethod(domain.getLookupService()); ims.framework.cn.data.TreeNode[] parentNodes = collMethods.getRootNodes(); for(int i=0;i<parentNodes.length;i++) { ims.framework.cn.data.TreeNode parentNode = parentNodes[i]; TreeNode ctrlNode = form.lyrSpecColConfig().tabSpecCollectionConfig().treTypes().getNodes().add(parentNode, ((SpecimenCollectionMethod)parentNode).getText()); for(int p=0;p<parentNode.getChildren().length;p++) { ims.framework.cn.data.TreeNode childNode = parentNode.getChildren()[p]; ctrlNode.getNodes().add(childNode, ((SpecimenCollectionMethod)childNode).getText()); } ctrlNode.setExpanded(true); } }
private void prePopulateOtherControls() { SpecimenCollectionMethodCollection collTypes = LookupHelper.getSpecimenCollectionMethod(domain.getLookupService()); for (int i = 0; i < collTypes.size(); i++) { if (collTypes.get(i).equals(SpecimenCollectionMethod.OTHER)) { for (int p = 0; p < collTypes.get(i).getChildren().length; p++) form.lyrDetails().tabPathDetails().lyrPathology().tabOther().cmbRequestedTypeOther().newRow((SpecimenCollectionMethod) collTypes.get(i).getChildren()[p], ((SpecimenCollectionMethod) collTypes.get(i).getChildren()[p]).getText()); break; } } form.lyrDetails().tabPathDetails().lyrPathology().tabOther().dteCollectOther().setValue(new Date()); form.lyrDetails().tabPathDetails().lyrPathology().tabOther().cmbRequestedTypeOther().setValue(SpecimenCollectionMethod.WARDCOLLECTION); form.lyrDetails().tabPathDetails().lyrPathology().tabOther().btnApplyOther().setEnabled(true); }
private void bindCellToLookup(DynamicGridCell cell, DynamicGrid grid) { if (cell == null || grid == null) throw new CodingRuntimeException("Coding Error - cell or grid is null (bindCellToLookup)"); if (grid.equals(form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().dyngrdOutPat())) { cell.getItems().newItem(SpecimenCollectionMethod.INPATIENT, SpecimenCollectionMethod.INPATIENT.getText()); cell.getItems().newItem(SpecimenCollectionMethod.OUTPATIENT, SpecimenCollectionMethod.OUTPATIENT.getText()); } else if (grid.equals(form.lyrDetails().tabPathDetails().lyrPathology().tabOther().dyngrdOther())) { SpecimenCollectionMethodCollection collMethods = LookupHelper.getSpecimenCollectionMethod(domain.getLookupService()); for (int i = 0; i < collMethods.size(); i++) { if (collMethods.get(i).equals(SpecimenCollectionMethod.OTHER)) { for (int p = 0; p < collMethods.get(i).getChildren().length; p++) cell.getItems().newItem(collMethods.get(i).getChildren()[p], (collMethods.get(i).getChildren()[p]).toString()); break; } } } cell.setIdentifier(SpecimenCollectionMethod.class); }