public ServiceFunctionLiteVoCollection listServiceFunctionsLite(ServiceRefVo service) { if (service == null || service.getID_Service() == null) throw new CodingRuntimeException("service is null or id not provided for method listServiceFunctionsLite"); ServiceFunctionLiteVoCollection services = new ServiceFunctionLiteVoCollection(); DomainFactory factory = getDomainFactory(); IMSCriteria imsc = new IMSCriteria(ims.core.clinical.domain.objects.ServiceFunction.class, factory); imsc.equal("this.service.id", service.getID_Service()); imsc.equal("this.isActive", true); List serviceFunctions = imsc.find(); for (int i = 0; i < serviceFunctions.size(); i++) { services.add(ServiceFunctionLiteVoAssembler.create((ims.core.clinical.domain.objects.ServiceFunction) serviceFunctions.get(i))); } if (services.size() > 0) return services; return null; }
public ServiceFunctionLiteVoCollection listServiceFunctionByDOSs(DirectoryofServiceRefVoCollection dosColl) { if(dosColl == null) throw new CodingRuntimeException("dosColl parameter is null in method listServiceFunctionByDOSs"); DomainFactory factory = getDomainFactory(); List servFuncs = factory.find("select dos.functions from DirectoryofService as dos where dos.id in (" + getIdString(dosColl) + ")"); return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncs); }
public ServiceFunctionLiteVoCollection listServiceFunctionByService(ServiceRefVo service) { if(service == null || service.getID_Service() == null) throw new CodingRuntimeException("service parameter is null or id not provided in method listServiceFunctionByService"); DomainFactory factory = getDomainFactory(); List servFuncs = factory.find("from ServiceFunction as servFunc where servFunc.service.id = :idService",new String[]{"idService"}, new Object[]{service.getID_Service()}); return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncs); }
public ServiceFunctionLiteVoCollection listServiceFunctionsLite(ServiceRefVo service) { DomainFactory factory = getDomainFactory(); if (service != null && service.getID_ServiceIsNotNull()) { java.util.List<?> servfuncList = factory.find("from ServiceFunction servfunc where servfunc.service.id = :serviceid and servfunc.isActive = :isAct", new String[]{"serviceid", "isAct"}, new Object[]{service.getID_Service(), Boolean.TRUE}); return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servfuncList).sort(); } return null; }
public ims.core.vo.ServiceFunctionLiteVoCollection getFunctionsForService(ServiceRefVo service) { if (service == null || service.getID_Service() == null) return null; List list = getDomainFactory().find("select servFunct from ServiceFunction as servFunct left join servFunct.service as serv where servFunct.isActive = 1 and serv.id = :serviceID", new String[] {"serviceID"}, new Object[] {service.getID_Service()}); if (list != null && list.size() > 0) return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(list); return null; }
public ServiceFunctionLiteVo getServiceFunction(ServiceRefVo service, ServiceFunction function) { if (service == null || service.getID_Service() == null || function == null) return null; List list = getDomainFactory().find("select servFunct from ServiceFunction as servFunct left join servFunct.service as serv left join servFunct.function as func where servFunct.isActive = 1 and serv.id = :serviceID and func.id = :functionID", new String[] {"serviceID", "functionID"}, new Object[] {service.getID_Service(), function.getID()}); if (list != null && list.size() > 0) return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(list).get(0); return null; }
public ServiceFunctionLiteVoCollection listServiceFunctions(ServiceRefVo service) { if(service == null || service.getID_Service() == null) return null; DomainFactory factory = getDomainFactory(); String hql = "select servfunc from ServiceFunction servfunc where servfunc.service.id = :serviceid and servfunc.isActive = 1 order by UPPER(servfunc.function.text) asc"; List servFuncList = factory.find(hql, new String[]{"serviceid"}, new Object[]{service.getID_Service()}); return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncList); }
public ServiceAndFunctionForFutureApptsVo getServiceAndFunctionForAppt(Booking_AppointmentRefVo appointment) { if(appointment == null || appointment.getID_Booking_Appointment() == null) return null; ServiceAndFunctionForFutureApptsVo voServiceAndSlot = null; String hql = "select serviceFunc, session.service from Booking_Appointment as appt left join appt.session as session left join appt.serviceFunction as serviceFunc where (appt.id = :idAppt)"; List items = getDomainFactory().find(hql, new String[]{"idAppt"}, new Object[]{appointment.getID_Booking_Appointment()}); if(items != null && items.size() > 0) { Iterator it = items.iterator(); if(it.hasNext()) { Object[] item = (Object[]) it.next(); ServiceFunction doServiceFunction = (ServiceFunction) item[0]; Service doService = (Service) item[1]; ServiceLiteVo service = ServiceLiteVoAssembler.create(doService); ServiceFunctionLiteVo serviceFunct = ServiceFunctionLiteVoAssembler.create(doServiceFunction); voServiceAndSlot = new ServiceAndFunctionForFutureApptsVo(); voServiceAndSlot.setService(service); voServiceAndSlot.setFunction(serviceFunct); } } return voServiceAndSlot; }
public ServiceAndFunctionForFutureApptsVo getCatsReferralServiceAndfunction (CatsReferralRefVo catsReferralRef) { if(catsReferralRef == null || catsReferralRef.getID_CatsReferral() == null) return null; ServiceAndFunctionForFutureApptsVo voServiceAndSlot = null; String hql = "select srv, func from CatsReferral as cats left join cats.referralDetails as det left join det.service as srv left join det.function as func where (cats.id = :idRef)"; List<?> items = getDomainFactory().find(hql, new String[]{"idRef"}, new Object[]{catsReferralRef.getID_CatsReferral()}); if(items != null && items.size() > 0) { Iterator it = items.iterator(); if(it.hasNext()) { Object[] item = (Object[]) it.next(); Service doService = (Service) item[0]; ServiceFunction doServiceFunction = (ServiceFunction) item[1]; ServiceLiteVo service = ServiceLiteVoAssembler.create(doService); ServiceFunctionLiteVo serviceFunct = ServiceFunctionLiteVoAssembler.create(doServiceFunction); voServiceAndSlot = new ServiceAndFunctionForFutureApptsVo(); voServiceAndSlot.setService(service); voServiceAndSlot.setFunction(serviceFunct); } } return voServiceAndSlot; }
public ims.core.vo.ServiceFunctionLiteVo getServiceFunction(ims.core.clinical.vo.ServiceFunctionRefVo serviceFunctionRef) { DomainFactory factory = getDomainFactory(); ServiceFunction domServiceFunction = (ServiceFunction)factory.getDomainObject(ServiceFunction.class, serviceFunctionRef.getID_ServiceFunction()); return ServiceFunctionLiteVoAssembler.create(domServiceFunction); }
public ServiceFunctionLiteVoCollection listServiceFunctionByService(ServiceRefVo service) { if(service == null || service.getID_Service() == null) throw new CodingRuntimeException("service parameter is null or id not provided in method listServiceFunctionByService"); DomainFactory factory = getDomainFactory(); List servFuncs = factory.find("from ServiceFunction as servFunc where servFunc.service.id = :idService and servFunc.isActive = 1",new String[]{"idService"}, new Object[]{service.getID_Service()}); return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(servFuncs); }
public ServiceFunctionLiteVo getServiceFunction(ServiceFunctionRefVo serviceFunctionRef) { DomainFactory factory = getDomainFactory(); ServiceFunction domServiceFunction = (ServiceFunction)factory.getDomainObject(ServiceFunction.class, serviceFunctionRef.getID_ServiceFunction()); ServiceFunctionLiteVo voServiceFunct = ServiceFunctionLiteVoAssembler.create(domServiceFunction); return voServiceFunct; }
public ims.core.vo.ServiceFunctionLiteVoCollection listServiceFunctions(ims.core.clinical.vo.ServiceRefVo service) { if(service == null || service.getID_Service() == null) return null; String query = "select sf from ServiceFunction as sf left join sf.service as s left join sf.function as f where s.id = :ServiceId and f.id is not null and sf.isActive = 1"; return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(getDomainFactory().find(query, new String[] {"ServiceId"}, new Object[] {service.getID_Service()})); }
public ServiceFunctionLiteVoCollection listServiceFunctionsLite(ServiceRefVo service) { if (service == null || service.getID_Service() == null) throw new CodingRuntimeException("service is null or id not provided for method listServiceFunctionsLite"); List<?> list = getDomainFactory().find("select servFunct from ServiceFunction as servFunct left join servFunct.service as serv where servFunct.isActive = 1 and serv.id = :serviceID", new String[] {"serviceID"}, new Object[] {service.getID_Service()}); if (list != null && list.size() > 0) return ServiceFunctionLiteVoAssembler.createServiceFunctionLiteVoCollectionFromServiceFunction(list); return null; }