public AdviceLeafletConfigDisplayVoCollection getAdviceLeaflets(ClinicalProblemRefVo clinicalProblem) { StringBuilder query = new StringBuilder(); query.append("SELECT advice FROM AdviceLeafletsConfig AS advice LEFT JOIN advice.problems AS problem "); query.append("LEFT JOIN advice.template AS template "); query.append("WHERE advice.isGenericAdviceLeaflet = 1 "); if (clinicalProblem != null && clinicalProblem.getID_ClinicalProblem() != null) { query.append("OR problem.id = ").append(clinicalProblem.getID_ClinicalProblem()); } query.append(" ORDER BY UPPER(template.name) ASC "); return AdviceLeafletConfigDisplayVoAssembler.createAdviceLeafletConfigDisplayVoCollectionFromAdviceLeafletsConfig(getDomainFactory().find(query.toString())); }
public ims.emergency.vo.AdviceLeafletConfigDisplayVoCollection getAdviceLeaflets(ims.clinical.configuration.vo.ClinicalProblemRefVo clinicalProblem) { StringBuilder query = new StringBuilder(); query.append("SELECT advice FROM AdviceLeafletsConfig AS advice LEFT JOIN advice.problems AS problem "); query.append("LEFT JOIN advice.template AS template "); query.append("WHERE advice.isGenericAdviceLeaflet = 1 "); if (clinicalProblem != null && clinicalProblem.getID_ClinicalProblem() != null) { query.append("OR problem.id = ").append(clinicalProblem.getID_ClinicalProblem()); } query.append(" ORDER BY UPPER(template.name) ASC "); return AdviceLeafletConfigDisplayVoAssembler.createAdviceLeafletConfigDisplayVoCollectionFromAdviceLeafletsConfig(getDomainFactory().find(query.toString())); }