public ClinicalProblemShortVoCollection listClinicalProblems(String searchText) { if(searchText == null) return null; searchText = searchText.trim().toUpperCase(); if(searchText == null || searchText.length() == 0) return null; DomainFactory factory = getDomainFactory(); String query = "select cp from ClinicalProblem as cp left join cp.keywords as k where (upper(cp.pCName) like :ClinicalProblemSearchText or upper(k.keyword) like :ClinicalProblemSearchText) and cp.isActive = 1 order by upper(cp.pCName) asc"; List<?> clinicalProblemsList = factory.find(query, new String[] {"ClinicalProblemSearchText"}, new Object[] {searchText + "%"}); return ClinicalProblemShortVoAssembler.createClinicalProblemShortVoCollectionFromClinicalProblem(clinicalProblemsList); }
public ClinicalProblemShortVoCollection listProblems(String name) { // Use StringBuilder to build the HQL query StringBuilder hqlQuery = new StringBuilder(); hqlQuery.append("SELECT problem "); hqlQuery.append(" FROM ClinicalProblem AS problem LEFT JOIN problem.keywords AS keyw "); ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); // Create parameters string if (name != null && name.length() > 0) { hqlQuery.append(" WHERE (UPPER(problem.pCName) LIKE :NAME"); hqlQuery.append(" OR UPPER(keyw.keyword) LIKE :NAME) AND problem.isActive = 1 "); paramNames.add("NAME"); paramValues.add("%" + name.toUpperCase() + "%"); } // Set order mode hqlQuery.append(" ORDER BY UPPER(problem.pCName) ASC"); return ClinicalProblemShortVoAssembler.createClinicalProblemShortVoCollectionFromClinicalProblem(getDomainFactory().find(hqlQuery.toString(), paramNames, paramValues)); }
public ims.clinical.vo.ClinicalProblemShortVoCollection listConfiguredProblemsShort(String pcName, Boolean activeOnly) throws DomainInterfaceException { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from ClinicalProblem p join p.keywords as kw "); ArrayList names = new ArrayList(); ArrayList values = new ArrayList(); if (activeOnly.booleanValue() == true) { hql.append(" where p.isActive = :isActive"); names.add("isActive"); values.add(Boolean.TRUE); } return ClinicalProblemShortVoAssembler.createClinicalProblemShortVoCollectionFromClinicalProblem(Keywords.searchByKeywords(factory, pcName, hql.toString(), names, values)); }
@Override public ClinicalProblemShortVoCollection listProblems(String problemName) { DomainFactory factory = getDomainFactory(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); if (problemName == null || (problemName != null && problemName.trim().length() == 0)) throw new DomainRuntimeException("String for search is null."); String probNameLite = problemName != null ? problemName.toUpperCase() + "%" : "%%"; StringBuffer hql = new StringBuffer(); hql.append(" select probl from ClinicalProblem as probl left join probl.keywords as k where (probl.pCName like :ClinicalProblemSearchText or k.keyword like :ClinicalProblemSearchText) and probl.isActive = 1"); hql.append(" order by UPPER(probl.pCName) asc"); markers.add("ClinicalProblemSearchText"); values.add(probNameLite); return ClinicalProblemShortVoAssembler.createClinicalProblemShortVoCollectionFromClinicalProblem(factory.find(hql.toString(), markers, values)); }
public ims.clinical.vo.ClinicalProblemShortVoCollection listActiveProblems(String pcName) throws ims.domain.exceptions.DomainInterfaceException { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from ClinicalProblem x join x.keywords as kw"); ArrayList names = new ArrayList(); ArrayList values = new ArrayList(); hql.append(" where x.isActive = :isActive"); names.add("isActive"); values.add(Boolean.TRUE); List resultsList = Keywords.searchByKeywords(factory, pcName, hql.toString(), names, values); return ClinicalProblemShortVoAssembler.createClinicalProblemShortVoCollectionFromClinicalProblem(resultsList); }
public ims.clinical.vo.ClinicalProblemShortVo getClinicalProblemShortVo(ims.clinical.configuration.vo.ClinicalProblemRefVo clinicalRef) { if( clinicalRef == null ) throw new CodingRuntimeException("TrackingRefVo cannot be null"); return ClinicalProblemShortVoAssembler.create((ClinicalProblem) getDomainFactory().getDomainObject(ClinicalProblem.class, clinicalRef.getID_ClinicalProblem())); }
/** * listHotlistProblemsShort * @throws DomainInterfaceException */ public ims.clinical.vo.ClinicalProblemShortVoCollection listHotlistProblemsShort(String pcName, ims.core.vo.lookups.Specialty lkpSpecialty) throws DomainInterfaceException { if(pcName == null) throw new DomainRuntimeException("Invalid Search criteria. Clinical Problem name filter must be supplied."); if(lkpSpecialty == null) throw new DomainRuntimeException("Invalid Search criteria. Specialty must be supplied."); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("select distinct probHotListItem from ProblemHotlist as probHotList left join probHotList.hotlistItem as probHotListItem left join probHotListItem.problem as prob left join prob.keywords as kw "); ArrayList names = new ArrayList(); ArrayList values = new ArrayList(); hql.append(" where prob.isActive = :isActive"); names.add("isActive"); values.add(Boolean.TRUE); hql.append(" and probHotList.specialty = :spec"); names.add("spec"); values.add(getDomLookup(lkpSpecialty)); List hits = Keywords.searchByKeywords(factory, pcName, hql.toString(), names, values); List ret = new ArrayList(); for (int i = 0; i < hits.size(); i++) { ret.add(((ProblemHotlistItem)hits.get(i)).getProblem()); } return ClinicalProblemShortVoAssembler.createClinicalProblemShortVoCollectionFromClinicalProblem(ret); }
public ClinicalProblemShortVoCollection listHotlistProblemsShort(String pcName, Specialty specialty) throws DomainInterfaceException { if(pcName == null) throw new DomainRuntimeException("Invalid Search criteria. Clinical Problem name filter must be supplied."); if(specialty == null) throw new DomainRuntimeException("Invalid Search criteria. Specialty must be supplied."); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" select distinct item from ProblemHotlistItem item join item.problem as prob join prob.keywords as kw "); ArrayList names = new ArrayList(); ArrayList values = new ArrayList(); hql.append(" where prob.isActive = :isActive"); names.add("isActive"); values.add(Boolean.TRUE); hql.append(" and item.hotlist.specialty = :spec"); names.add("spec"); values.add(getDomLookup(specialty)); List hits = Keywords.searchByKeywords(factory, pcName, hql.toString(), names, values); List ret = new ArrayList(); for (int i = 0; i < hits.size(); i++) { ret.add(((ProblemHotlistItem)hits.get(i)).getProblem()); } return ClinicalProblemShortVoAssembler.createClinicalProblemShortVoCollectionFromClinicalProblem(ret); }
public IGenericItem[] listIGenericItems(String filter, CciType cciType, Boolean activeOnly) { List resultsList; try { resultsList = listDomIGenericItemInfo(filter, cciType, activeOnly.booleanValue()); } catch (DomainInterfaceException e) { return null; } if (resultsList.size() > 0) { if (cciType.equals(CciType.ALLERGEN)) { return AllergenVoAssembler.createAllergenVoCollectionFromAllergen(resultsList).toIGenericItemArray(); } else if (cciType.equals(CciType.MEDICATION)) { return MedicationLiteVoAssembler.createMedicationLiteVoCollectionFromMedication(resultsList).toIGenericItemArray(); } else if (cciType.equals(CciType.DIAGNOSIS)) { return DiagLiteVoAssembler.createDiagLiteVoCollectionFromDiagnosis(resultsList).toIGenericItemArray(); } else if (cciType.equals(CciType.PROBLEM)) { return ClinicalProblemShortVoAssembler.createClinicalProblemShortVoCollectionFromClinicalProblem(resultsList).toIGenericItemArray(); } else if (cciType.equals(CciType.PROCEDURE)) { return ProcedureLiteVoAssembler.createProcedureLiteVoCollectionFromProcedure(resultsList).toIGenericItemArray(); } else if (cciType.equals(CciType.CANCERIMAGE)) { return CancerImagingEventLiteVoAssembler.createCancerImagingEventLiteVoCollectionFromCancerImagingEvent(resultsList).toIGenericItemArray(); } else if (cciType.equals(CciType.VACCINE)) { return VaccineLiteVoAssembler.createVaccineLiteVoCollectionFromVaccine(resultsList).toIGenericItemArray(); } else if(cciType.equals(CciType.PRESENTING_ISSUE)) { return PresentingComplaintVoAssembler.createPresentingComplaintVoCollectionFromPresentingComplaint(resultsList).toICciFullArray(); } else if(cciType.equals(CciType.TREATMENT_INTERVENTION))//WDEV-17060 { return TreatmentInterventionVoAssembler.createTreatmentInterventionVoCollectionFromTreatmentIntervention(resultsList).toICciFullArray(); } else { throw new DomainRuntimeException("Unknown CCI Type in 'listCciLite' = " + cciType.toString()); } } return null; }
public ClinicalProblemShortVoCollection listProblems(String problemName) { if(problemName == null) return null; problemName = problemName.trim().toUpperCase(); if(problemName == null || problemName.length() == 0) return null; DomainFactory factory = getDomainFactory(); String query = "select cp from ClinicalProblem as cp left join cp.keywords as k where (UPPER(cp.pCName) like :ClinicalProblemSearchText or UPPER(k.keyword) like :ClinicalProblemSearchText) and cp.isActive = 1 order by upper(cp.pCName) asc"; return ClinicalProblemShortVoAssembler.createClinicalProblemShortVoCollectionFromClinicalProblem((List<?>) factory.find(query, "ClinicalProblemSearchText", problemName + "%")); }
public ClinicalProblemShortVoCollection listProblems(String problemName) { DomainFactory factory = getDomainFactory(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); if (problemName == null || (problemName != null && problemName.trim().length() == 0)) throw new DomainRuntimeException("String for search is null."); String probNameLite = problemName != null ? problemName.toUpperCase() + "%" : "%%"; StringBuffer hql = new StringBuffer(); hql.append(" select probl from ClinicalProblem as probl left join probl.keywords as k where (probl.pCName like :ClinicalProblemSearchText or k.keyword like :ClinicalProblemSearchText) and probl.isActive = 1"); hql.append(" order by UPPER(probl.pCName) asc"); markers.add("ClinicalProblemSearchText"); values.add(probNameLite); return ClinicalProblemShortVoAssembler.createClinicalProblemShortVoCollectionFromClinicalProblem(factory.find(hql.toString(), markers, values)); }
public ClinicalProblemShortVoCollection listProblems(String problemName) { DomainFactory factory = getDomainFactory(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); if (problemName == null || (problemName != null && problemName.length() == 0)) throw new DomainRuntimeException("String for search is null."); String probNameLite = problemName != null ? problemName.toUpperCase() + "%" : "%%"; StringBuffer hql = new StringBuffer(); hql.append(" select probl from ClinicalProblem as probl left join probl.keywords as k where (probl.pCName like :ClinicalProblemSearchText or k.keyword like :ClinicalProblemSearchText) and probl.isActive = 1"); hql.append(" order by UPPER(probl.pCName) asc"); markers.add("ClinicalProblemSearchText"); values.add(probNameLite); return ClinicalProblemShortVoAssembler.createClinicalProblemShortVoCollectionFromClinicalProblem(factory.find(hql.toString(), markers, values)); }
private ClinicalProblemShortVoCollection listConfiguredProblems(String filter, boolean activeOnly) throws DomainInterfaceException { return ClinicalProblemShortVoAssembler.createClinicalProblemShortVoCollectionFromClinicalProblem(listDomConfiguredProblems(filter, activeOnly)).sort(); }