private void viewPathologySelectedOrder() { if (form.grdPathology().getSelectedRow() != null && form.grdPathology().getValue() != null) { PathologyResultListShortVo result = (PathologyResultListShortVo) form.grdPathology().getSelectedRow().getValue().getOrderInvestigation(); if (result.getOrderDetails() != null) { form.getGlobalContext().OCRR.setResultDisplayDate(result.getDisplayDateTime().getDate()); form.getGlobalContext().OCRR.PathologyResults.setOrder(result.getOrderDetails()); if (AuthorisationOrderStatus.AWAITING_AUTHORISATION.equals(result.getOrderDetails().getAuthorisationOrderStatus())) { form.getGlobalContext().OCRR.setOrderAwaitingAuthorisation(result.getOrderDetails()); } engine.open(form.getForms().OCRR.OrderSummaryDialog, true); } } }
private boolean hasResults(grdPathologyRow selectedRow) { PathologyResultListShortVo resultParent = (PathologyResultListShortVo) selectedRow.getValue().getOrderInvestigation(); if (isStatusResulted(resultParent.getOrdInvCurrentStatus().getOrdInvStatus())) return true; for (int i = 0; i < selectedRow.getRows().size(); i++) { grdPathologyRow childRow = selectedRow.getRows().get(i); PathologyResultListShortVo result = (PathologyResultListShortVo) childRow.getValue().getOrderInvestigation(); if (isStatusResulted(result.getOrdInvCurrentStatus().getOrdInvStatus())) return true; } return false; }
private String getSpecimenDisplayValue(PathologyResultListShortVo result) { if (result == null || result.getSpecimen() == null || (result.getSpecimen()!=null && result.getSpecimen().size()>0 && result.getSpecimen().get(0) != null && result.getSpecimen().get(0).getSpecimenSource() == null && result.getResultSpecimenType() == null)) //wdev-15780 //WDEV-14677 return "[No specimen source]"; StringBuilder display = new StringBuilder(); if (result.getResultSpecimenType() != null) //wdev-15780 { display.append(result.getResultSpecimenType().getText()); //wdev-15780 } else if (result.getSpecimen()!=null && result.getSpecimen().size()>0 && result.getSpecimen().get(0) != null && result.getSpecimen().get(0).getSpecimenSource() != null) //WDEV-14677 { display.append(result.getSpecimen().get(0).getSpecimenSource().getText()); //wdev-15780 } if (result.getSpecimen()!=null && result.getSpecimen().size()>0 && result.getSpecimen().get(0) != null && result.getSpecimen().get(0).getSiteCd() != null) //wdev-15780 //WDEV-14677 { display.append(" - ").append(result.getSpecimen().get(0).getSiteCd().getText()); //wdev-15780 } return display.toString(); }
private boolean hasResults(GenForm.lyrMainLayer.tabSearchContainer.grdResultsRow selectedRow) { PathologyResultListShortVo resParent = (PathologyResultListShortVo) selectedRow.getValue().getOrderInvestigation(); if (isResultedStatus(resParent.getOrdInvCurrentStatus().getOrdInvStatus())) return true; GenForm.lyrMainLayer.tabSearchContainer.grdResultsRowCollection rowColl = selectedRow.getRows(); for (int i = 0; i < rowColl.size(); i++) { GenForm.lyrMainLayer.tabSearchContainer.grdResultsRow row = rowColl.get(i); PathologyResultListShortVo res = (PathologyResultListShortVo) row.getValue().getOrderInvestigation(); if (isResultedStatus(res.getOrdInvCurrentStatus().getOrdInvStatus())) return true; } return false; }
private void viewSelectedOrder() { if (form.lyrMain().tabSearch().grdResults().getValue() != null) { PathologyResultListShortVo voPathologyResult = (PathologyResultListShortVo) form.lyrMain().tabSearch().grdResults().getValue().getOrderInvestigation(); if (voPathologyResult.getOrderDetailsIsNotNull()) { form.getGlobalContext().OCRR.setResultDisplayDate(getSelectedDisplayDateTime().getDate()); form.getGlobalContext().OCRR.PathologyResults.setOrder(voPathologyResult.getOrderDetails()); // WDEV-11097 if(AuthorisationOrderStatus.AWAITING_AUTHORISATION.equals(voPathologyResult.getOrderDetails().getAuthorisationOrderStatus())) { form.getGlobalContext().OCRR.setOrderAwaitingAuthorisation(voPathologyResult.getOrderDetails()); } engine.open(form.getForms().OCRR.OrderSummaryDialog, true); } } }
private OcsPathRadResultVo getCurrentInv() { //WDEV-11547 change this to return only invs that are resulted whther the child or parent is clicked on PathologyResultListShortVo resParent = (PathologyResultListShortVo) form.lyrMain().tabSearch().grdResults().getSelectedRow().getValue().getOrderInvestigation(); if (isResultedStatus(resParent.getOrdInvCurrentStatus().getOrdInvStatus())) return form.lyrMain().tabSearch().grdResults().getSelectedRow().getValue(); GenForm.lyrMainLayer.tabSearchContainer.grdResultsRowCollection rowColl = form.lyrMain().tabSearch().grdResults().getSelectedRow().getRows(); for (int i = 0; i < rowColl.size(); i++) { GenForm.lyrMainLayer.tabSearchContainer.grdResultsRow row = rowColl.get(i); PathologyResultListShortVo res = (PathologyResultListShortVo) row.getValue().getOrderInvestigation(); if (isResultedStatus(res.getOrdInvCurrentStatus().getOrdInvStatus())) return row.getValue(); } return null; //return form.lyrMain().tabSearch().grdResults().getValue(); }
private OcsPathRadResultVoCollection getAllInvs() { OcsPathRadResultVoCollection result = new OcsPathRadResultVoCollection(); for (int x = 0; x < form.lyrMain().tabSearch().grdResults().getRows().size(); x++) { //WDEV-11547 - only add actual results to this collection grdResultsRow pRow = form.lyrMain().tabSearch().grdResults().getRows().get(x); PathologyResultListShortVo res = form.lyrMain().tabSearch().grdResults().getRows().get(x).getColResultDetails(); if(res != null && res.getResultDetails() != null && res.getResultDetails().getPathologyResultDetailsIsNotNull() && res.getResultDetails().getPathologyResultDetails().size() > 0 && res.getResultDetails().getPathologyResultDetails().get(0) != null)// WDEV-16232 result.add(form.lyrMain().tabSearch().grdResults().getRows().get(x).getValue()); else { if(pRow.getRows() != null) { for (int y = 0; y < pRow.getRows().size(); y++) { PathologyResultListShortVo res1 = pRow.getRows().get(y).getColResultDetails(); if(res1 != null && res1.getResultDetails() != null && res1.getResultDetails().getPathologyResultDetailsIsNotNull() && res1.getResultDetails().getPathologyResultDetails().size() > 0 && res1.getResultDetails().getPathologyResultDetails().get(0) != null) //WDEV-16232 result.add(pRow.getRows().get(y).getValue()); } } } } return result; }
private void viewPathologyResults() { if (form.grdPathology().getSelectedRow() != null && form.grdPathology().getValue() != null) { PathologyResultListShortVo result = (PathologyResultListShortVo) form.grdPathology().getSelectedRow().getValue().getOrderInvestigation(); form.getGlobalContext().OCRR.setResultDisplayDate(result.getDisplayDateTime().getDate()); form.getGlobalContext().OCRR.setSelectedPathRadResults(getSelectedPathologyInvestigations()); form.getGlobalContext().OCRR.setCurrentPathRadResult(getCurrentInvestigation()); engine.open(form.getForms().OCRR.ResultDialog, false); } }
private OcsPathRadResultVoCollection getSelectedPathologyInvestigations() { OcsPathRadResultVoCollection results = new OcsPathRadResultVoCollection(); for (int i = 0; i < form.grdPathology().getRows().size(); i++) { grdPathologyRow pathologyRow = form.grdPathology().getRows().get(i); PathologyResultListShortVo pathologyResult = pathologyRow.getColResultsDetails(); if (pathologyResult != null && pathologyResult.getResultDetails() != null && pathologyResult.getResultDetails().getPathologyResultDetails() != null) { results.add(pathologyRow.getValue()); } else if (pathologyRow.getRows() != null) { for (int j = 0; j < pathologyRow.getRows().size(); j++) { PathologyResultListShortVo pathChildResult = pathologyRow.getRows().get(j).getColResultsDetails(); if (pathChildResult != null && pathChildResult.getResultDetails() != null && pathChildResult.getResultDetails().getPathologyResultDetails() != null) { results.add(pathologyRow.getRows().get(j).getValue()); } } } } return results; }
private boolean hasResults(PathologyResultListShortVo result) { if (isResultedStatus(result.getOrdInvCurrentStatus().getOrdInvStatus())) return true; return false; }
private boolean isDFT(PathologyResultListShortVo result) { if(result == null || result.getInvestigation() == null) return false; if(InvEventType.TIME_SERIES.equals(result.getInvestigation().getEventType())) return true; return false; }
private DateTime getSelectedDisplayDateTime() { if (form.lyrMain().tabSearch().grdResults().getValue() == null) return null; PathologyResultListShortVo voPathologyResult = (PathologyResultListShortVo) form.lyrMain().tabSearch().grdResults().getValue().getOrderInvestigation(); return voPathologyResult.getDisplayDateTime(); }