protected void onGrdResultsSelectionChanged() { form.getGlobalContext().OCRR.PathologyResults.setOrder(form.grdResults().getValue().getOrderDetails()); RadiologyOrderVo voRadiologyOrder = form.grdResults().getValue(); form.getLocalContext().setPrintingContext(voRadiologyOrder); if(voRadiologyOrder != null && voRadiologyOrder.getOrderDetailsIsNotNull() && voRadiologyOrder.getOrderDetails().getPatientIsNotNull()) { form.getGlobalContext().Core.setPatientShort(voRadiologyOrder.getOrderDetails().getPatient()); CatsReferralListVo voCats = domain.getCatsReferralByOrder(voRadiologyOrder.getOrderDetails()); form.getGlobalContext().RefMan.setCatsReferral(voCats); form.getGlobalContext().RefMan.setReferralContractTypeForPatient((voCats != null && voCats.getContractIsNotNull()) ? voCats.getContract().getContractType() : null);//wdev-12682 //wdev-12838 engine.open(form.getForms().OCRR.OrderSummaryDialog); } else { engine.showMessage("No patient associated with the selected record."); } }
private void populateResultsGrid(RadiologyOrderVoCollection coll) { if (coll == null) return; form.grdResults().getRows().clear(); coll.sort(SortOrder.DESCENDING); for (int i = 0; i < coll.size(); i++) { RadiologyOrderVo result = coll.get(i); setResultGridRowData(result); } displayGridFooter(); }
public int compare(Object ob1, Object ob2) { DateTime date1 = null; DateTime date2 = null; if(ob1 instanceof RadiologyOrderVo ) { RadiologyOrderVo dts1 = (RadiologyOrderVo)ob1; date1 = dts1.getDisplayDateTime(); } if(ob2 instanceof RadiologyOrderVo) { RadiologyOrderVo dts2 = (RadiologyOrderVo)ob2; date2 = dts2.getDisplayDateTime(); } if(date1 != null ) return date1.compareTo(date2)*direction; if(date2 != null) return (-1)*direction; return 0; }
protected void onGrdResultsSelectionChanged() { form.getGlobalContext().OCRR.PathologyResults.setOrder(form.grdResults().getValue().getOrderDetails()); RadiologyOrderVo voRadiologyOrder = form.grdResults().getValue(); form.getLocalContext().setPrintingContext(voRadiologyOrder); if(voRadiologyOrder != null && voRadiologyOrder.getOrderDetailsIsNotNull() && voRadiologyOrder.getOrderDetails().getPatientIsNotNull()) { form.getGlobalContext().Core.setPatientShort(voRadiologyOrder.getOrderDetails().getPatient()); CatsReferralListVo voCats = domain.getCatsReferralByOrder(voRadiologyOrder.getOrderDetails()); form.getGlobalContext().CareUk.setCatsReferral(voCats); form.getGlobalContext().CareUk.setReferralContractTypeForPatient((voCats != null && voCats.getContractIsNotNull()) ? voCats.getContract().getContractType() : null);//wdev-12682 //wdev-12838 engine.open(form.getForms().OCRR.OrderSummaryDialog); } else { engine.showMessage("No patient associated with the selected record."); } }
private void populateGridOrdersResults(RadiologyOrderVoCollection coll) { if(coll == null) return; for(int i = 0; i < coll.size();i++) { RadiologyOrderVo result = coll.get(i); setResultGridRowData(result); } displayGridFooter(); }
public RadiologyOrderVoCollection listRadOrderInvestigation(ServiceRefVo serviceRefVo, LocationRefVo voLocationRef, Category category, Boolean bCompleted, Date fromDate, Date toDate) { OrderInvStatus[] statuses = null; if (bCompleted != null && bCompleted) statuses = new OrderInvStatus[]{OrderInvStatus.COMPLETE}; else statuses = new OrderInvStatus[]{OrderInvStatus.SENT, OrderInvStatus.ACCEPTED, OrderInvStatus.ORDERED, OrderInvStatus.CHANGED, OrderInvStatus.PROVIDER_CHANGE_REJECTED}; //WDEV-12054 // WDEV-11643 List results = listOrderInvestigation(serviceRefVo, voLocationRef, statuses, category, fromDate, toDate); //WDEV-12054 HashMap map = new HashMap(); ClinicalImagingResults impl = (ClinicalImagingResults) getDomainImpl(ClinicalImagingResultsImpl.class); map = impl.getListXoHistory(map, results); RadiologyOrderVoCollection voCollResults = RadiologyOrderVoAssembler.createRadiologyOrderVoCollectionFromOrderInvestigation(results).sort(SortOrder.DESCENDING); if(voCollResults != null) { for(RadiologyOrderVo voResult : voCollResults) { if(map.containsKey(voResult.getID_OrderInvestigation())) { voResult.setOrdInvXOStatusHistory((OrdInvXOStatusHistoryLiteVoCollection) map.get(voResult.getID_OrderInvestigation())); } } } return voCollResults; }
private void setResultGridRowData(RadiologyOrderVo voRadiologyOrder) { //WDEV-9780 if(form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevelsIsNotNull()) { ServiceRefVo voInvService = voRadiologyOrder.getInvestigationIsNotNull() && voRadiologyOrder.getInvestigation().getProviderServiceIsNotNull() && voRadiologyOrder.getInvestigation().getProviderService().getLocationServiceIsNotNull() && voRadiologyOrder.getInvestigation().getProviderService().getLocationService().getServiceIsNotNull() ? voRadiologyOrder.getInvestigation().getProviderService().getLocationService().getService() : null; SecurityLevelConfigVo voInvSecurityLevel = voRadiologyOrder.getInvestigationIsNotNull() && voRadiologyOrder.getInvestigation().getInvestigationIndexIsNotNull() ? voRadiologyOrder.getInvestigation().getInvestigationIndex().getSecurityLevel() : null; if(!form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels().doesInvPassSecurityCheck(voInvService, voInvSecurityLevel, false)) //WDEV-11622 return; } grdResultsRow row = form.grdResults().getRows().newRow(); if (voRadiologyOrder.getDisplayDateTimeIsNotNull()) row.setColDateTime(voRadiologyOrder.getDisplayDateTime().toString(DateTimeFormat.STANDARD)); if (voRadiologyOrder.getInvestigationIsNotNull() && voRadiologyOrder.getInvestigation().getInvestigationIndexIsNotNull()) row.setColExamName(voRadiologyOrder.getInvestigation().getInvestigationIndex().getName()); //WDEV-12054 if(voRadiologyOrder.getOrdInvXOStatusHistoryIsNotNull()) row.setTooltipForColExamName(voRadiologyOrder.getOrdInvXOStatusHistory().generateXoStatusTooltip()); if (voRadiologyOrder.getInvestigationIsNotNull() && voRadiologyOrder.getInvestigation().getProviderServiceIsNotNull() && voRadiologyOrder.getInvestigation().getProviderService().getLocationServiceIsNotNull() && voRadiologyOrder.getInvestigation().getProviderService().getLocationService().getServiceIsNotNull()) row.setColDepartment(voRadiologyOrder.getInvestigation().getProviderService().getLocationService().getService().getServiceName()); if (voRadiologyOrder.getOrderDetailsIsNotNull()) row.setColOrderingLocation(voRadiologyOrder.getOrderDetails().getCorrectLocation()); if (voRadiologyOrder.getOrderDetailsIsNotNull()) row.setColClinician(voRadiologyOrder.getOrderDetails().getCorrectClinician()); //Patient details if (voRadiologyOrder.getOrderDetailsIsNotNull() && voRadiologyOrder.getOrderDetails().getPatientIsNotNull()) { PatientShort patient = voRadiologyOrder.getOrderDetails().getPatient(); if (patient.getDisplayId() != null) { row.setColHospNum(patient.getDisplayId().getValue()); } if (patient.getName() != null) row.setColName(patient.getName().toString()); if (patient.getSexIsNotNull()) row.setColSex(patient.getSex().getText()); } row.setValue(voRadiologyOrder); }