private void searchMergeRequest() { PatientId sourcePatient = new PatientId(); sourcePatient.setType(form.lyrPatMerge().tabRequests().cmbSourceIdType().getValue()); sourcePatient.setValue(form.lyrPatMerge().tabRequests().txtSourceValue().getValue()); PatientId destinationPatient = new PatientId(); destinationPatient.setType(form.lyrPatMerge().tabRequests().cmbDestIdType().getValue()); destinationPatient.setValue(form.lyrPatMerge().tabRequests().txtDestValue().getValue()); MergeRequestVoCollection mergeColl = domain.listOutstandingRequests(form.lyrPatMerge().tabRequests().dteFrom().getValue(), form.lyrPatMerge().tabRequests().dteTo().getValue(), form.lyrPatMerge().tabRequests().ccRequesteBy().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo)form.lyrPatMerge().tabRequests().ccRequesteBy().getValue() : null , sourcePatient, destinationPatient); form.lyrPatMerge().tabRequests().grdMerge().getRows().clear(); if (mergeColl != null && mergeColl.size() > 0) { GenForm.lyrPatMergeLayer.tabRequestsContainer.grdMergeRow row; for (int i=0; i<mergeColl.size(); i++) { MergeRequestVo request = mergeColl.get(i); row = form.lyrPatMerge().tabRequests().grdMerge().getRows().newRow(); row.setValue(request); row.setcolComment(request.getComment()); row.setcolDestinationPatient(request.getDestinationPatId().toString()); row.setcolRequestedBy(request.getRequestedByIsNotNull()?request.getRequestedBy().getIMosName():""); row.setcolSourcePatient(request.getSourcePatId().toString()); row.setcolOccurred(request.getSysinfo().getCreationDateTime().getDate()); row.setTooltip(request.getComment()); } } form.lyrPatMerge().tabRequests().grdAffectedItems().setVisible(false); form.lyrPatMerge().tabRequests().grdType().setVisible(false); }
private int doMerges(MergeRequestVoCollection patList) { if (patList == null || patList.size() == 0) return 0; for (int i=0; i<patList.size(); i++) { MergeRequestVo req = patList.get(i); try { patMergeImpl.performPatientMerge(req, tablesList, pMergeConfig.mergePatientIds, pMergeConfig.processOcsCounts); numSuccessMerges++; } catch (Exception e) { // An exception occurred, so let's log this error try { if (e.getMessage() == null) patMergeImpl.logMergeError(req, "Null Exception Received"); else patMergeImpl.logMergeError(req, e.getMessage()); numFailedMerges++; } catch (StaleObjectException e1) { localLogger.error("StaleObjectException occurred logging Merge Error - " + e.getMessage(),e1); } } } return patList.size(); }
public MergeRequestVoCollection listPatientsToBeMerged() { DomainFactory factory = getDomainFactory(); IMSCriteria imsc=new IMSCriteria(MergeRequest.class, factory); imsc.equal(MergeRequest.FieldNames.Status, new Boolean(false)); List merges=imsc.find(); return MergeRequestVoAssembler.createMergeRequestVoCollectionFromMergeRequest(merges); }
private void searchMergeRequest() { PatientId sourcePatient = new PatientId(); sourcePatient.setType(form.lyrPatMerge().tabRequests().cmbSourceIdType().getValue()); sourcePatient.setValue(form.lyrPatMerge().tabRequests().txtSourceValue().getValue()); PatientId destinationPatient = new PatientId(); destinationPatient.setType(form.lyrPatMerge().tabRequests().cmbDestIdType().getValue()); destinationPatient.setValue(form.lyrPatMerge().tabRequests().txtDestValue().getValue()); MergeRequestVoCollection mergeColl = domain.listOutstandingRequests(form.lyrPatMerge().tabRequests().dteFrom().getValue(), form.lyrPatMerge().tabRequests().dteTo().getValue(), form.lyrPatMerge().tabRequests().ccRequesteBy().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo)form.lyrPatMerge().tabRequests().ccRequesteBy().getValue() : null , sourcePatient, destinationPatient); form.lyrPatMerge().tabRequests().grdMerge().getRows().clear(); // WDEV-18871 - start if (mergeColl == null || mergeColl.size() == 0) { engine.showMessage("No records matching your search criteria were found!", "No results",MessageButtons.OK, MessageIcon.INFORMATION); } // WDEV-18871 - end if (mergeColl != null && mergeColl.size() > 0) { GenForm.lyrPatMergeLayer.tabRequestsContainer.grdMergeRow row; for (int i=0; i<mergeColl.size(); i++) { MergeRequestVo request = mergeColl.get(i); row = form.lyrPatMerge().tabRequests().grdMerge().getRows().newRow(); row.setValue(request); row.setcolComment(request.getComment()); row.setcolDestinationPatient(request.getDestinationPatId().toString()); row.setcolRequestedBy(request.getRequestedByIsNotNull()?request.getRequestedBy().getIMosName():""); row.setcolSourcePatient(request.getSourcePatId().toString()); row.setcolOccurred(request.getSysinfo().getCreationDateTime().getDate()); row.setTooltip(request.getComment()); } } form.lyrPatMerge().tabRequests().grdAffectedItems().setVisible(false); form.lyrPatMerge().tabRequests().grdType().setVisible(false); }