private OcsPathRadResultVoCollection getSelectedRadiologyResults() { OcsPathRadResultVoCollection results = new OcsPathRadResultVoCollection(); for (int i = 0; i < form.grdClinicalImaging().getRows().size(); i++) { grdClinicalImagingRow radiologyRow = form.grdClinicalImaging().getRows().get(i); if (hasResults(radiologyRow)) { results.add(radiologyRow.getValue()); } } return results; }
private void loadOrderInvestigations(boolean defaultToFirst)// WDEV-15894 { form.cmbInvestigation().clear(); OcsPathRadResultVoCollection collResults = domain.refreshOcsPathRadResultVo(form.getGlobalContext().OCRR.getSelectedInvs());//WDEV-15894 OcsPathRadResultVo item = null; if(collResults != null && collResults.size() > 0) { for(int i=0;i<collResults.size();i++) { item = collResults.get(i); form.cmbInvestigation().newRow(item, item.getDescription()); } } else throw new CodingRuntimeException("No Results passed to dialog"); //default selection to the first one if(defaultToFirst)// WDEV-15894 { form.cmbInvestigation().setValue(collResults.get(0)); cmbInvestigationChanged(); } }
private void loadOrderInvestigations() { form.cmbInvestigation().clear(); OcsPathRadResultVoCollection collResults = form.getGlobalContext().OCRR.getSelectedInvsWithResults(); OcsPathRadResultVo item = null; if(collResults != null && collResults.size() > 0) { for(int i=0;i<collResults.size();i++) { item = collResults.get(i); form.cmbInvestigation().newRow(item.getOrderInvestigation(), item.getDescription()); } } else throw new CodingRuntimeException("No Results passed to dialog"); //default selection to the first one form.cmbInvestigation().setValue(collResults.get(0).getOrderInvestigation()); cmbInvestigationChanged(); }
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 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 OcsPathRadResultVoCollection getAllInvs() { OcsPathRadResultVoCollection result = new OcsPathRadResultVoCollection(); for (int x = 0; x < form.grdResults().getRows().size(); x++) { result.add(form.grdResults().getRows().get(x).getValue()); } return result; }
private OcsPathRadResultVoCollection getOrderInvestigationFromGrid() { OcsPathRadResultVoCollection coll = new OcsPathRadResultVoCollection(); for(int i=0; i<form.grdResults().getRows().size(); i++) { if(form.grdResults().getRows().get(i).getValue() == null || OrderInvStatus.COMPLETE.equals(form.grdResults().getRows().get(i).getValue().getCurrentInvestigationStatus())) continue; coll.add(form.grdResults().getRows().get(i).getValue()); } return coll; }
private void updateOcsPathRadResult(OrderInvestigationRefVo invRef, OrderInvStatus orderInvStatus, OcsPathRadResultVoCollection results)// WDEV-15894 { if(invRef == null || results == null || results.size() == 0) return; for(int i=0; i<results.size(); i++) { if(invRef.getID_OrderInvestigation().equals(results.get(i).getOrderInvestigation().getID_OrderInvestigation())) { results.get(i).setOrderInvestigation(invRef); results.get(i).setCurrentInvestigationStatus(orderInvStatus);// WDEV-15894 break; } } }
private OcsPathRadResultVoCollection getAllInvs() { OcsPathRadResultVoCollection result = new OcsPathRadResultVoCollection(); for (int x = 0; x < form.grdResults().getRows().size(); x++) { grdResultsRow row = form.grdResults().getRows().get(x); if(row.getColResultDetails() != null && orderHasAResult(row.getColResultDetails())) { result.add(form.grdResults().getRows().get(x).getValue()); } else { if(row.getRows() != null) { for(int y = 0; y<row.getRows().size(); y++) { if(row.getRows().get(y).getColResultDetails() != null && orderHasAResult(row.getRows().get(y).getColResultDetails())); { result.add(row.getRows().get(y).getValue()); } } } } } return result; }
public OcsPathRadResultVoCollection refreshOcsPathRadResultVo(OcsPathRadResultVoCollection results) { if(results == null || results.size() == 0) return null; String ids = ""; for(int i=0; i<results.size(); i++) { if(results.get(i) == null || results.get(i).getOrderInvestigation() == null || results.get(i).getOrderInvestigation().getID_OrderInvestigation() == null) continue; ids += (ids.length() > 0 ? "," : "") + results.get(i).getOrderInvestigation().getID_OrderInvestigation(); } if(ids.length() == 0) return null; DomainFactory factory = getDomainFactory(); String query = "select orderInv from OrderInvestigation as orderInv where orderInv.id in ( " + ids + " )"; List<?> list = factory.find(query); if(list == null || list.size() == 0) return null; for(int i=0; i<list.size(); i++) { if(list.get(i) instanceof OrderInvestigation) { OrderInvestigationRefVo invRef = new OrderInvestigationRefVo(((OrderInvestigation) list.get(i)).getId(), ((OrderInvestigation) list.get(i)).getVersion()); OrderInvStatus orderInvStatus = null;// WDEV-15894 // WDEV-15894 if(((OrderInvestigation) list.get(i)).getOrdInvCurrentStatus() != null) { LookupInstance currentStatus = ((OrderInvestigation) list.get(i)).getOrdInvCurrentStatus().getOrdInvStatus(); orderInvStatus = assembleOrderInvStatusLookupItem(currentStatus); } updateOcsPathRadResult(invRef, orderInvStatus, results); } } return results; }