Java Code Examples for ims.core.vo.ServiceLiteVo

The following are top voted examples for showing how to use ims.core.vo.ServiceLiteVo. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateService(Specialty specialty)
{
	form.cmbService().clear();
	
	if (specialty == null)
		return;
	
	ServiceLiteVoCollection services = domain.getServicesBySpecialty(specialty);
	
	if (services != null)
	{
		for (ServiceLiteVo service : services)
		{
			form.cmbService().newRow(service, service.getServiceName());
		}
		
		if (services.size() == 1)
			form.cmbService().setValue(services.get(0));
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onQmbServiceTextSubmited(String value) throws PresentationLogicException
{
	form.qmbService().clear();
	
	ServiceLiteVoCollection voCollService =  domain.listActiveServiceByName(value);
	if(voCollService != null)
	{
		for(ServiceLiteVo voService : voCollService)
			form.qmbService().newRow(voService, voService.getServiceName());
		
		if(voCollService.size() == 1)
			form.qmbService().setValue(voCollService.get(0));
		else if(voCollService.size() > 1)
			form.qmbService().showOpened();
		else
			engine.showErrors(new String[] {"No matching records found"});
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines) 
{
	form.grdDisciplines().getRows().clear();
	
	if(disciplines == null)
		return;
	
	for(ServiceLiteVo dis : disciplines)
	{
		if(dis == null)
			continue;
		
		if(!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());
		
			newRow.setValue(dis);
		}
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void addDisciplineInGridDiscipline(ServiceLiteVo serviceLiteVo)
{
	if(serviceLiteVo == null)
		return;
	
	grdDisciplineRow parentRow = getParentRow(serviceLiteVo);
	
	if(parentRow == null)
		return;
	
	grdDisciplineRow newRow = parentRow.getRows().newRow();
	newRow.setValue(serviceLiteVo);
	newRow.setColumnName(serviceLiteVo.getServiceName());
	
	newRow.setColumnSelect(isDisciplineSelected(serviceLiteVo));
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean isDisciplineSelected(ServiceLiteVo serviceLiteVo) 
{
	if(serviceLiteVo == null)
		return false;
	
	if(form.getGlobalContext().OCRR.getSelectedDisciplines() == null || form.getGlobalContext().OCRR.getSelectedDisciplines().size() == 0)
		return false;
	
	for(ServiceLiteVo selected : form.getGlobalContext().OCRR.getSelectedDisciplines())
	{
		if(selected == null)
			continue;
		
		if(selected.equals(serviceLiteVo))
			return true;
	}
	
	return false;
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private ServiceLiteVoCollection getSelectedDisciplinesFromGridDiscipline()
{
	grdDisciplineRowCollection rows = form.grdDiscipline().getRows();
	
	if (rows == null || rows.size() == 0)
		return null;
	
	ServiceLiteVoCollection values = new ServiceLiteVoCollection();
	for (int i = 0; i < rows.size(); i++)
	{
		grdDisciplineRow categoryRow = rows.get(i);
		
		for(int j = 0; j<categoryRow.getRows().size(); j++)
		{
			grdDisciplineRow disciplineRow = categoryRow.getRows().get(j);
			
			if (disciplineRow.getColumnSelect() == true && disciplineRow.getValue() instanceof ServiceLiteVo)
			{
				values.add((ServiceLiteVo) disciplineRow.getValue());
			}
		}
	}
	
	return values;
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines) 
{
	form.grdDisciplines().getRows().clear();
	
	if(disciplines == null)
		return;
	
	for(ServiceLiteVo dis : disciplines)
	{
		if(dis == null)
			continue;
		
		if(!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());
		
			newRow.setValue(dis);
		}
	}
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines) 
{
	form.grdDisciplines().getRows().clear();
	
	if(disciplines == null)
		return;
	
	for(ServiceLiteVo dis : disciplines)
	{
		if(dis == null)
			continue;
		
		if(!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());
		
			newRow.setValue(dis);
		}
	}
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines) 
{
	form.grdDisciplines().getRows().clear();
	
	if(disciplines == null)
		return;
	
	for(ServiceLiteVo dis : disciplines)
	{
		if(dis == null)
			continue;
		
		if(!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());
		
			newRow.setValue(dis);
		}
	}
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines)
{
	form.grdDisciplines().getRows().clear();

	if (disciplines == null)
		return;

	for (ServiceLiteVo dis : disciplines)
	{
		if (dis == null)
			continue;

		if (!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());

			newRow.setValue(dis);
		}
	}
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines) 
{
	form.grdDisciplines().getRows().clear();
	
	if(disciplines == null)
		return;
	
	for(ServiceLiteVo dis : disciplines)
	{
		if(dis == null)
			continue;
		
		if(!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());
		
			newRow.setValue(dis);
		}
	}
}
 
Example 12
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   Source Code and License 6 votes vote down vote up
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;
	
}
 
Example 13
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   Source Code and License 6 votes vote down vote up
private GeneralQuestionAnswerVoCollection getServiceQuestions(ServiceQuestionShortVoCollection serviceConfigQuestions, ServiceLiteVo voServiceLite)
{
	GeneralQuestionAnswerVoCollection serviceQuestions = new GeneralQuestionAnswerVoCollection();
	for (int i = 0; serviceConfigQuestions != null && i < serviceConfigQuestions.size(); i++)
	{
		ServiceQuestionShortVo serviceQuestionShortVo = serviceConfigQuestions.get(i);
		boolean askedForEveryInvestigation = serviceQuestionShortVo.getAskForInvestigationsIsNotNull() && serviceQuestionShortVo.getAskForInvestigations().booleanValue();
		if(askedForEveryInvestigation == false && serviceQuestionShortVo.getService().equals(voServiceLite))
		{
			GeneralQuestionAnswerVo voGQA = createNewServiceQuestion(serviceQuestionShortVo);
			if(voGQA != null)
				serviceQuestions.add(voGQA);
		}
	}
	return serviceQuestions;
}
 
Example 14
Project: AvoinApotti   File: NewResultsSearchImpl.java   Source Code and License 6 votes vote down vote up
private String getDisciplineList(ServiceLiteVoCollection disciplines)
{
	if (disciplines == null)
		return null;

	String disciplineList = "";
	for (ServiceLiteVo dis : disciplines)
	{
		if (dis == null)
			continue;

		disciplineList += disciplineList.length() == 0 ? dis.getID_Service() : "," + dis.getID_Service();
	}

	return disciplineList;
}
 
Example 15
Project: AvoinApotti   File: PrintOrderImpl.java   Source Code and License 6 votes vote down vote up
@SuppressWarnings("rawtypes")
public ServiceLiteVo getModality(OrderInvestigationRefVo orderInv)
{
	if(orderInv == null || orderInv.getID_OrderInvestigation() == null)
		throw new CodingRuntimeException("orderInv parameter is null in method getModality");
	
	DomainFactory factory = getDomainFactory();
	String hql = "select o2_1.discipline from OrderInvestigation as o1_1 join o1_1.specimen as o2_1 where (o1_1.id = (:ID)) ";
	List list = factory.find(hql,new String[] {"ID"},new Object[] {orderInv.getID_OrderInvestigation()});

	if(list.size() > 0)
		return ServiceLiteVoAssembler.create((Service) list.get(0));
	
	//if current OrderInvestigation doesn't have a specimen we get the modality as follows:
	//OrderInvestigation.investigation.providerService.locationService.service
	hql = "select l2_1.service from OrderInvestigation as o1_1 left join o1_1.investigation as i1_1 left join i1_1.providerService as l1_1 left join l1_1.locationService as l2_1 left join l2_1.service as s1_1 where (o1_1.id = :ID)";
	list = factory.find(hql,new String[] {"ID"},new Object[] {orderInv.getID_OrderInvestigation()});

	if(list.size() > 0)
		return ServiceLiteVoAssembler.create((Service) list.get(0));
	
	return null;
}
 
Example 16
Project: AvoinApotti   File: PhelbotomyDefaultCollectorImpl.java   Source Code and License 6 votes vote down vote up
public ServiceLiteVo getModality(Integer orderInvId)
{
	if(orderInvId == null)
		throw new CodingRuntimeException("orderInv parameter is null in method getModality");
	
	DomainFactory factory = getDomainFactory();
	String hql = "select o2_1.discipline from OrderInvestigation as o1_1 join o1_1.specimen as o2_1 where (o1_1.id = (:ID)) ";
	List list = factory.find(hql,new String[] {"ID"},new Object[] {orderInvId});

	if(list.size() > 0)
		return ServiceLiteVoAssembler.create((Service) list.get(0));
	
	//if current OrderInvestigation doesn't have a specimen we get the modality as follows:
	//OrderInvestigation.investigation.providerService.locationService.service
	hql = "select l2_1.service from OrderInvestigation as o1_1 left join o1_1.investigation as i1_1 left join i1_1.providerService as l1_1 left join l1_1.locationService as l2_1 left join l2_1.service as s1_1 where (o1_1.id = :ID)";
	list = factory.find(hql,new String[] {"ID"},new Object[] {orderInvId});

	if(list.size() > 0)
		return ServiceLiteVoAssembler.create((Service) list.get(0));
	
	return null;
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateElectiveListConfigGrid(ServiceLiteVo serviceLite, LocationLiteVo locationLite, String listIdHcp)
{
	
	ElectiveListConfigurationLiteVoCollection collElectiveListConfiguration=null;
	
	collElectiveListConfiguration = domain.listElectiveListConfiguration(serviceLite,locationLite , listIdHcp, null);
	
	if (collElectiveListConfiguration!=null && collElectiveListConfiguration.size()>0)
	{
		addRowsToGrdElectiveListConfig(collElectiveListConfiguration);
	}
	else
	{
		collElectiveListConfiguration = domain.listOtherElectiveListConfiguration(serviceLite,serviceLite!=null ? serviceLite.getSpecialty() : null,listIdHcp, null);
		addRowsToGrdElectiveListConfig(collElectiveListConfiguration);
	}
	
	
	
}
 
Example 18
Project: AvoinApotti   File: ReferralAppointmentDetailsComponentImpl.java   Source Code and License 6 votes vote down vote up
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
	if (appt == null || appt.getID_Booking_Appointment() == null)
		throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");
	
	TheatreProcedureServiceAndConsultantLiteVo voPsc = null;
	
	Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(appt);
	if(doAppt != null)
	{
		ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
		ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
		HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);
		
		voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
		voPsc.setService(voService);
		voPsc.setProcedure(voProc);
		voPsc.setConsultant(voMos);
	}
	
	return voPsc;
}
 
Example 19
Project: AvoinApotti   File: ElectiveListManagementImpl.java   Source Code and License 6 votes vote down vote up
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo voAppt)
{
	if (voAppt == null || voAppt.getID_Booking_Appointment() == null)
		throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");
	
	TheatreProcedureServiceAndConsultantLiteVo voPsc = null;
	
	Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(voAppt);
	if(doAppt != null)
	{
		ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
		ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
		HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);
		
		voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
		voPsc.setService(voService);
		voPsc.setProcedure(voProc);
		voPsc.setConsultant(voMos);
	}
	
	return voPsc;
}
 
Example 20
Project: AvoinApotti   File: TheatreListImpl.java   Source Code and License 6 votes vote down vote up
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
	if (appt == null || appt.getID_Booking_Appointment() == null)
		throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");

	TheatreProcedureServiceAndConsultantLiteVo voPsc = null;

	Booking_Appointment doAppt = (Booking_Appointment) getDomainFactory().getDomainObject(appt);
	if (doAppt != null)
	{
		ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
		ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
		HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);

		voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
		voPsc.setService(voService);
		voPsc.setProcedure(voProc);
		voPsc.setConsultant(voMos);
	}

	return voPsc;
}
 
Example 21
Project: openMAXIMS   File: ElectiveListManagementImpl.java   Source Code and License 6 votes vote down vote up
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo voAppt)
{
	if (voAppt == null || voAppt.getID_Booking_Appointment() == null)
		throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");
	
	TheatreProcedureServiceAndConsultantLiteVo voPsc = null;
	
	Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(voAppt);
	if(doAppt != null)
	{
		ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
		ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
		HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);
		
		voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
		voPsc.setService(voService);
		voPsc.setProcedure(voProc);
		voPsc.setConsultant(voMos);
	}
	
	return voPsc;
}
 
Example 22
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean checkIfParentAlreadyExistsinDynGrid(ServiceLiteVo parent) //WDEV-20181
{
	if(parent == null )
		return false;
	
	for (int i = 0; i < form.ctnDetails().lyrDetails().tabPage2().dyngrdService().getRows().size(); i++)
	{
		Object obj = form.ctnDetails().lyrDetails().tabPage2().dyngrdService().getRows().get(i).getValue();
		if ((obj != null) && (obj instanceof ServiceLiteVo))
		{
			ServiceLiteVo serviceVo = (ServiceLiteVo) obj;
			if ((serviceVo.getID_ServiceIsNotNull()) && (serviceVo.getID_Service().equals(parent.getID_Service())))
			{
				return true;
			}
		}
	}

	return false;
	
}
 
Example 23
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private CareSpellRepatriationVo createCareSpell(PatientRefVo patient, PasEventRepatriationVo pasEvent, DateTime startDateTime, HcpLiteVo hcp, LocationRefVo location, ServiceLiteVo service, SourceOfReferral sourceOfReferral)
{
	CareSpellRepatriationVo careSpell = new CareSpellRepatriationVo();

	careSpell.setPatient(patient);
	careSpell.setStartDate(startDateTime.getDate());
	careSpell.setEndDate(null);

	CareSpellStatusHistoryVo firstStatus = new CareSpellStatusHistoryVo();
	firstStatus.setStatus(ProblemGroupStatus.OPEN);
	firstStatus.setStatusDateTime(startDateTime);
	
	careSpell.setCurrentStatus(firstStatus);
	careSpell.setStatusHistory(new CareSpellStatusHistoryVoCollection());
	careSpell.getStatusHistory().add(firstStatus);
	
	careSpell.setEpisodes(new EpisodeOfCareRepatriationVoCollection());
	careSpell.getEpisodes().add(createEpisodeOfCare(patient, careSpell, pasEvent, startDateTime, hcp, location, service, sourceOfReferral));

	return careSpell;
}
 
Example 24
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private EpisodeOfCareRepatriationVo createEpisodeOfCare(PatientRefVo patient, CareSpellRefVo careSpell, PasEventRepatriationVo pasEvent, DateTime startDateTime, HcpLiteVo hcp, LocationRefVo location, ServiceLiteVo service, SourceOfReferral sourceOfReferral)
{
	EpisodeOfCareRepatriationVo episodeOfCare = new EpisodeOfCareRepatriationVo();
	
	episodeOfCare.setCareSpell(careSpell);
	episodeOfCare.setResponsibleHCP(hcp);		
	episodeOfCare.setSpecialty(service != null ? service.getSpecialty() : null);
	episodeOfCare.setRelationship(CareSpelltoEpisodeRelationship.PRIMARY);
	episodeOfCare.setStartDate(startDateTime.getDate());
	episodeOfCare.setEndDate(null);
	
	EpisodeOfCareStatusHistoryVo firstStatus = new EpisodeOfCareStatusHistoryVo();
	firstStatus.setStatus(EpisodeOfCareStatus.OPEN);
	firstStatus.setStatusDateTime(startDateTime);
	
	episodeOfCare.setCurrentStatus(firstStatus);
	episodeOfCare.setStatusHistory(new EpisodeOfCareStatusHistoryVoCollection());
	episodeOfCare.getStatusHistory().add(firstStatus);
	
	episodeOfCare.setCareContexts(new CareContextRepatriationVoCollection());
	episodeOfCare.getCareContexts().add(createCareContext(patient, episodeOfCare, pasEvent, startDateTime, hcp, location, service, sourceOfReferral));
	
	return episodeOfCare;
}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private CareContextRepatriationVo createCareContext(PatientRefVo patient, EpisodeOfCareRefVo episodeOfCare, PasEventRepatriationVo pasEvent, DateTime startDateTime, HcpLiteVo hcp, LocationRefVo location, ServiceLiteVo service, SourceOfReferral sourceOfReferral)
{
	CareContextRepatriationVo careContext = new CareContextRepatriationVo();
	
	careContext.setPasEvent(pasEvent);
	careContext.setContext(ContextType.REFERRAL);
	careContext.setEpisodeOfCare(episodeOfCare);
	careContext.setStartDateTime(startDateTime);
	careContext.setEndDateTime(null);
	careContext.setResponsibleHCP(hcp);
	
	CareContextStatusHistoryVo firstStatus = new CareContextStatusHistoryVo();
	firstStatus.setStatus(CareContextStatus.OPEN);
	firstStatus.setStatusDateTime(startDateTime);
	
	careContext.setCurrentStatus(firstStatus);
	careContext.setStatusHistory(new CareContextStatusHistoryVoCollection());
	careContext.getStatusHistory().add(firstStatus);
	
	return careContext;
}
 
Example 26
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines) 
{
	form.grdDisciplines().getRows().clear();
	
	if(disciplines == null)
		return;
	
	for(ServiceLiteVo dis : disciplines)
	{
		if(dis == null)
			continue;
		
		if(!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());
		
			newRow.setValue(dis);
		}
	}
}
 
Example 27
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean isARequestForServiceAlreadyAddedWithSameServiceAndUrgency(ServiceLiteVo service, ReferralUrgency urgency, LinkedCatsReferralForOutcomeVo currentRecord)
{
	LinkedCatsReferralForOutcomeVoCollection collRequestsForServices =  domain.listLinkedReferral(form.getLocalContext().getParentCatsReferral(), form.getLocalContext().getAppointmentOutcome(), ReferralRelationType.REQUEST_FOR_SERVICE);
	
	for (int i=0;i<form.grdReqForService().getRows().size(); i++)
	{
		collRequestsForServices.add(form.grdReqForService().getRows().get(i).getValue());
	}
	
	if (collRequestsForServices==null || collRequestsForServices.size()==0)
		return false;
	
	if (currentRecord != null && collRequestsForServices.indexOf(currentRecord) != -1)
		collRequestsForServices.remove(collRequestsForServices.indexOf(currentRecord));
	
	for (int i=0;i<collRequestsForServices.size();i++)
	{
		LinkedCatsReferralForOutcomeVo reqForService = collRequestsForServices.get(i);
		if (reqForService!=null && reqForService.getReferralIsNotNull() && urgency!=null && service!=null  && reqForService.getReferral().getReferralDetailsIsNotNull() && service.equals(reqForService.getReferral().getReferralDetails().getService()) && urgency.equals(reqForService.getReferral().getUrgency()))
		{
			return true;
		}
	}
	
	return false;
}
 
Example 28
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateServices(ServiceLiteVoCollection services)
{
	form.qmbService().clear();
	
	if (services == null)
		return;
	
	for (ServiceLiteVo service : services)
	{
		form.qmbService().newRow(service, service.getServiceName());
	}
	
	if (services.size() == 1)
		form.qmbService().setValue(services.get(0));
	else
		form.qmbService().showOpened();
}
 
Example 29
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateServices(ServiceLiteVoCollection services)
{
	form.qmbService().clear();
	
	if (services == null)
		return;
	
	for (ServiceLiteVo service : services)
	{
		form.qmbService().newRow(service, service.getServiceName());
	}
	
	if (services.size() == 1)
		form.qmbService().setValue(services.get(0));
	else
		form.qmbService().showOpened();
}
 
Example 30
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateServices(String value)
{
	form.qmbService().clear();
	if (value == null)
		return; 
	
	ServiceLiteVoCollection services =  domain.listServices(value);
	if (services == null)
	{	
		form.qmbService().showOpened();
		return;
	}	
	for (ServiceLiteVo serv: services)
	{
		form.qmbService().newRow(serv, serv.getServiceName());			
	}
	if (services.size() == 1)
	{	
		form.qmbService().setValue(services.get(0));
		serviceValueChanged();
	}	
	else
		form.qmbService().showOpened();
	
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void serviceValueChanged()
{
	form.cmbSpecialty().clear();
	ServiceLiteVo selectedService = form.qmbService().getValue() ;
	if (selectedService != null && selectedService.getSpecialtyIsNotNull())
	{
		form.cmbSpecialty().newRow(selectedService.getSpecialty(), selectedService.getSpecialty().getText());
		form.cmbSpecialty().setValue(selectedService.getSpecialty());
	}
	form.ccConsultant().clear();		
	if (form.qmbService().getValue() != null)
	{				
		form.ccConsultant().initializeResponsibleHcp(MosType.MEDIC, null, form.qmbService().getValue(), null);
	}
	else
	{
		form.ccConsultant().initialize(MosType.MEDIC);
	}
}
 
Example 32
Project: openMAXIMS   File: AcuteTheatreListImpl.java   Source Code and License 6 votes vote down vote up
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt)
{
	if (appt == null || appt.getID_Booking_Appointment() == null)
		throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");
	
	TheatreProcedureServiceAndConsultantLiteVo voPsc = null;
	
	Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(appt);
	if(doAppt != null)
	{
		ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
		ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
		HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);
		
		voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
		voPsc.setService(voService);
		voPsc.setProcedure(voProc);
		voPsc.setConsultant(voMos);
	}
	
	return voPsc;
}
 
Example 33
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateServices(ServiceLiteVoCollection listServices)
{
	form.qmbService().clear();
	
	if (listServices == null)
	{
		form.qmbService().showOpened();
		return;
	}
	for (ServiceLiteVo service : listServices)
	{
		form.qmbService().newRow(service, service.getServiceName());
	}
	if (listServices.size() == 1)
	{	
		form.qmbService().setValue(listServices.get(0));
		serviceValueChanged();
	}
	else
	{
		form.qmbService().showOpened();
	}
}
 
Example 34
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateElectiveListConfigGrid(ServiceLiteVo serviceLite, LocationForTheatreSessionVo locationLite, String listIdHcp)
{
	
	ElectiveListConfigurationLiteVoCollection collElectiveListConfiguration=null;
	
	collElectiveListConfiguration = domain.listElectiveListConfiguration(serviceLite,locationLite , listIdHcp, null);
	
	if (collElectiveListConfiguration!=null && collElectiveListConfiguration.size()>0)
	{
		addRowsToGrdElectiveListConfig(collElectiveListConfiguration);
	}
	else
	{
		collElectiveListConfiguration = domain.listOtherElectiveListConfiguration(serviceLite,serviceLite!=null ? serviceLite.getSpecialty() : null,listIdHcp, null, null);
		addRowsToGrdElectiveListConfig(collElectiveListConfiguration);
	}
	
	
	
}
 
Example 35
Project: openMAXIMS   File: NewResultsSearchImpl.java   Source Code and License 6 votes vote down vote up
private String getDisciplineList(ServiceLiteVoCollection disciplines)
{
	if (disciplines == null)
		return null;

	String disciplineList = "";
	for (ServiceLiteVo dis : disciplines)
	{
		if (dis == null)
			continue;

		disciplineList += disciplineList.length() == 0 ? dis.getID_Service() : "," + dis.getID_Service();
	}

	return disciplineList;
}
 
Example 36
Project: openMAXIMS   File: ElectiveListManagementImpl.java   Source Code and License 6 votes vote down vote up
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo voAppt)
{
	if (voAppt == null || voAppt.getID_Booking_Appointment() == null)
		throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant");
	
	TheatreProcedureServiceAndConsultantLiteVo voPsc = null;
	
	Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(voAppt);
	if(doAppt != null)
	{
		ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null);
		ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null);
		HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null);
		
		voPsc = new TheatreProcedureServiceAndConsultantLiteVo();
		voPsc.setService(voService);
		voPsc.setProcedure(voProc);
		voPsc.setConsultant(voMos);
	}
	
	return voPsc;
}
 
Example 37
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onBtnLinkedAppointmentsClick() throws PresentationLogicException
{
	
	form.getGlobalContext().Scheduling.setLinkedOPA(form.getLocalContext().getSelectedFutureAppointment());
	ServiceAndFunctionForFutureApptsVo serviceAndFunction = form.getLocalContext().getServiceAndFunctionForAppt();
	
	ServiceLiteVo service = serviceAndFunction != null ? serviceAndFunction.getService() : null;
	ServiceFunction function = serviceAndFunction != null && serviceAndFunction.getFunction() != null ? serviceAndFunction.getFunction().getFunction() : null;
	
	Integer numberOfLinkedAppts = 0;
	
	if (GroupNoLinkedApptsEnumeration.rdo2.equals(form.lyrTabs().tabLinkedOpa().GroupNoLinkedAppts().getValue()))
		numberOfLinkedAppts = 2;
	else if (GroupNoLinkedApptsEnumeration.rdo3.equals(form.lyrTabs().tabLinkedOpa().GroupNoLinkedAppts().getValue()))
		numberOfLinkedAppts = 3;
	
	engine.open(form.getForms().Scheduling.LinkedAppointmentDetails, new Object[] {numberOfLinkedAppts, service , function , form.getMode() , Boolean.TRUE});
	
}
 
Example 38
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkNamedConsultantValueChanged() throws PresentationLogicException
{
	uncheckToSeeForOPA(form.lyrTabs().tabOPA().chkNamedConsultant());
	
	ServiceLiteVo service  = form.lyrTabs().tabOPA().cmbService().getValue();
	
	if(form.lyrTabs().tabOPA().chkNamedConsultant().getValue())
	{
		if(form.getLocalContext().getLoggedHCP() != null && service != null)
		{
			if(Boolean.TRUE.equals(domain.checkIfUserIsResponsibleHcpAndLinkedWithService(form.getLocalContext().getLoggedHCP(), service)))
			{
				form.lyrTabs().tabOPA().ccNamedConsultant().setValue(form.getLocalContext().getLoggedHCP());
			}
		}
	}
	else
	{
		form.lyrTabs().tabOPA().ccNamedConsultant().clear();
	}
}
 
Example 39
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onRadioButtonGroupSameDayValueChanged() throws PresentationLogicException
{
	ServiceLiteVo originalService = null;
	ServiceFunction originalFunction = null;
	if(form.GroupSameService().getValue().equals(GroupSameServiceEnumeration.rdoYes))
	{
		originalService = form.getLocalContext().getOriginalService();
		originalFunction = form.getLocalContext().getOriginalFunction();
	}
	
	form.cc1().initialise(form.getGlobalContext().RefMan.getCatsReferral(), true, 1, form.getLocalContext().getOriginalService(), originalFunction, getOtherDayValue(), form.getLocalContext().getCABApptDate(), false, GroupSameServiceEnumeration.rdoYes.equals(form.GroupSameService().getValue()) ? false : true);
	form.cc2().initialise(form.getGlobalContext().RefMan.getCatsReferral(), true, 2, originalService, originalFunction, getOtherDayValue(), form.getLocalContext().getCABApptDate(), false, GroupSameServiceEnumeration.rdoYes.equals(form.GroupSameService().getValue()) ? false : true);
	form.cc3().initialise(form.getGlobalContext().RefMan.getCatsReferral(), true, 3, originalService, originalFunction, getOtherDayValue(), form.getLocalContext().getCABApptDate(), false, GroupSameServiceEnumeration.rdoYes.equals(form.GroupSameService().getValue()) ? false : true);
	
	updateControlsState();
}
 
Example 40
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines)
{
	form.grdDisciplines().getRows().clear();

	if (disciplines == null)
		return;

	for (ServiceLiteVo dis : disciplines)
	{
		if (dis == null)
			continue;

		if (!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());

			newRow.setValue(dis);
		}
	}
}
 
Example 41
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean isDisciplineSelected(ServiceLiteVo serviceLiteVo) 
{
	if(serviceLiteVo == null)
		return false;
	
	if(form.getGlobalContext().OCRR.getSelectedDisciplines() == null || form.getGlobalContext().OCRR.getSelectedDisciplines().size() == 0)
		return false;
	
	for(ServiceLiteVo selected : form.getGlobalContext().OCRR.getSelectedDisciplines())
	{
		if(selected == null)
			continue;
		
		if(selected.equals(serviceLiteVo))
			return true;
	}
	
	return false;
}
 
Example 42
Project: openMAXIMS   File: PhelbotomyDefaultCollectorImpl.java   Source Code and License 6 votes vote down vote up
public ServiceLiteVo getModality(Integer orderInvId)
{
	if(orderInvId == null)
		throw new CodingRuntimeException("orderInv parameter is null in method getModality");
	
	DomainFactory factory = getDomainFactory();
	String hql = "select o2_1.discipline from OrderInvestigation as o1_1 join o1_1.specimen as o2_1 where (o1_1.id = (:ID)) ";
	List list = factory.find(hql,new String[] {"ID"},new Object[] {orderInvId});

	if(list.size() > 0)
		return ServiceLiteVoAssembler.create((Service) list.get(0));
	
	//if current OrderInvestigation doesn't have a specimen we get the modality as follows:
	//OrderInvestigation.investigation.providerService.locationService.service
	hql = "select l2_1.service from OrderInvestigation as o1_1 left join o1_1.investigation as i1_1 left join i1_1.providerService as l1_1 left join l1_1.locationService as l2_1 left join l2_1.service as s1_1 where (o1_1.id = :ID)";
	list = factory.find(hql,new String[] {"ID"},new Object[] {orderInvId});

	if(list.size() > 0)
		return ServiceLiteVoAssembler.create((Service) list.get(0));
	
	return null;
}
 
Example 43
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateElectiveListConfigGrid(ServiceLiteVo serviceLite, LocationLiteVo locationLite, String listIdHcp)
{
	
	ElectiveListConfigurationLiteVoCollection collElectiveListConfiguration=null;
	
	collElectiveListConfiguration = domain.listElectiveListConfiguration(serviceLite,locationLite , listIdHcp, null);
	
	if (collElectiveListConfiguration!=null && collElectiveListConfiguration.size()>0)
	{
		addRowsToGrdElectiveListConfig(collElectiveListConfiguration);
	}
	else
	{
		collElectiveListConfiguration = domain.listOtherElectiveListConfiguration(serviceLite,serviceLite!=null ? serviceLite.getSpecialty() : null,listIdHcp, null);
		addRowsToGrdElectiveListConfig(collElectiveListConfiguration);
	}
	
	
	
}
 
Example 44
Project: openmaxims-linux   File: MyOrderQuestionsPopulation.java   Source Code and License 6 votes vote down vote up
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;
	
}
 
Example 45
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines) 
{
	form.grdDisciplines().getRows().clear();
	
	if(disciplines == null)
		return;
	
	for(ServiceLiteVo dis : disciplines)
	{
		if(dis == null)
			continue;
		
		if(!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());
		
			newRow.setValue(dis);
		}
	}
}
 
Example 46
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines) 
{
	form.grdDisciplines().getRows().clear();
	
	if(disciplines == null)
		return;
	
	for(ServiceLiteVo dis : disciplines)
	{
		if(dis == null)
			continue;
		
		if(!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());
		
			newRow.setValue(dis);
		}
	}
}
 
Example 47
Project: openMAXIMS   File: CatsReferralRequestServiceDlgImpl.java   Source Code and License 6 votes vote down vote up
public ServiceLiteVo getServiceForReferral(CatsReferralRefVo referral)
{
	if (referral == null || referral.getID_CatsReferral() == null)
		return null;
	
	StringBuilder query = new StringBuilder("SELECT service FROM CatsReferral AS referral ");
	query.append(" LEFT JOIN referral.referralDetails AS referralDetails ");
	query.append(" LEFT JOIN referralDetails.service AS service ");
	
	query.append(" WHERE ");
	
	ArrayList<String> paramNames = new ArrayList<String>();
	ArrayList<Object> paramValues = new ArrayList<Object>();
	
	query.append(" referral.id = :REFERRAL_ID ");
	
	paramNames.add("REFERRAL_ID");
	paramValues.add(referral.getID_CatsReferral());
	
	return ServiceLiteVoAssembler.create((Service) getDomainFactory().findFirst(query.toString(), paramNames, paramValues));
}
 
Example 48
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines) 
{
	form.grdDisciplines().getRows().clear();
	
	if(disciplines == null)
		return;
	
	for(ServiceLiteVo dis : disciplines)
	{
		if(dis == null)
			continue;
		
		if(!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());
		
			newRow.setValue(dis);
		}
	}
}
 
Example 49
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void addDisciplineInGridDiscipline(ServiceLiteVo serviceLiteVo)
{
	if(serviceLiteVo == null)
		return;
	
	grdDisciplineRow parentRow = getParentRow(serviceLiteVo);
	
	if(parentRow == null)
		return;
	
	grdDisciplineRow newRow = parentRow.getRows().newRow();
	newRow.setValue(serviceLiteVo);
	newRow.setColumnName(serviceLiteVo.getServiceName());
	
	newRow.setColumnSelect(isDisciplineSelected(serviceLiteVo));
}
 
Example 50
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateServices(ServiceLiteVoCollection services)
{
	form.qmbService().clear();
	
	if (services == null)
		return;
	
	for (ServiceLiteVo service : services)
	{
		form.qmbService().newRow(service, service.getServiceName());
	}
	
	if (services.size() == 1)
	{
		form.qmbService().setValue(services.get(0));
	}
	else
	{
		form.qmbService().showOpened();
	}
	
}
 
Example 51
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void addDisciplineInGridDiscipline(ServiceLiteVo serviceLiteVo)
{
	if(serviceLiteVo == null)
		return;
	
	grdDisciplineRow parentRow = getParentRow(serviceLiteVo);
	
	if(parentRow == null)
		return;
	
	grdDisciplineRow newRow = parentRow.getRows().newRow();
	newRow.setValue(serviceLiteVo);
	newRow.setColumnName(serviceLiteVo.getServiceName());
	
	newRow.setColumnSelect(isDisciplineSelected(serviceLiteVo));
}
 
Example 52
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean isDisciplineSelected(ServiceLiteVo serviceLiteVo) 
{
	if(serviceLiteVo == null)
		return false;
	
	if(form.getGlobalContext().OCRR.getSelectedDisciplines() == null || form.getGlobalContext().OCRR.getSelectedDisciplines().size() == 0)
		return false;
	
	for(ServiceLiteVo selected : form.getGlobalContext().OCRR.getSelectedDisciplines())
	{
		if(selected == null)
			continue;
		
		if(selected.equals(serviceLiteVo))
			return true;
	}
	
	return false;
}
 
Example 53
Project: openmaxims-linux   File: NewResultsSearchImpl.java   Source Code and License 6 votes vote down vote up
private String getDisciplineList(ServiceLiteVoCollection disciplines)
{
	if (disciplines == null)
		return null;

	String disciplineList = "";
	for (ServiceLiteVo dis : disciplines)
	{
		if (dis == null)
			continue;

		disciplineList += disciplineList.length() == 0 ? dis.getID_Service() : "," + dis.getID_Service();
	}

	return disciplineList;
}
 
Example 54
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines) 
{
	form.grdDisciplines().getRows().clear();
	
	if(disciplines == null)
		return;
	
	for(ServiceLiteVo dis : disciplines)
	{
		if(dis == null)
			continue;
		
		if(!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());
		
			newRow.setValue(dis);
		}
	}
}
 
Example 55
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines) 
{
	form.grdDisciplines().getRows().clear();
	
	if(disciplines == null)
		return;
	
	for(ServiceLiteVo dis : disciplines)
	{
		if(dis == null)
			continue;
		
		if(!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());
		
			newRow.setValue(dis);
		}
	}
}
 
Example 56
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void addDisciplineInGridDiscipline(ServiceLiteVo serviceLiteVo)
{
	if(serviceLiteVo == null)
		return;
	
	grdDisciplineRow parentRow = getParentRow(serviceLiteVo);
	
	if(parentRow == null)
		return;
	
	grdDisciplineRow newRow = parentRow.getRows().newRow();
	newRow.setValue(serviceLiteVo);
	newRow.setColumnName(serviceLiteVo.getServiceName());
	
	newRow.setColumnSelect(isDisciplineSelected(serviceLiteVo));
}
 
Example 57
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines)
{
	form.grdDisciplines().getRows().clear();

	if (disciplines == null)
		return;

	for (ServiceLiteVo dis : disciplines)
	{
		if (dis == null)
			continue;

		if (!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());

			newRow.setValue(dis);
		}
	}
}
 
Example 58
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateDisciplineGrid(ServiceLiteVoCollection disciplines) 
{
	form.grdDisciplines().getRows().clear();
	
	if(disciplines == null)
		return;
	
	for(ServiceLiteVo dis : disciplines)
	{
		if(dis == null)
			continue;
		
		if(!disciplineIsAdded(dis))
		{
			grdDisciplinesRow newRow = form.grdDisciplines().getRows().newRow();
			newRow.setColDis(dis.getServiceName());
		
			newRow.setValue(dis);
		}
	}
}
 
Example 59
Project: openmaxims-linux   File: MyOrderQuestionsPopulation.java   Source Code and License 6 votes vote down vote up
private GeneralQuestionAnswerVoCollection getServiceQuestions(ServiceQuestionShortVoCollection serviceConfigQuestions, ServiceLiteVo voServiceLite)
{
	GeneralQuestionAnswerVoCollection serviceQuestions = new GeneralQuestionAnswerVoCollection();
	for (int i = 0; serviceConfigQuestions != null && i < serviceConfigQuestions.size(); i++)
	{
		ServiceQuestionShortVo serviceQuestionShortVo = serviceConfigQuestions.get(i);
		boolean askedForEveryInvestigation = serviceQuestionShortVo.getAskForInvestigationsIsNotNull() && serviceQuestionShortVo.getAskForInvestigations().booleanValue();
		if(askedForEveryInvestigation == false && serviceQuestionShortVo.getService().equals(voServiceLite))
		{
			GeneralQuestionAnswerVo voGQA = createNewServiceQuestion(serviceQuestionShortVo);
			if(voGQA != null)
				serviceQuestions.add(voGQA);
		}
	}
	return serviceQuestions;
}
 
Example 60
Project: openMAXIMS   File: MyOrderQuestionsPopulation.java   Source Code and License 6 votes vote down vote up
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;
	
}