public AllergenVoCollection listActiveAllergies(String filter) throws DomainInterfaceException { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from "); hql.append("Allergen x "); hql.append(" 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, filter, hql.toString(), names, values); if (resultsList.size() > 0) return AllergenVoAssembler.createAllergenVoCollectionFromAllergen(resultsList).sort(); else return null; }
@SuppressWarnings("unchecked") public AllergenVoCollection getAllergies(String text) throws DomainInterfaceException { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from "); hql.append("Allergen x "); hql.append(" 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, text, hql.toString(), names, values); if (resultsList.size() > 0) return AllergenVoAssembler.createAllergenVoCollectionFromAllergen(resultsList).sort(); else return null; }
public AllergenVoCollection listAllergens(String strAllergen) throws DomainInterfaceException { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from Allergen a join a.keywords as kw "); ArrayList names = new ArrayList(); ArrayList values = new ArrayList(); hql.append(" where a.isActive = :isActive"); names.add("isActive"); values.add(Boolean.TRUE); return AllergenVoAssembler.createAllergenVoCollectionFromAllergen(Keywords.searchByKeywords(factory, strAllergen, hql.toString(), names, values)); }
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 AllergenVo getAllergenByName(String strName) { DomainFactory factory = getDomainFactory(); Allergen domAllergen = Allergen.getAllergenFromAllergenName(factory, strName); return AllergenVoAssembler.create(domAllergen); }
private AllergenVoCollection listAllergen(String filter, boolean activeOnly) throws DomainInterfaceException { return AllergenVoAssembler.createAllergenVoCollectionFromAllergen(listDomAllergen(filter, activeOnly)).sort(); }