private void updateControlsState() { grdWorkListRow row = form.grdWorkList().getSelectedRow(); //WDEV-16767 if (row == null) { form.getGlobalContext().Core.setPatientShort(null); } else if (row.getValue() != null && row.getValue() instanceof SpecimenWorkListitemCustomVo) { if (form.getGlobalContext().Core.getPatientShort() == null || (form.getGlobalContext().Core.getPatientShort() != null && (!form.getGlobalContext().Core.getPatientShort().getID_Patient().equals(((SpecimenWorkListitemCustomVo) row.getValue()).getPatientId())))) { form.getGlobalContext().Core.setPatientShort(domain.getPatientById(((SpecimenWorkListitemCustomVo) row.getValue()).getPatientId())); } } form.getContextMenus().OCRR.getMoveToWardCollectionMoveToWardCollectionItem().setVisible(row != null && row.getValue() != null && row.getValue() instanceof SpecimenWorkListitemCustomVo && ((SpecimenWorkListitemCustomVo)row.getValue()).getContainerQuantityIsNotNull()); }
private SpecimenWorkListitemCustomVoCollection getWorkListItemsToprint() { SpecimenWorkListitemCustomVoCollection voColl = new SpecimenWorkListitemCustomVoCollection(); for (int i = 0; i < form.dyngrdCollect().getRows().size(); i++) { for (int j = 0; j < form.dyngrdCollect().getRows().get(i).getRows().size(); j++) { for (int k = 0; k < form.dyngrdCollect().getRows().get(i).getRows().get(j).getRows().size(); k++) { DynamicGridCell printCell = form.dyngrdCollect().getRows().get(i).getRows().get(j).getRows().get(k).getCells().get(form.dyngrdCollect().getColumns().get(PRINT_COL.intValue())); if (printCell != null && printCell.getValue() != null && printCell.getValue().equals(PrintStatus.FORPRINTING)) { voColl.add((SpecimenWorkListitemCustomVo) form.dyngrdCollect().getRows().get(i).getRows().get(j).getRows().get(k).getValue()); } } } } return voColl; }
private DynamicGridRow getWardForPatient(SpecimenWorkListitemCustomVo item) { if (item == null) return null; for (int i = 0; i < form.dyngrdCollect().getRows().size(); i++) { DynamicGridRow row = form.dyngrdCollect().getRows().get(i); if (row.getValue() == null) continue; if (row.getValue().equals(item.getWardId()) || (item.getWardId() == null && row.getValue().equals(EmptyWard))) { return row; } } return null; }
private grdWorkListRow getPatientRow(grdWorkListRow lastWardRow, SpecimenWorkListitemCustomVo item) { for (int i = 0; i < lastWardRow.getRows().size(); i++) { if (lastWardRow.getRows().get(i).getValue().equals(item.getPatientId())) { return lastWardRow.getRows().get(i); } } return null; }
private grdWorkListRow getWardForPatient(SpecimenWorkListitemCustomVo item) { for (int i=0; i < form.grdWorkList().getRows().size(); i++) { if (form.grdWorkList().getRows().get(i).getValue().equals(item.getWardId())) { return form.grdWorkList().getRows().get(i); } } return null; }
@Override protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException { switch(menuItemID) { case GenForm.ContextMenus.OCRRNamespace.MoveToWardCollection.MoveToWardCollection: form.getGlobalContext().OCRR.setMoveToWardDetails(new MoveToWardDetailsVo()); form.getGlobalContext().OCRR.getMoveToWardDetails().setSpecimenId(((SpecimenWorkListitemCustomVo)form.grdWorkList().getSelectedRow().getValue()).getWorkListitemId()); engine.open(form.getForms().OCRR.MoveToWardSpecimenCollection); break; } }
private void processCellPostback(DynamicGridCell cell) { if(cell.getColumn().equals(form.dyngrdCollect().getColumns().get(COLLECTED_COLUMN.intValue()))) { if(cell.getValue() == null) { clearVariableCells(cell.getRow()); //WDEV-16813 SpecimenWorkListitemCustomVo item = (SpecimenWorkListitemCustomVo) cell.getRow().getValue(); if (item != null && item.getCollectionComments() != null && item.getCollectionComments().length() > 0) { DynamicGridCell cellText = cell.getRow().getCells().newCell(form.dyngrdCollect().getColumns().getByIdentifier(COMMENTS_COLUMN), DynamicCellType.STRING); cellText.setValue(item.getCollectionComments()); cellText.setTooltip(item.getCollectionComments()); cellText.setReadOnly(true); } } else if(cell.getValue().equals(SpecimenCollectionStatus.COLLECTIONCOMPLETE)) { createControlsForCollection(cell.getRow(), null); } else { createControlsForNotCollection(cell.getRow(), null); } } //WDEV-16581 if(cell.getColumn().equals(form.dyngrdCollect().getColumns().get(PRINT_COL.intValue()))) { if(PrintStatus.PRINTED.equals(cell.getValue()) || cell.getValue() == null) { cell.getItems().clear(); cell.getItems().newItem(PrintStatus.FORPRINTING); } } }
private DynamicGridRow getPatientRow(DynamicGridRow lastWardRow, SpecimenWorkListitemCustomVo item) { for (int i = 0; i < lastWardRow.getRows().size(); i++) { if (lastWardRow.getRows().get(i).getValue().equals(item.getPatientId())) { return lastWardRow.getRows().get(i); } } return null; }
private DynamicGridRow getWardForPatient(SpecimenWorkListitemCustomVo item) { for (int i = 0; i < form.dyngrdCollect().getRows().size(); i++) { if (form.dyngrdCollect().getRows().get(i).getValue().equals(item.getWardId())) { return form.dyngrdCollect().getRows().get(i); } } return null; }
private void processCellPostback(DynamicGridCell cell) { if(cell.getColumn().equals(form.dyngrdCollect().getColumns().get(COLLECTED_COLUMN.intValue()))) { if(cell.getValue() == null) { clearVariableCells(cell.getRow()); //WDEV-16813 SpecimenWorkListitemCustomVo item = (SpecimenWorkListitemCustomVo) cell.getRow().getValue(); if (item != null && item.getCollectionComments() != null && item.getCollectionComments().length() > 0) { DynamicGridCell cellText = cell.getRow().getCells().newCell(form.dyngrdCollect().getColumns().getByIdentifier(COMMENTS_COLUMN), DynamicCellType.STRING); cellText.setValue(item.getCollectionComments()); cellText.setTooltip(item.getCollectionComments()); cellText.setReadOnly(true); } } else if(cell.getValue().equals(SpecimenCollectionStatus.COLLECTIONCOMPLETE)) { createControlsForCollection(cell.getRow(), null); } else { createControlsForNotCollection(cell.getRow(), null); } } //WDEV-16581 if(cell.getColumn().equals(form.dyngrdCollect().getColumns().get(PRINT_COL.intValue()))) { if(PrintStatus.PRINTED.equals(cell.getValue()) || cell.getValue() == null) { cell.getItems().clear(); cell.getItems().newItem(PrintStatus.FORPRINTING); form.chkSelectAll().setValue(false); } } }
private DynamicGridRow getPatientRow(DynamicGridRow lastWardRow, SpecimenWorkListitemCustomVo item) { if (lastWardRow == null) return null; for (int i = 0; i < lastWardRow.getRows().size(); i++) { if (lastWardRow.getRows().get(i).getValue().equals(item.getPatientId())) { return lastWardRow.getRows().get(i); } } return null; }