public ElectiveListConfigurationVoCollection getWaitingListConfigForPatient(PatientRefVo patientRef) { if (patientRef==null || patientRef.getID_Patient()==null) { throw new CodingRuntimeException("PatientRefVo should not be null"); } ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); StringBuffer hql = new StringBuffer("select wlc from PatientElectiveList as pel left join pel.electiveList as wlc where pel.patient.id = :PatID "); markers.add("PatID"); values.add(patientRef.getID_Patient()); List <?> list = getDomainFactory().find(hql.toString(),markers,values); return ElectiveListConfigurationVoAssembler.createElectiveListConfigurationVoCollectionFromElectiveListConfiguration(list); }
public ims.admin.vo.ElectiveListConfigurationVo save(ims.admin.vo.ElectiveListConfigurationVo configurationToSave) throws ims.domain.exceptions.StaleObjectException { if (configurationToSave == null) { throw new CodingRuntimeException("Cannot save null ElectiveListConfigurationVo"); } DomainFactory factory = getDomainFactory(); ElectiveListConfiguration domainWaitinngListConfig = ElectiveListConfigurationVoAssembler.extractElectiveListConfiguration(factory, configurationToSave); factory.save(domainWaitinngListConfig); return ElectiveListConfigurationVoAssembler.create(domainWaitinngListConfig); }
public ims.admin.vo.ElectiveListConfigurationVo getConfiguration(ims.core.configuration.vo.ElectiveListConfigurationRefVo configurationRef) { if (configurationRef==null ||configurationRef.getID_ElectiveListConfiguration()==null) { throw new CodingRuntimeException("Cannot get ElectiveListConfigurationVo on null Id "); } DomainFactory factory = getDomainFactory(); ElectiveListConfiguration domainWaitListConfig = (ElectiveListConfiguration) factory.getDomainObject(ElectiveListConfiguration.class,configurationRef.getID_ElectiveListConfiguration()); return ElectiveListConfigurationVoAssembler.create(domainWaitListConfig); }
public ElectiveListConfigurationVoCollection getElectiveListConfigForHCP(Integer hcpId, Integer serviceId) { if(hcpId == null) throw new CodingRuntimeException("Cannot get ElectiveListConfig on null HCP id."); List list = getDomainFactory().find("select config from ElectiveListConfiguration as config left join config.service as serv left join config.hCPs as hcps left join hcps.hCP as hcp where (hcp.id = :hcpID) and (serv.id = :serviceID) and (config.isActive = 1)", new String[] {"hcpID", "serviceID"}, new Object[] {hcpId, serviceId}); return ElectiveListConfigurationVoAssembler.createElectiveListConfigurationVoCollectionFromElectiveListConfiguration(list); }
public ElectiveListConfigurationVoCollection getElectiveListConfigForService(Integer serviceId) { if(serviceId == null) throw new CodingRuntimeException("Cannot get ElectiveListConfig on null Service id."); List list = getDomainFactory().find("select config from ElectiveListConfiguration as config left join config.service as serv where (config.isActive = 1) and (serv.id = :servID)", new String[] {"servID"}, new Object[] {serviceId}); return ElectiveListConfigurationVoAssembler.createElectiveListConfigurationVoCollectionFromElectiveListConfiguration(list); }
public ElectiveListConfigurationVoCollection getElectiveListsBySpecialty(Integer specialtyId) { if(specialtyId == null) throw new CodingRuntimeException("Cannot get ElectiveListConfig on null Specialty id."); List list = getDomainFactory().find("select config from ElectiveListConfiguration as config left join config.service as serv left join serv.specialty as spec where (config.isActive = 1) and (spec.id = :servID)", new String[] {"servID"}, new Object[] {specialtyId}); return ElectiveListConfigurationVoAssembler.createElectiveListConfigurationVoCollectionFromElectiveListConfiguration(list); }
public ElectiveListConfigurationVoCollection listWaitingConfiguration(ServiceRefVo serviceRef) { DomainFactory factory = getDomainFactory(); StringBuffer hqlConditions = new StringBuffer(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); String andStr = ""; StringBuffer hql = new StringBuffer("select wLC from ElectiveListConfiguration as wLC "); if (serviceRef!=null) { hqlConditions.append(andStr); hqlConditions.append(" wLC.service.id=:Service"); markers.add("Service"); values.add(serviceRef.getID_Service()); andStr = " and "; } if (hqlConditions.length() > 0) { hqlConditions.insert(0, " where ("); hqlConditions.append(" ) "); } List<?> list = factory.find(hql.toString() + hqlConditions.toString() + " order by UPPER(wLC.waitingListName) asc ",markers, values); if (list == null || list.size() == 0) return null; return ElectiveListConfigurationVoAssembler.createElectiveListConfigurationVoCollectionFromElectiveListConfiguration(list); }
public ElectiveListConfigurationVo getElectiveListConfiguration(ElectiveListConfigurationRefVo electiveListConfigRef) { if (electiveListConfigRef==null ||electiveListConfigRef.getID_ElectiveListConfiguration()==null) { throw new CodingRuntimeException("Cannot get ElectiveListConfigurationVo on null Id "); } DomainFactory factory = getDomainFactory(); ElectiveListConfiguration domainWaitListConfig = (ElectiveListConfiguration) factory.getDomainObject(ElectiveListConfiguration.class,electiveListConfigRef.getID_ElectiveListConfiguration()); return ElectiveListConfigurationVoAssembler.create(domainWaitListConfig); }
public void createCaseNoteRequests(PatientElectiveListRefVo patientElectiveList) { if (patientElectiveList == null || patientElectiveList.getID_PatientElectiveList() == null) return; PatientElectiveList domPatientElectiveList = (PatientElectiveList) getDomainFactory().getDomainObject(PatientElectiveList.class, patientElectiveList.getID_PatientElectiveList()); if (domPatientElectiveList.getTCIDetails() == null) return; TCIForPatientElectiveList domTciDetails = (TCIForPatientElectiveList) getDomainFactory().getDomainObject(TCIForPatientElectiveList.class, domPatientElectiveList.getTCIDetails().getId()); if (domTciDetails == null) return; PatientElectiveListTCIVo tci = PatientElectiveListTCIVoAssembler.create(domTciDetails); //WDEV-20064 ElectiveListConfiguration domElectiveListConf = domPatientElectiveList.getElectiveList(); LocationLiteVo caseNoteFolderLoc=null; if (domElectiveListConf!=null) { ElectiveListConfigurationVo electiveListConf = ElectiveListConfigurationVoAssembler.create(domElectiveListConf); caseNoteFolderLoc=getCaseNoteLocAssociatedWithHospital(electiveListConf, tci.getTCIHospital()); } if (caseNoteFolderLoc!=null && tci.getTCIDate() != null && tci.getTCITime() != null) { if (tci.getTCIDate().isGreaterThan(new Date()) || (tci.getTCIDate().equals(new Date()) && tci.getTCITime().isGreaterOrEqualThan(new Time()))) { saveAutomatedCaseNoteRequests(domPatientElectiveList.getPatient(), tci, caseNoteFolderLoc);//WDEV-20064 } } }
public ElectiveListConfigurationVoCollection getElectiveListConfigurationOnFormOpen(ServiceRefVo serviceRef, LocationRefVo locationRef, String listIdHcp) { DomainFactory factory = getDomainFactory(); StringBuffer hqlConditions = new StringBuffer(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); String andStr = ""; StringBuffer hql = new StringBuffer("select eLC from ElectiveListConfiguration as eLC left join eLC.hCPs as hcps left join hcps.hCP as hcp left join eLC.listLocations as locations left join locations.listLocation as location "); if (serviceRef!=null) { hqlConditions.append(andStr); hqlConditions.append(" eLC.service.id=:Service"); markers.add("Service"); values.add(serviceRef.getID_Service()); andStr = " and "; } if (locationRef!=null) { hqlConditions.append(andStr); hqlConditions.append("( location.id=:LocID or locations is null )"); markers.add("LocID"); values.add(locationRef.getID_Location()); andStr = " and "; } if (listIdHcp!=null && listIdHcp.length()>0) { hqlConditions.append(andStr); hqlConditions.append(" hcp.id in "+ listIdHcp +" and hcps.defaultForHCP=1"); andStr = " and "; } if (hqlConditions.length() > 0) { hqlConditions.insert(0, " where ("); hqlConditions.append(" ) "); } List<?> list = factory.find(hql.toString() + hqlConditions.toString() + " order by UPPER(eLC.waitingListName) asc ",markers, values); return ElectiveListConfigurationVoAssembler.createElectiveListConfigurationVoCollectionFromElectiveListConfiguration(list); }
public ElectiveListConfigurationVoCollection getElectiveList() { List list = getDomainFactory().find("select config from ElectiveListConfiguration as config where (config.isActive = 1) order by config.waitingListName asc "); return ElectiveListConfigurationVoAssembler.createElectiveListConfigurationVoCollectionFromElectiveListConfiguration(list); }
public ElectiveListConfigurationVoCollection getElectiveListConfigurationOnFormOpen(ServiceRefVo serviceRef, LocationRefVo locationRef, String listIdHcp) { DomainFactory factory = getDomainFactory(); StringBuffer hqlConditions = new StringBuffer(); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); String andStr = ""; StringBuffer hql = new StringBuffer("select eLC from ElectiveListConfiguration as eLC left join eLC.hCPs as hcps left join hcps.hCP as hcp left join eLC.listLocations as locations left join locations.listLocation as location "); if (serviceRef != null) { hqlConditions.append(andStr); hqlConditions.append(" eLC.service.id=:Service"); markers.add("Service"); values.add(serviceRef.getID_Service()); andStr = " and "; } if (locationRef != null) { hqlConditions.append(andStr); hqlConditions.append("( location.id=:LocID or locations is null )"); markers.add("LocID"); values.add(locationRef.getID_Location()); andStr = " and "; } if (listIdHcp != null && listIdHcp.length() > 0) { hqlConditions.append(andStr); hqlConditions.append(" hcp.id in " + listIdHcp + " and hcps.defaultForHCP=1"); andStr = " and "; } if (hqlConditions.length() > 0) { hqlConditions.insert(0, " where ("); hqlConditions.append(" ) "); } List<?> list = factory.find(hql.toString() + hqlConditions.toString() + " order by UPPER(eLC.waitingListName) asc ", markers, values); return ElectiveListConfigurationVoAssembler.createElectiveListConfigurationVoCollectionFromElectiveListConfiguration(list); }