@Override protected void onQmbInvestigationTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException { InvestigationIndexLiteVoCollection coll = domain.listInvestigations(value, form.GrpCriteria().getValue().equals(GrpCriteriaEnumeration.rdoBegins)); form.qmbInvestigation().clear(); for (int i = 0; i < coll.size(); i++) { form.qmbInvestigation().newRow(coll.get(i), coll.get(i).getName()); } if (coll.size() == 1) { form.qmbInvestigation().setValue(coll.get(0)); } else if (coll.size() > 1) { form.qmbInvestigation().showOpened(); } }
protected void onQmbResultTypeTextSubmited(String value) throws ims.framework.exceptions.PresentationLogicException { //InvestigationIndexLiteVoCollection coll = domain.listExams("%" + value + "%"); InvestigationIndexLiteVoCollection coll = domain.listExamsSynonyms( value, form.GrpCriteria().getValue().equals(GrpCriteriaEnumeration.rdoBegins)); form.qmbResultType().clear(); for (int i = 0; i < coll.size(); i++) { form.qmbResultType().newRow(coll.get(i), coll.get(i).getName()); } if(coll.size() == 1) { form.qmbResultType().setValue(coll.get(0)); } else if(coll.size() > 1) { form.qmbResultType().showOpened(); } }
private void populateInvestigationTypes(String value) { form.lyrMain().tabSearch().qmbInvestigationType().clear(); //InvestigationIndexLiteVoCollection investigations = domain.listInvestigationTypes("%" + value + "%"); InvestigationIndexLiteVoCollection investigations = domain.listInvestigationTypesSynonyms(value,form.lyrMain().tabSearch().GrpCriteria().getValue().equals(GrpCriteriaEnumeration.rdoBegins)); if (investigations != null) { for (int x = 0; x < investigations.size(); x++) { addInvestigationType(investigations.get(x)); } if (investigations.size() == 1) form.lyrMain().tabSearch().qmbInvestigationType().setValue(investigations.get(0)); else if (investigations.size() > 1) form.lyrMain().tabSearch().qmbInvestigationType().showOpened(); } }
public InvestigationIndexLiteVoCollection listInvestigationTypesSynonyms(String name, Boolean beginWith) { if(name != null) { name.replaceAll("%", ""); if(beginWith != null) name = (!beginWith ? "%" + name.toUpperCase() + "%" : name.toUpperCase() + "%"); else name = name.toUpperCase() + "%"; } return InvestigationIndexLiteVoAssembler.createInvestigationIndexLiteVoCollectionFromInvestigationIndex( getDomainFactory().find("select distinct i1_1 from InvestigationIndex as i1_1 left join i1_1.synonyms as i2_1 where (i1_1.category = :category and ((i2_1.upperName like :name and i2_1.activeStatus = :Active) or i1_1.upperName like :name )and i1_1.activeStatus = :status and i1_1.isProfile = :isProfile) order by i1_1.upperName", new String[] {"category", "name", "status", "isProfile", "Active"}, new Object[] {getDomLookup(Category.PATHOLOGY), name, getDomLookup(PreActiveActiveInactiveStatus.ACTIVE), Boolean.FALSE,Boolean.TRUE})); }
public InvestigationIndexLiteVoCollection listExamsSynonyms(String name,Boolean beginWith) { if(name != null) { name.replaceAll("%", ""); if(beginWith != null) name = (!beginWith ? "%" + name.toUpperCase() + "%" : name.toUpperCase() + "%"); else name = name.toUpperCase() + "%"; } return InvestigationIndexLiteVoAssembler.createInvestigationIndexLiteVoCollectionFromInvestigationIndex( getDomainFactory().find("select distinct i1_1 from InvestigationIndex as i1_1 left join i1_1.synonyms as i2_1 where (i1_1.category = :cat and ((i2_1.upperName like :name and i2_1.activeStatus = :Active) or i1_1.upperName like :name ) and i1_1.activeStatus = :status and i1_1.isProfile = :isProfile) order by i1_1.upperName", new String[] {"name", "cat", "status", "isProfile", "Active"}, new Object[] {name, getDomLookup(Category.CLINICALIMAGING), getDomLookup(PreActiveActiveInactiveStatus.ACTIVE), Boolean.FALSE, Boolean.TRUE})); }
public ims.ocrr.vo.InvestigationIndexLiteVoCollection listInvestigationTypes(String name) { if(name != null) name = name.toUpperCase(); return InvestigationIndexLiteVoAssembler.createInvestigationIndexLiteVoCollectionFromInvestigationIndex( getDomainFactory().find("from InvestigationIndex as i1_1 where (i1_1.category = :category and i1_1.upperName like :name and i1_1.activeStatus = :status and i1_1.isProfile = :isProfile) order by i1_1.upperName", new String[] {"category", "name", "status", "isProfile"}, new Object[] {getDomLookup(Category.PATHOLOGY), name, getDomLookup(PreActiveActiveInactiveStatus.ACTIVE), Boolean.FALSE})); }
/** * listExams */ public ims.ocrr.vo.InvestigationIndexLiteVoCollection listExams(String name) { if(name != null) name = name.toUpperCase(); return InvestigationIndexLiteVoAssembler.createInvestigationIndexLiteVoCollectionFromInvestigationIndex( getDomainFactory().find("from InvestigationIndex as i1_1 where (i1_1.category = :cat and i1_1.upperName like :name and i1_1.activeStatus = :status and i1_1.isProfile = :isProfile) order by i1_1.upperName", new String[] {"name", "cat", "status", "isProfile"}, new Object[] {name, getDomLookup(Category.CLINICALIMAGING), getDomLookup(PreActiveActiveInactiveStatus.ACTIVE), Boolean.FALSE})); }