private DateTime createDateTimeFromSpecimenWorklistItem(SpecimenWorkListItemVo specimenWorklistItem) { if(specimenWorklistItem == null || specimenWorklistItem.getDateToCollect() == null) return new DateTime(); return specimenWorklistItem.getTimeToCollect() != null ? new DateTime(specimenWorklistItem.getDateToCollect(), specimenWorklistItem.getTimeToCollect()) : new DateTime(specimenWorklistItem.getDateToCollect()); }
/** * For SpecimenWorklist items created for DFT investigation remove the OrderSpecimen entry */ private void processSpecimenWorklistItems(OcsOrderVo order, SpecimenWorkListItemVoCollection specimenWorklistItems) { if (specimenWorklistItems != null) { for (SpecimenWorkListItemVo specimen : specimenWorklistItems) { if (specimen.getDFTOrderInvestigation() != null) specimen.setSpecimen(null); } } }
protected void onBtnPrintClick() throws PresentationLogicException { if(form.dyngrdCollect().getRows().size() == 0) { engine.showMessage("There is no data to print !"); return; } form.getLocalContext().setContextDummyForReports(null); for (int i = 0; i < form.dyngrdCollect().getRows().size(); i++) { DynamicGridRow parentRow = form.dyngrdCollect().getRows().get(i); for (int j = 0; j < parentRow.getRows().size(); j++) { DynamicGridRow row = parentRow.getRows().get(j); DynamicGridCell cell = row.getCells().get(getColumn(ACTIONED_COL)); boolean isActioned = false; if(cell != null && cell.getValue() instanceof Boolean) isActioned = ((Boolean)cell.getValue()).booleanValue(); if(isActioned && form.getLocalContext().getContextDummyForReports() == null) { SpecimenWorkListItemVo specimenWorkListItemVo = new SpecimenWorkListItemVo(); specimenWorkListItemVo.setID_SpecimenWorkListItem(new Integer(-1)); form.getLocalContext().setContextDummyForReports(specimenWorkListItemVo); form.getGlobalContext().RefMan.setSpecimenWorkListItemForReports(specimenWorkListItemVo); } } } if(form.getLocalContext().getContextDummyForReports() == null) { engine.showMessage("There is no actioned records to print !"); return; } form.getGlobalContext().Core.setPrepareForPrinting(Boolean.TRUE); engine.open(form.getForms().Core.PrintReport); }
protected void onBtnPrintClick() throws PresentationLogicException { if(form.dyngrdCollect().getRows().size() == 0) { engine.showMessage("There is no data to print !"); return; } form.getLocalContext().setContextDummyForReports(null); for (int i = 0; i < form.dyngrdCollect().getRows().size(); i++) { DynamicGridRow parentRow = form.dyngrdCollect().getRows().get(i); for (int j = 0; j < parentRow.getRows().size(); j++) { DynamicGridRow row = parentRow.getRows().get(j); DynamicGridCell cell = row.getCells().get(getColumn(ACTIONED_COL)); boolean isActioned = false; if(cell != null && cell.getValue() instanceof Boolean) isActioned = ((Boolean)cell.getValue()).booleanValue(); if(isActioned && form.getLocalContext().getContextDummyForReports() == null) { SpecimenWorkListItemVo specimenWorkListItemVo = new SpecimenWorkListItemVo(); specimenWorkListItemVo.setID_SpecimenWorkListItem(new Integer(-1)); form.getLocalContext().setContextDummyForReports(specimenWorkListItemVo); //WDEV-17760 if (form.getGlobalContext().Core.getSpecimenWorkListItemsForPrint() == null) { form.getGlobalContext().Core.setSpecimenWorkListItemsForPrint(new SpecimenWorkListItemListVoCollection()); } else form.getGlobalContext().Core.getSpecimenWorkListItemsForPrint().clear(); form.getGlobalContext().Core.getSpecimenWorkListItemsForPrint().add((SpecimenWorkListItemListVo) row.getValue()); } } } if(form.getLocalContext().getContextDummyForReports() == null) { engine.showMessage("There is no actioned records to print !"); return; } form.getGlobalContext().Core.setPrepareForPrinting(Boolean.TRUE); engine.open(form.getForms().Core.PrintMultipleOrders); }
public SpecimenWorkListItemVo getWorkListItemRecord(Integer id) { return SpecimenWorkListItemVoAssembler.create( (SpecimenWorkListItem)getDomainFactory().getDomainObject(SpecimenWorkListItem.class, id)); }
public SpecimenWorkListItemListVo saveWorkListItemRecord(SpecimenWorkListItemVo record, OrderSpecimenVo specimenVo) throws StaleObjectException { DomainFactory factory = getDomainFactory(); SpecimenWorkListItem newBo = null; SpecimenWorkListItem bo = SpecimenWorkListItemVoAssembler.extractSpecimenWorkListItem(factory, record); bo.getSpecimen().setCollectorComment(specimenVo.getCollectorComment()); if(record.getCollectionStatus().equals(SpecimenCollectionStatus.COULDNOTCOLLECT)) { SpecimenWorkListItemVo newItem = new SpecimenWorkListItemVo(); newItem.setListType(SpecimenCollectionMethod.WARDCOLLECTION); newItem.setDateToCollect(new Date()); newItem.setTimeToCollect(new Time()); newItem.setCollectionStatus(SpecimenCollectionStatus.PHLEBCOULDNOTCOLLECT); newBo = SpecimenWorkListItemVoAssembler.extractSpecimenWorkListItem(factory, newItem); newBo.setSpecimen(bo.getSpecimen()); } else if(record.getCollectionStatus().equals(SpecimenCollectionStatus.COLLECTIONCOMPLETE)) { bo.getSpecimen().setCollDateTimePlacer(specimenVo.getCollDateTimePlacer().getJavaDate()); bo.getSpecimen().setCollectingMos((MemberOfStaff) factory.getDomainObject(MemberOfStaff.class, specimenVo.getCollectingMos().getID_MemberOfStaff())); java.util.Set investigations = bo.getSpecimen().getInvestigations(); for (java.util.Iterator iter = investigations.iterator(); iter.hasNext();) { Object obj = iter.next(); if (obj instanceof OrderInvestigation) { OrderInvestigation element = (OrderInvestigation) obj; element.setDisplayDateTime(bo.getSpecimen().getCollDateTimePlacer()); element.setDisplayFlag(getDomLookup(OcsDisplayFlag.SPEC_COLL)); } } } factory.save(bo); if(newBo != null) factory.save(newBo); return SpecimenWorkListItemListVoAssembler.create(bo); }
protected void onBtnPrintClick() throws PresentationLogicException { if(form.dyngrdCollect().getRows().size() == 0) { engine.showMessage("There is no data to print !"); return; } form.getLocalContext().setContextDummyForReports(null); for (int i = 0; i < form.dyngrdCollect().getRows().size(); i++) { DynamicGridRow parentRow = form.dyngrdCollect().getRows().get(i); for (int j = 0; j < parentRow.getRows().size(); j++) { DynamicGridRow row = parentRow.getRows().get(j); DynamicGridCell cell = row.getCells().get(getColumn(ACTIONED_COL)); boolean isActioned = false; if(cell != null && cell.getValue() instanceof Boolean) isActioned = ((Boolean)cell.getValue()).booleanValue(); if(isActioned && form.getLocalContext().getContextDummyForReports() == null) { SpecimenWorkListItemVo specimenWorkListItemVo = new SpecimenWorkListItemVo(); specimenWorkListItemVo.setID_SpecimenWorkListItem(new Integer(-1)); form.getLocalContext().setContextDummyForReports(specimenWorkListItemVo); form.getGlobalContext().CareUk.setSpecimenWorkListItemForReports(specimenWorkListItemVo); } } } if(form.getLocalContext().getContextDummyForReports() == null) { engine.showMessage("There is no actioned records to print !"); return; } form.getGlobalContext().Core.setPrepareForPrinting(Boolean.TRUE); engine.open(form.getForms().Core.PrintReport); }