private void search() { clearResults(); EDischargeSearchCriteriaVo voCriteria = populateSearchCriteria(); DischargeDetailsVoCollection dischargeDetails = domain.searchByCriteria(voCriteria); //start WDEV-14703 if (dischargeDetails == null || dischargeDetails.size() == 0) { engine.showMessage("No matching discharged patients found."); return; } //end populateDischargesGrid(dischargeDetails); if (voCriteria != null && voCriteria.getColumnSortOrder() != null) { setSortOrderForColumn(voCriteria.getColumnSortOrder().getColumnId(), voCriteria.getColumnSortOrder().getSortOrder()); } }
public DischargeDetailsVo getDischargeDetailsForCareContext(CareContextRefVo careContext) { if(careContext == null || careContext.getID_CareContext() == null) throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext"); DomainFactory factory = getDomainFactory(); List dischargeDetails = factory.find("select dd from DischargeDetails as dd left join dd.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()}); DischargeDetailsVoCollection discharge = DischargeDetailsVoAssembler.createDischargeDetailsVoCollectionFromDischargeDetails(dischargeDetails); return discharge != null && discharge.size() > 0 ? (discharge.get(0) != null ? discharge.get(0) : null) : null; }
/** * get Discharge Details */ public ims.clinical.vo.DischargeDetailsVo getDischargeDetails(ims.core.admin.vo.CareContextRefVo careContextRefvo) { if(careContextRefvo == null) throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. "); if(careContextRefvo != null) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from DischargeDetails dd where "); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Serializable> values = new ArrayList<Serializable>(); hql.append(andStr + " dd.careContext.id = :careContextId"); markers.add("careContextId"); values.add(careContextRefvo.getID_CareContext()); andStr = " and "; List list = factory.find(hql.toString(), markers,values); if(list != null && list.size() > 0) { DischargeDetailsVoCollection voColl = DischargeDetailsVoAssembler.createDischargeDetailsVoCollectionFromDischargeDetails(list); if(voColl != null && voColl.size() > 0) return voColl.get(0); } } return null; }
public DischargeDetailsVo getDischargeDetails(CareContextRefVo careContextRefvo) { if(careContextRefvo == null) throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. "); if(careContextRefvo != null) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from DischargeDetails dd where "); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Serializable> values = new ArrayList<Serializable>(); hql.append(andStr + " dd.careContext.id = :careContextId"); markers.add("careContextId"); values.add(careContextRefvo.getID_CareContext()); andStr = " and "; List list = factory.find(hql.toString(), markers,values); if(list != null && list.size() > 0) { DischargeDetailsVoCollection voColl = DischargeDetailsVoAssembler.createDischargeDetailsVoCollectionFromDischargeDetails(list); if(voColl != null && voColl.size() > 0) return voColl.get(0); } } return null; }