private SelectItemVoCollection chooseInfantsToDischarge() { SelectItemVoCollection voCollItems = new SelectItemVoCollection(); InpatientEpisodeLiteVoCollection voCollInfants = form.getLocalContext().getInfants(); if (voCollInfants != null) { // go through collection creating discharge records for each infant for (InpatientEpisodeLiteVo voInpat : voCollInfants) { SelectItemVo voSelectItem = new SelectItemVo(); voSelectItem.setItem(createInfantDischarge(voInpat)); voSelectItem.setSelected(Boolean.FALSE); voCollItems.add(voSelectItem); } } return voCollItems.size() > 0 ? voCollItems : null; }
protected void onBtnCancelClick() throws PresentationLogicException { SelectItemVoCollection voCollItems = new SelectItemVoCollection(); OrderInvestigationListVoCollection voCollOrderInv = form.getLocalContext().getSelectedOrderInvsForCancel(); if (voCollOrderInv != null) { for (int i = 0; i < voCollOrderInv.size(); i++) { SelectItemVo voSelectItem = new SelectItemVo(); voSelectItem.setItem(voCollOrderInv.get(i)); voSelectItem.setSelected(Boolean.FALSE); voCollItems.add(voSelectItem); } } form.getGlobalContext().Core.setItems(voCollItems.size() > 0 ? voCollItems : null); engine.open(form.getForms().OCRR.CancelOrderInvestigationDialog, "Select Investigation"); }
private SelectItemVoCollection chooseInfantsToTransfer() { SelectItemVoCollection voCollItems = new SelectItemVoCollection(); boolean isMaternityInpatient = form.getGlobalContext().Core.getSelectedBedSpaceStateIsNotNull() && form.getGlobalContext().Core.getSelectedBedSpaceState().getInpatientEpisodeIsNotNull() && form.getGlobalContext().Core.getSelectedBedSpaceState().getInpatientEpisode().getIsMaternityInpatientIsNotNull() ? form.getGlobalContext().Core.getSelectedBedSpaceState().getInpatientEpisode().getIsMaternityInpatient() : false; if (isMaternityInpatient) { PatientShort voPatient = form.getGlobalContext().Core.getSelectedBedSpaceStateIsNotNull() && form.getGlobalContext().Core.getSelectedBedSpaceState().getInpatientEpisodeIsNotNull() && form.getGlobalContext().Core.getSelectedBedSpaceState().getInpatientEpisode().getPasEventIsNotNull() && form.getGlobalContext().Core.getSelectedBedSpaceState().getInpatientEpisode().getPasEvent().getPatientIsNotNull() ? form.getGlobalContext().Core.getSelectedBedSpaceState().getInpatientEpisode().getPasEvent().getPatient() : null; if (voPatient != null) { InpatientEpisodeLiteVoCollection voCollInfants = form.getLocalContext().getInfants(); if (voCollInfants != null) { // go through collection creating transfer records for each // infant for (InpatientEpisodeLiteVo voInpat : voCollInfants) { SelectItemVo voSelectItem = new SelectItemVo(); voSelectItem.setItem(createInfantTransfer(voInpat)); voSelectItem.setSelected(Boolean.FALSE); voCollItems.add(voSelectItem); } } } } return voCollItems.size() > 0 ? voCollItems : null; }
private void populateGrid(SelectItemVoCollection voCollItems) { if(voCollItems == null) { engine.showMessage("No items available for selection"); engine.close(DialogResult.CANCEL); return; } for(int i=0;i<voCollItems.size();i++) { GenForm.grdItemsRow row = form.grdItems().getRows().newRow(); row.setColText(voCollItems.get(i).getItem().getIGenericItemInfoName()); row.setColSelected(voCollItems.get(i).getSelected().booleanValue()); row.setExpandedImage(voCollItems.get(i).getItemImage()); row.setCollapsedImage(voCollItems.get(i).getItemImage()); if(voCollItems.get(i).getItemsIsNotNull()) { row.setColSelectedReadOnly(true); SelectItemVo childItem = null; for(int p=0;p<voCollItems.get(i).getItems().size();p++) { childItem = voCollItems.get(i).getItems().get(p); GenForm.grdItemsRow cRow = row.getRows().newRow(); cRow.setColText(childItem.getItem().getIGenericItemInfoName()); cRow.setColSelected(childItem.getSelected().booleanValue()); cRow.setExpandedImage(childItem.getItemImage()); cRow.setCollapsedImage(childItem.getItemImage()); cRow.setValue(childItem); } row.setExpanded(true); } row.setValue(voCollItems.get(i)); } }
private void prePopulateRadPrintItems() { OrderInvestigationVoCollection voCollOrderInv = form.getGlobalContext().OCRR.getOrderInvestigationCollection(); SelectItemVoCollection voCollItems = new SelectItemVoCollection(); if (voCollOrderInv != null) { for (int i = 0; i < voCollOrderInv.size(); i++) { if (voCollOrderInv.get(i).getInvestigationIsNotNull() && voCollOrderInv.get(i).getInvestigation().getInvestigationIndexIsNotNull() && voCollOrderInv.get(i).getInvestigation().getInvestigationIndex().getCategoryIsNotNull() && voCollOrderInv.get(i).getInvestigation().getInvestigationIndex().getCategory().equals(Category.CLINICALIMAGING)) { SelectItemVo voSelectItem = new SelectItemVo(); voSelectItem.setItem(voCollOrderInv.get(i).getInvestigation().getInvestigationIndex()); voSelectItem.setSelected(Boolean.FALSE); voCollItems.add(voSelectItem); } } } form.getGlobalContext().Core.setItems(voCollItems.size() > 0 ? voCollItems : null); InvestigationIndexRefVoCollection voCollInvIndex = new InvestigationIndexRefVoCollection(); if (voCollItems != null) { for (int i = 0; i < voCollItems.size(); i++) { if (voCollItems.get(i).getItemIsNotNull()) { if (voCollItems.get(i).getItem() instanceof InvestigationIndexLiteVo && voCollItems.get(i).getSelectedIsNotNull() && voCollItems.get(i).getSelected().equals(Boolean.FALSE)) { voCollInvIndex.add((InvestigationIndexRefVo) voCollItems.get(i).getItem()); } } } } form.getGlobalContext().OCRR.PrintOrder.setNotLocalInvestigations(voCollInvIndex.size() > 0 ? voCollInvIndex : null); }