private NewResultsListVoCollection processResults(List<?> results) { HashMap map = new HashMap(); ClinicalImagingResults impl = (ClinicalImagingResults) getDomainImpl(ClinicalImagingResultsImpl.class); map = impl.getListXoHistory(map, results); NewResultsListVoCollection voCollResults = NewResultsListVoAssembler.createNewResultsListVoCollectionFromOrderInvestigation(results); if(voCollResults != null) { for(NewResultsListVo voResult : voCollResults) { if(map.containsKey(voResult.getID_OrderInvestigation())) { voResult.setOrdInvXOStatusHistory((OrdInvXOStatusHistoryLiteVoCollection) map.get(voResult.getID_OrderInvestigation())); } } } return voCollResults; }
public int compare(NewResultsListVo result1, NewResultsListVo result2) { DateTime dateForResult1 = result1.getRepDateTime(); DateTime dateForResult2 = result2.getRepDateTime(); // If the OrderInvestigation is marked "For Review" then AllocatedDateForReview takes precedence if (result1.getOrdInvCurrentStatus() != null && OrderInvStatus.REVIEW.equals(result1.getOrdInvCurrentStatus().getOrdInvStatus())) { dateForResult1 = result1.getAllocatedDateForReview(); } if (result2.getOrdInvCurrentStatus() != null && OrderInvStatus.REVIEW.equals(result2.getOrdInvCurrentStatus().getOrdInvStatus())) { dateForResult2 = result2.getAllocatedDateForReview(); } if (dateForResult1 == null && dateForResult2 == null) return result1.getOrdInvSeq().compareTo(result2.getOrdInvSeq()); if (dateForResult1 == null && dateForResult2 != null) return sortOrder * (-1); if (dateForResult1 != null && dateForResult2 == null) return sortOrder; int sort = dateForResult1.compareTo(dateForResult2) * sortOrder; if (sort == 0) return result1.getOrdInvSeq().compareTo(result2.getOrdInvSeq()); return sort; }
private boolean isDFT(NewResultsListVo newResult) //WDEV-16232 { if(newResult == null || newResult.getInvestigation() == null) return false; if(InvEventType.TIME_SERIES.equals(newResult.getInvestigation().getEventType())) return true; return false; }
private void search() { resetResults(); OrderInvStatusCollection stColl = getRequiredInvStatuses(); int nOrderingHCPId = -1; if(form.ccOrderingHCP().getValue()!=null) nOrderingHCPId = form.ccOrderingHCP().getValue().getIMosId(); //WDEV-9946 // public NewResultsListVoCollection listNewResultsByDateRange(Date dateFrom, Date dateTo, ValueObject location, ValueObject clinician, OrderInvStatusCollection statuses, Boolean includeCurrentInpatients, Boolean excludeInpatients, Integer orderingHCPId, ServiceRefVo discipline,Specialty specialty) { NewResultsListVoCollection newResults = domain.listNewResultsByDateRange(form.dteFrom().getValue(), form.dteTo().getValue(), null, null, stColl, false, false, nOrderingHCPId, null, (form.chkSpecialty().getValue() ? form.cmbSpecialty().getValue() : null), form.qmbInitiallySeenBy().getValue()); //WDEV-13869 if (newResults == null || newResults.size()==0) { engine.showMessage("No records match your search criteria.", "No data found", MessageButtons.OK, MessageIcon.WARNING); return; } Integer nNewResUnseenDays = new Integer(ConfigFlag.DOM.OCS_NEWRES_UNSEEN_CUTOFF.getValue()); Date dateUnseen = new Date().addDay(-1 * nNewResUnseenDays.intValue()); for (int x = 0; x < newResults.size(); x++) { NewResultsListVo newResult = newResults.get(x); addNewResult(newResult, dateUnseen); } updateSearchTotal(form.grdResults().getRows().size());//WDEV-11170 }
private void search() { resetResults(); OrderInvStatusCollection stColl = getRequiredInvStatuses(); if (ConfigFlag.GEN.RELEASE_MODE.getValue()) { if (form.qmbOrderingLocation().getValue() == null) { form.cmbHospital().setValue(null); form.OrdLocGrp().setEnabled(false); form.OrdLocGrp().setValue(null); form.qmbOrderingLocation().setEnabled(false); } } int nOrderingHCPId = -1; if (form.ccOrderingHCP().getValue() != null) nOrderingHCPId = form.ccOrderingHCP().getValue().getIMosId(); //WDEV-9946 NewResultsListVoCollection newResults = domain.listNewResultsByDateRange(form.dteFrom().getValue(), form.dteTo().getValue(), form.qmbOrderingLocation().getValue(), form.qmbOrderingClinician().getValue(), stColl, form.chkInpatientOrders().getValue(), form.chkOutpatientOrders().getValue(), form.chkExcludeInpatients().getValue(), nOrderingHCPId, (HcpLiteVo) form.ccCurrentRespClin().getValue(), form.qmbReviewingHCP().getValue(), form.cmbDiscipline().getValue()); if (newResults == null) return; // Sort the results collection newResults.sort(new NewResultsDateComparator(SortOrder.DESCENDING)); Integer nNewResUnseenDays = new Integer(ConfigFlag.DOM.OCS_NEWRES_UNSEEN_CUTOFF.getValue()); Date dateUnseen = new Date().addDay(-1 * nNewResUnseenDays.intValue()); for (int x = 0; x < newResults.size(); x++) { NewResultsListVo newResult = newResults.get(x); addNewResult(newResult, dateUnseen); } // WDEV-9454 if (newResults.size() == 0) { engine.showMessage("No results found.", "Message"); form.getGlobalContext().OCRR.setNewResultsSearchCriteria(null); } else storeSearchCriteria(); updateSearchTotal(form.grdResults().getRows().size()); }