private void doSearch() throws PresentationLogicException { ClinicianNoteDefaultTextConfigVoCollection coll = domain.listClinicianNotes(form.qmbSearchPresentingProblem().getValue(), form.cmbSearchStatus().getValue()); clearControls(); form.getLocalContext().setselectedClinicianNote(null);// ----------- if (coll == null || coll.size() == 0) { engine.showMessage("There are no Records for the Search Criteria Provided"); return; } populateScreenFromData(coll); }
private void populateScreenFromData(ClinicianNoteDefaultTextConfigVoCollection coll) throws PresentationLogicException { if (coll == null) return; for (int i = 0; i < coll.size(); i++) { ClinicianNoteDefaultTextConfigVo clinicianNote = coll.get(i); grdPresentingProbRow row = form.grdPresentingProb().getRows().newRow(); row.setcolPresProbl(clinicianNote.getProblem().getPCName()); row.setcolDefaultClinician(clinicianNote.getDefaultClinicianNote()); row.setTooltipForcolDefaultClinician(clinicianNote.getDefaultClinicianNote()); row.setcolStatus(clinicianNote.getStatus().toString()); row.setValue(clinicianNote); } if (form.getLocalContext().getselectedClinicianNote() != null) { form.getLocalContext().setselectedClinicianNote(domain.getClinicianNote(form.getLocalContext().getselectedClinicianNote())); form.grdPresentingProb().setValue(form.getLocalContext().getselectedClinicianNote()); } populateInstanceControlsFromData(form.getLocalContext().getselectedClinicianNote()); }
private boolean presentingProblHaveActiveClinicianNote(ClinicianNoteDefaultTextConfigVo clinicianNoteToSave) { ClinicianNoteDefaultTextConfigVoCollection clinicianNote = domain.listClinicianNotes(clinicianNoteToSave.getProblem(), PreActiveActiveInactiveStatus.ACTIVE); clinicianNote.remove(clinicianNoteToSave); if (clinicianNote.size() == 0) return false; return true; }
public ClinicianNoteDefaultTextConfigVoCollection listClinicianNotes(ClinicalProblemVo presentingProblem, LookupInstVo status) { DomainFactory factory = getDomainFactory(); String hql = " select cn from ClinicianNoteDefaultTextConfig as cn "; StringBuffer condStr = new StringBuffer(); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); if (presentingProblem != null) { condStr.append(andStr + " where cn.problem.id = :cName"); markers.add("cName"); values.add(presentingProblem.getID_ClinicalProblem()); andStr = " and "; } else andStr = " where "; if (status != null) { condStr.append(andStr + " cn.status.id = :cStatus"); markers.add("cStatus"); values.add(status.getID()); } condStr.append(" order by UPPER(cn.problem.pCName) asc"); hql += condStr.toString(); return ClinicianNoteDefaultTextConfigVoAssembler.createClinicianNoteDefaultTextConfigVoCollectionFromClinicianNoteDefaultTextConfig(factory.find(hql, markers, values)); }