/** * list the PatientSECSShortVoCollection */ public ims.clinical.vo.PatientSECSShortVoCollection listPatientSECS(ims.framework.utils.DateTime startDate, ims.framework.utils.DateTime endDate,PatientRefVo patRef) { if(startDate == null || endDate == null) throw new CodingRuntimeException("Please provide both From Date and To Date"); if (!patRef.getID_PatientIsNotNull()) throw new DomainRuntimeException("Please provide a patient with and id"); StringBuffer hql = new StringBuffer(); hql.append(" select patS from PatientSECS as patS "); hql.append(" where"); hql.append(" (( patS.authoringInformation.authoringDateTime is null "); hql.append(" or"); hql.append(" (patS.authoringInformation.authoringDateTime >= :startDate"); hql.append(" and"); hql.append(" patS.authoringInformation.authoringDateTime <= :endDate)) "); hql.append(" and patS.careContext.episodeOfCare.careSpell.patient.id = :patID"); hql.append(" and patS.isRIE is null) order by patS.authoringInformation.authoringDateTime desc" ); ArrayList paramValues = new ArrayList(); ArrayList paramNames = new ArrayList(); paramValues.add(startDate.getJavaDate()); paramValues.add(endDate.getJavaDate()); paramValues.add(patRef.getID_Patient()); paramNames.add("startDate"); paramNames.add("endDate"); paramNames.add("patID"); DomainFactory factory = getDomainFactory(); List list = factory.find(hql.toString(), paramNames, paramValues); return PatientSECSShortVoAssembler.createPatientSECSShortVoCollectionFromPatientSECS(list); }