private Boolean canBeScheduled(OrderInvestigationListVo item) { if (item == null) return false; if (item.getInvestigation() == null || item.getInvestigation().getProviderService() == null) return false; if (item.getInvestigation().getProviderService().getLocationService() == null || item.getInvestigation().getProviderService().getLocationService().getService() == null) return false; //WDEV-15487 if ( ServiceCategory.PATHOLOGY_DISCIPLINE.equals(item.getInvestigation().getProviderService().getLocationService().getService().getServiceCategory())) return false; return Boolean.TRUE.equals(item.getInvestigation().getProviderService().getLocationService().getService().getCanBeScheduled()); }
private void loadDiscipline(Category value) { form.cmbDiscipline().clear(); if (value == null) return; ServiceShortVoCollection voCollServiceShort = new ServiceShortVoCollection(); //WDEV-17122 if (form.cmbCategory().getValue().equals(Category.PATHOLOGY)) voCollServiceShort = domain.listServiceforCategoryByType(ServiceCategory.PATHOLOGY_DISCIPLINE); else if (Category.CLINICALIMAGING.equals(form.cmbCategory().getValue())) voCollServiceShort = domain.listServiceforCategoryByType(ServiceCategory.RADIOLOGY_MODALITY); else voCollServiceShort = domain.listServiceforCategoryByType(ServiceCategory.CLINICAL); for (int i = 0; i < voCollServiceShort.size(); i++) { form.cmbDiscipline().newRow(voCollServiceShort.get(i), voCollServiceShort.get(i).getServiceName()); } }
private ServiceQuestionAnswerVo createDummyServiceQuaetionAnswerVo(InvestigationOcsQuestionsVo voInvOcs) { ServiceQuestionAnswerVo voServiceQuestionAnswer = new ServiceQuestionAnswerVo(); voServiceQuestionAnswer.setService(new ServiceLiteVo()); voServiceQuestionAnswer.getService().setServiceName("No Service"); voServiceQuestionAnswer.getService().setServiceCategory(ServiceCategory.CLINICAL); voServiceQuestionAnswer.setInvestigationQuestionAnswers(new InvestigationQuestionAnswerVoCollection()); voServiceQuestionAnswer.getInvestigationQuestionAnswers().add(new InvestigationQuestionAnswerVo()); voServiceQuestionAnswer.getInvestigationQuestionAnswers().get(0).setInvestigationQuestionAnswers(new GeneralQuestionAnswerVoCollection()); voServiceQuestionAnswer.getInvestigationQuestionAnswers().get(0).setInvestigation(voInvOcs); GeneralQuestionAnswerVoCollection voGQAColl = getInvestigationQuestions(voInvOcs); for( GeneralQuestionAnswerVo voItem : voGQAColl) voServiceQuestionAnswer.getInvestigationQuestionAnswers().get(0).getInvestigationQuestionAnswers().add(voItem); return voServiceQuestionAnswer; }
public ServiceShortVoCollection listServiceforCategoryByType(ServiceCategory serviceCategory) { DomainFactory factory = getDomainFactory(); String hql = "Select serv from Service as serv where serv.serviceCategory = :serviceCategory and serv.isActive = :isActive"; List services = factory.find(hql,new String[]{"serviceCategory","isActive"},new Object[]{getDomLookup(serviceCategory),Boolean.TRUE}); return ServiceShortVoAssembler.createServiceShortVoCollectionFromService(services); }
@Override public ServiceLiteVoCollection listActiveClinicalServices(String value) { DomainFactory factory = getDomainFactory(); ArrayList<String> paramName = new ArrayList<String>(); ArrayList<Object> paramValue = new ArrayList<Object>(); StringBuilder hql = new StringBuilder("FROM Service service WHERE service.isActive = :isActive AND service.serviceCategory.id = :serviceCategoryID "); paramName.add("isActive"); paramValue.add(Boolean.TRUE); paramName.add("serviceCategoryID"); paramValue.add(ServiceCategory.CLINICAL.getID()); if(value != null) { hql.append(" and service.upperName LIKE :SERVICE_NAME"); paramName.add("SERVICE_NAME"); paramValue.add("%" + value + "%"); } return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(factory.find(hql.toString(), paramName, paramValue)); }
public ims.core.vo.ServiceLiteVoCollection getServices() { DomainFactory factory = getDomainFactory(); ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); String hql = "from Service service where service.isActive = :isActive and service.canBeScheduled = :canBeScheduled and service.serviceCategory.id != :serviceCategoryID " ; markers.add("isActive"); values.add(Boolean.TRUE); markers.add("canBeScheduled"); values.add(Boolean.TRUE); markers.add("serviceCategoryID"); values.add(ServiceCategory.RADIOLOGY_MODALITY.getID()); return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(factory.find(hql, markers, values)); }
public ServiceLiteVoCollection getServices() { DomainFactory factory = getDomainFactory(); ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); String hql = "from Service service where service.isActive = :isActive and service.canBeScheduled = :canBeScheduled and service.serviceCategory.id != :serviceCategoryID " ; markers.add("isActive"); values.add(Boolean.TRUE); markers.add("canBeScheduled"); values.add(Boolean.TRUE); markers.add("serviceCategoryID"); values.add(ServiceCategory.RADIOLOGY_MODALITY.getID()); return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService(factory.find(hql, markers, values)); }
private void loadServiceCombo() { ServiceCategoryCollection excludedColl = new ServiceCategoryCollection(); excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE); excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY); // WDEV-1913 ServiceVoCollection voCollService = domain.listService(excludedColl); form.lyrProServices().tabServices().cmbService().clear(); for (int i = 0; i < voCollService.size(); i++) form.lyrProServices().tabServices().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName()); }
public ServiceVoCollection listService(ServiceCategory serviceType) { // will be called from servicefunction when implemented in Spinal DomainFactory factory = getDomainFactory(); if (serviceType == null) return ServiceVoAssembler.createServiceVoCollectionFromService(factory.listDomainObjects(Service.class)); String hql = "from Service s where s.serviceCategory = :serviceType and s.isActive = :active"; java.util.List services = factory.find(hql, new String[]{"serviceType", "active"}, new Object[]{getDomLookup(serviceType), Boolean.TRUE}); return ServiceVoAssembler.createServiceVoCollectionFromService(services); }
public ServiceVoCollection listService(ServiceCategoryCollection excludedServices) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from Service s where s.isActive = :active"); ArrayList paramNames = new ArrayList(); ArrayList paramValues = new ArrayList(); paramNames.add("active"); paramValues.add(Boolean.TRUE); if (excludedServices != null) { int servicesSize = excludedServices.size(); for (int i = 0; i < servicesSize; i++) { if (i == 0) hql.append(" and ("); ServiceCategory serviceCategory = excludedServices.get(i); String serviceType = "serviceType" + Integer.toString(i); paramNames.add(serviceType); paramValues.add(new Integer(serviceCategory.getID())); hql.append("s.serviceCategory.id <> :" + serviceType); if (i == (servicesSize - 1)) hql.append(")"); else hql.append(" and "); } } hql.append(" order by UPPER(s.serviceName) asc "); java.util.List services = factory.find(hql.toString(), paramNames, paramValues); return ServiceVoAssembler.createServiceVoCollectionFromService(services); }
private void loadServiceCombo() { ServiceCategoryCollection excludedColl = new ServiceCategoryCollection(); excludedColl.add(ServiceCategory.PATHOLOGY_DISCIPLINE); excludedColl.add(ServiceCategory.RADIOLOGY_MODALITY); ServiceVoCollection voCollService = domain.listService(excludedColl); form.lyrSupportServices().tabPageServices().cmbService().clear(); for (int i = 0; i < voCollService.size(); i++) form.lyrSupportServices().tabPageServices().cmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName()); }
public ServiceVoCollection listService( ServiceCategoryCollection excludedServices) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("from Service s where s.isActive = :active"); ArrayList paramNames = new ArrayList(); ArrayList paramValues = new ArrayList(); paramNames.add("active"); paramValues.add(Boolean.TRUE); if (excludedServices != null) { int servicesSize = excludedServices.size(); for (int i = 0; i < servicesSize; i++) { if (i == 0) hql.append(" and ("); ServiceCategory serviceCategory = excludedServices.get(i); String serviceType = "serviceType" + Integer.toString(i); paramNames.add(serviceType); paramValues.add(new Integer(serviceCategory.getID())); hql.append("s.serviceCategory.id <> :" + serviceType); if (i == (servicesSize - 1)) hql.append(")"); else hql.append(" and "); } } //WDEV-18210 hql.append(" order by UPPER(s.serviceName) asc"); java.util.List services = factory.find(hql.toString(), paramNames, paramValues); return ServiceVoAssembler.createServiceVoCollectionFromService(services); }
private void createExternalEvent(Booking_AppointmentRefVo appointment, OrderInvestigationRefVo investigation, LookupInstVo type) throws StaleObjectException { if (null == appointment) throw new DomainRuntimeException("Appointment Cannot be NULL"); DomainFactory factory = getDomainFactory(); ExternalSystemEvent event = new ExternalSystemEvent(); // We need to deal with null investigations // when (not )sending the messages if (null != investigation) { OrderInvestigation domInv = (OrderInvestigation) factory.getDomainObject(investigation); //WDEV-5912 For Investigations marked as NoInterface there are no interface calls if(domInv.getInvestigation() != null && domInv.getInvestigation().getInvestigationIndex() != null && domInv.getInvestigation().getInvestigationIndex().isNoInterface() != null && domInv.getInvestigation().getInvestigationIndex().isNoInterface()) return; event.setInvestigation(domInv); event.setProviderSystem(domInv.getInvestigation().getProviderService().getProviderSystem()); } Booking_Appointment domBookAppt = (Booking_Appointment) factory.getDomainObject(appointment); if(type !=null //http://jira/browse/WDEV-12816 If it is not radiology then we doon't need a message &&ExternalSystemEventTypes.PATIENTARRIVING.getID()==type.getID() &&domBookAppt!=null&&domBookAppt.getSession()!=null &&domBookAppt.getSession().getService()!=null &&domBookAppt.getSession().getService().getServiceCategory()!=null &&ServiceCategory.RADIOLOGY_MODALITY.getID()!=domBookAppt.getSession().getService().getServiceCategory().getId()) { return; } event.setAppointment(domBookAppt); event.setWasProcessed(Boolean.FALSE); event.setMessageStatus(getDomLookup(OrderMessageStatus.CREATED)); event.setEventType(getDomLookup(type)); factory.save(event); }
private void searchService(String searchText) { if (form.getLocalContext().getSelectedRecordLocation().getType().equals(LocationType.PATHOLOGYLABORATORY)) populateListControl(domain.listServiceExcludeCategory(searchText, ServiceCategory.RADIOLOGY_MODALITY)); else if (form.getLocalContext().getSelectedRecordLocation().getType().equals(LocationType.CLINICALIMAGINGDEPARTMENT)) populateListControl(domain.listServiceExcludeCategory(searchText, ServiceCategory.PATHOLOGY_DISCIPLINE)); else populateListControl(domain.listServices(searchText)); }
public ims.admin.vo.ServiceForElectiveListConfigVoCollection listServices(String name) { StringBuilder hqlBuilder = new StringBuilder("select s1_1 from Service as s1_1 where s1_1.upperName like :servName and s1_1.isActive = 1 and s1_1.serviceCategory.id <> :patCategoryID "); List <?> dos = getDomainFactory().find(hqlBuilder.toString(),new String[] {"servName","patCategoryID"},new Object[] {name.toUpperCase()+"%",ServiceCategory.PATHOLOGY_DISCIPLINE.getID()}); if (dos == null || dos.size() == 0) return null; return ServiceForElectiveListConfigVoAssembler.createServiceForElectiveListConfigVoCollectionFromService(dos); }
protected void loadCmbDepartment() { ServiceLiteVoCollection coll = domain.listServices("%%%", ServiceCategory.CLINICAL); form.cmbDepartment().clear(); for (int i = 0; i < coll.size(); i++) { form.cmbDepartment().newRow(coll.get(i), coll.get(i).getServiceName()); } }
public void open() throws ims.framework.exceptions.PresentationLogicException { clearInstanceControls(); form.getLocalContext().setRecordsExist(false); //add pathology category lookup instances for OCS and associated disciplines addCategoryAndDisciplines(ServiceCategory.PATHOLOGY_DISCIPLINE); //add radiology category lookup instances for OCS and associated disciplines addCategoryAndDisciplines(ServiceCategory.RADIOLOGY_MODALITY); //add radiology category lookup instances for OCS and associated disciplines addCategoryAndDisciplines(ServiceCategory.CLINICAL); }
private void addCategoryAndDisciplines(ServiceCategory category) { if (category == null) throw new CodingRuntimeException("category is null or id not provided in method addCategoryAndDisciplines"); boolean isParentRowAdded = false; grdDisciplineRow row = null; //add disciplines for this category ServiceLiteVoCollection voCollServices = form.getLocalContext().getOCSServices(); if(voCollServices != null) { for(ServiceLiteVo voService : voCollServices) { if(voService.getServiceCategoryIsNotNull() && voService.getServiceCategory().equals(category)) { if(!isParentRowAdded) { row = form.grdDiscipline().getRows().newRow(); row.setColDiscipline(category.getText()); row.setExpanded(true); isParentRowAdded = true; } if(row != null) { grdDisciplineRow cRow = row.getRows().newRow(); cRow.setColDiscipline(voService.getServiceName()); cRow.setColServiceValue(voService); loadSecurtyLevels(cRow); } } } } }
protected void onQmbServiceTextSubmited(String value) throws PresentationLogicException { form.qmbService().clear(); ServiceCategoryCollection categories = new ServiceCategoryCollection(); categories.add(ServiceCategory.PATHOLOGY_DISCIPLINE); categories.add(ServiceCategory.RADIOLOGY_MODALITY); //WDEV-2798 - search should filter the Services having the Categories as "Pathology Discipline" and Radiology "Modality" ServiceLiteVoCollection voCollService = domain.listActiveServiceLiteByNameAndCategories(value, categories); if (voCollService != null && voCollService.size() > 0) { for (int i = 0; i < voCollService.size(); i++) { form.qmbService().newRow(voCollService.get(i), voCollService.get(i).getServiceName().toString()); } if (voCollService.size() == 1) { form.qmbService().setValue(voCollService.get(0)); open(); } else if (voCollService.size() > 1) form.qmbService().showOpened(); } else { engine.showMessage("No matching records found"); clearInstanceControls(); } }
private void loadService(LocationLiteVo value) { form.cmbService().clear(); if (value != null) { ServiceLiteVoCollection voServiceLiteVoCollection = domain.listService(value, ServiceCategory.PATHOLOGY_DISCIPLINE); for (int i = 0; voServiceLiteVoCollection != null && i < voServiceLiteVoCollection.size(); i++) { form.cmbService().newRow(voServiceLiteVoCollection.get(i), voServiceLiteVoCollection.get(i).getServiceName()); } } }
protected void loadCmbDepartment() { ServiceLiteVoCollection coll = domain.listServices("%%%", ServiceCategory.RADIOLOGY_MODALITY); form.cmbDepartment().clear(); for (int i = 0; i < coll.size(); i++) { form.cmbDepartment().newRow(coll.get(i), coll.get(i).getServiceName()); } }
private void loadService(LocationLiteVo value) { form.cmbService().clear(); if (value != null) { ServiceLiteVoCollection voServiceLiteVoCollection = domain.listService(value, ServiceCategory.RADIOLOGY_MODALITY); for (int i = 0; voServiceLiteVoCollection != null && i < voServiceLiteVoCollection.size(); i++) { form.cmbService().newRow(voServiceLiteVoCollection.get(i), voServiceLiteVoCollection.get(i).getServiceName()); } } }
public ServiceLiteVoCollection listDiscipline() { return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService( getDomainFactory().find("from Service as srv where srv.isActive = 1 and srv.serviceCategory = :category order by srv.serviceName", new String[] { "category" }, new Object[] { getDomLookup(ServiceCategory.PATHOLOGY_DISCIPLINE) })); }
private String getIdStringForPathRad() { String ids = ""; ids += ServiceCategory.PATHOLOGY_DISCIPLINE.getID(); ids += "," + ServiceCategory.RADIOLOGY_MODALITY.getID(); return ids; }
public ServiceLiteVoCollection listServices(String name, ServiceCategory type) { if(type != null) return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService( getDomainFactory().find("from Service as s1_1 where (s1_1.serviceCategory = :type and upper(s1_1.serviceName) like upper(:name)) and isActive = :active order by s1_1.serviceName asc", new String[] {"type", "name", "active"}, new Object[] {getDomLookup(type), name, Boolean.TRUE})); return ServiceLiteVoAssembler.createServiceLiteVoCollectionFromService( getDomainFactory().find("from Service as s1_1 where (upper(s1_1.serviceName) like upper(:name)) and isActive = :active order by s1_1.serviceName asc", new String[] {"name", "active"}, new Object[] {name, Boolean.TRUE})); }
private String getIdString(ServiceCategory[] categories) { if(categories == null || categories.length == 0) throw new CodingRuntimeException("no ocs categories provided in method getIdString"); String idString = ""; for(int i=0;i<categories.length;i++) { idString += categories[i].getID(); idString += ((categories.length - (i+1)) > 0 ? "," : ""); } return idString; }
private void removeAllRadiologyServices() { for (int i = 0; i < form.cmbService().getValues().size(); i++) { ServiceLiteVo voService = (ServiceLiteVo) form.cmbService() .getValues().get(i); if (voService.getServiceCategoryIsNotNull()) { if (voService.getServiceCategory().equals( ServiceCategory.RADIOLOGY_MODALITY)) form.cmbService().removeRow(voService); } } }