Java Code Examples for ims.core.resource.place.vo.LocationRefVoCollection

The following are top voted examples for showing how to use ims.core.resource.place.vo.LocationRefVoCollection. 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: SelectandOrderImpl.java   Source Code and License 4 votes vote down vote up
public SelectedComponentFromSelectOrderVoCollection listInvestigationsOrProfiles(Category category, String name, LocationLiteVo location, ServiceShortVo service, Boolean isProfile, Boolean beginsWith, RoleDisciplineSecurityLevelLiteGCVo roleDiscliplineeSecurityLevels, LocationRefVoCollection locationList) 
{		
	SelectedComponentFromSelectOrderVoCollection listResults = new SelectedComponentFromSelectOrderVoCollection();
	
	ItemSelection impl = (ItemSelection)getDomainImpl(ItemSelectionImpl.class);
	if(impl != null)
	{
		//WDEV-10065 - pass param here for contract
		InvestShortVoCollection results = impl.listInvestigationsOrProfiles(category, name, location, service, isProfile, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, beginsWith, locationList);
		if(results == null)
			return listResults;
		
		for(int x = 0; x < results.size(); x++)
		{
			InvestShortVo result = results.get(x);
			
			//WDEV-9780 checkSecurityLevel - if doesn't pass continue in loop
			if(roleDiscliplineeSecurityLevels != null)
			{
				ServiceRefVo voInvService = result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull() ? result.getProviderService().getLocationService().getService() : null;
				SecurityLevelConfigVo voInvSecurityLevel = result.getInvestigationIndexIsNotNull() ? result.getInvestigationIndex().getSecurityLevel() : null;

				if(!roleDiscliplineeSecurityLevels.doesInvPassSecurityCheck(voInvService, voInvSecurityLevel,true)) //WDEV-11622
					continue;
			}

			if(result != null && result.getID_InvestigationIsNotNull() && result.getInvestigationIndexIsNotNull())
			{
				SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
				component.setID(result.getID_Investigation());
				component.setCategory(result.getInvestigationIndex().getCategory());
				component.setText(result.getInvestigationIndex().getName());
				component.setAdditionalLocationInfo(result.getLocationInfo());
				//component.setTooltip(result.getInvestigationIndex().getDescription());
				component.setHelpText(result.buildHelpTextTooltip());
				component.setIsAddon(result.getIsAddon());
				if(result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull())
					component.setServiceID(result.getProviderService().getLocationService().getService().getID_Service());
				
				component.setMinReOrderPeriod(result.getMinReorderPeriodUnit());
				component.setMinReOrderVal(result.getMinReorderPeriodVal());
				component.setMinReOrderFemalePeriod(result.getFemaleMinReorderPeriodUnit());
				component.setMinReOrderFemaleVal(result.getFemaleMinReorderPeriodVal());
				
				component.setRequiresSite(result.getInvestigationIndex().getRequiresSiteSpecifier());
				component.setGenderSpecific(result.getInvestigationIndex().getGenderSpecific());
				component.setPhlebMayCollect(result.getInvestigationIndex().getPhlebMayCollect());

				component.setTooltip(getComponentInvestigationTooltip(result));

				SelectAndOrderComponentType type = SelectAndOrderComponentType.INVESTIGATION;
				if(result.getInvestigationIndex().getIsProfileIsNotNull() && result.getInvestigationIndex().getIsProfile().booleanValue())
					type = SelectAndOrderComponentType.PROFILE;
				component.setComponentType(type);
				
				if(SelectAndOrderComponentType.PROFILE.equals(type))//WDEV-16624
				{
					component.setAssociatedInvestigations(result.getAssocInvestigations());
				}
				
				listResults.add(component);
			}
		}
	}
	
	return listResults;
}
 
Example 2
Project: AvoinApotti   File: BookAppointmentImpl.java   Source Code and License 4 votes vote down vote up
/**
 * getCurrentMonth
 */
public ims.framework.utils.Date getCurrentMonth(ims.core.vo.ActivityVo activity, ims.core.clinical.vo.ServiceRefVo service, ims.core.resource.place.vo.LocationRefVo location, ServiceFunctionRefVo clinicType, LocationRefVoCollection locationList)
{
	if (activity == null)
		throw new DomainRuntimeException("Not all mandatory search params set in method listGenericSession");

	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Serializable> values = new ArrayList<Serializable>();

	String serviceCriteria = "";
	String locationCriteria = "";
	String clinicTypeCriteria = "";
	String clinicTypeJoin = "";

	markers.add("activityId");
	markers.add("open");
	markers.add("today");

	values.add(activity.getID_Activity());
	values.add(getDomLookup(Session_Status_and_Reason.OPEN));
	values.add(new Date().getDate());

	if (service != null)
	{
		markers.add("idService");
		values.add(service.getID_Service());
		serviceCriteria = " and session.service.id = :idService";
	}
	if (location != null)
	{
		markers.add("idLocation");
		values.add(location.getID_Location());
		locationCriteria = " and session.schLocation.id = :idLocation";
	}
	else if(locationList != null)
	{
		List<String> locationIds = new ArrayList<String>();
		for(LocationRefVo voRef : locationList)
			locationIds.add(voRef.getID_Location().toString());
	
		locationCriteria = " and session.schLocation.id in (" + getIdString(locationIds) + ")";
	}
	if (clinicType != null)
	{
		markers.add("idClinicType");
		values.add(clinicType.getID_ServiceFunction());
		clinicTypeJoin = " join slot.functions as func ";
		clinicTypeCriteria = " and func.id = :idClinicType ";
	}

	DomainFactory factory = getDomainFactory();

	List date = factory.find(" Select min (session.sessionDate) from Sch_Session as session " + " left join session.sessionSlots as slot " + clinicTypeJoin + " where ( slot.activity.id = :activityId) " + serviceCriteria + locationCriteria + clinicTypeCriteria + " and session.sessionStatus = :open and session.sessionDate >= :today  and (session.isTheatreSession = FALSE or session.isTheatreSession is null)", markers, values, 1000);

	if (date != null && date.get(0) != null)
		return new ims.framework.utils.Date((java.util.Date) date.get(0));

	return null;
}
 
Example 3
Project: openMAXIMS   File: SelectandOrderImpl.java   Source Code and License 4 votes vote down vote up
public SelectedComponentFromSelectOrderVoCollection listInvestigationsOrProfiles(Category category, String name, LocationLiteVo location, ServiceShortVo service, Boolean isProfile, Boolean beginsWith, RoleDisciplineSecurityLevelLiteGCVo roleDiscliplineeSecurityLevels, LocationRefVoCollection locationList) 
{		
	SelectedComponentFromSelectOrderVoCollection listResults = new SelectedComponentFromSelectOrderVoCollection();
	
	ItemSelection impl = (ItemSelection)getDomainImpl(ItemSelectionImpl.class);
	if(impl != null)
	{
		//WDEV-10065 - pass param here for contract
		InvestShortVoCollection results = impl.listInvestigationsOrProfiles(category, name, location, service, isProfile, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, beginsWith, locationList);
		if(results == null)
			return listResults;
		
		for(int x = 0; x < results.size(); x++)
		{
			InvestShortVo result = results.get(x);
			
			//WDEV-9780 checkSecurityLevel - if doesn't pass continue in loop
			if(roleDiscliplineeSecurityLevels != null)
			{
				ServiceRefVo voInvService = result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull() ? result.getProviderService().getLocationService().getService() : null;
				SecurityLevelConfigVo voInvSecurityLevel = result.getInvestigationIndexIsNotNull() ? result.getInvestigationIndex().getSecurityLevel() : null;

				if(!roleDiscliplineeSecurityLevels.doesInvPassSecurityCheck(voInvService, voInvSecurityLevel,true)) //WDEV-11622
					continue;
			}

			if(result != null && result.getID_InvestigationIsNotNull() && result.getInvestigationIndexIsNotNull())
			{
				SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
				component.setID(result.getID_Investigation());
				component.setCategory(result.getInvestigationIndex().getCategory());
				component.setText(result.getInvestigationIndex().getName());
				component.setAdditionalLocationInfo(result.getLocationInfo());
				//component.setTooltip(result.getInvestigationIndex().getDescription());
				component.setHelpText(result.buildHelpTextTooltip());
				component.setIsAddon(result.getIsAddon());
				if(result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull())
					component.setServiceID(result.getProviderService().getLocationService().getService().getID_Service());
				
				component.setMinReOrderPeriod(result.getMinReorderPeriodUnit());
				component.setMinReOrderVal(result.getMinReorderPeriodVal());
				component.setMinReOrderFemalePeriod(result.getFemaleMinReorderPeriodUnit());
				component.setMinReOrderFemaleVal(result.getFemaleMinReorderPeriodVal());
				
				component.setRequiresSite(result.getInvestigationIndex().getRequiresSiteSpecifier());
				component.setGenderSpecific(result.getInvestigationIndex().getGenderSpecific());
				component.setPhlebMayCollect(result.getInvestigationIndex().getPhlebMayCollect());

				component.setTooltip(getComponentInvestigationTooltip(result));

				SelectAndOrderComponentType type = SelectAndOrderComponentType.INVESTIGATION;
				if(result.getInvestigationIndex().getIsProfileIsNotNull() && result.getInvestigationIndex().getIsProfile().booleanValue())
					type = SelectAndOrderComponentType.PROFILE;
				component.setComponentType(type);
				
				if(SelectAndOrderComponentType.PROFILE.equals(type))//WDEV-16624
				{
					component.setAssociatedInvestigations(result.getAssocInvestigations());
				}
				
				listResults.add(component);
			}
		}
	}
	
	return listResults;
}
 
Example 4
Project: openMAXIMS   File: SelectandOrderImpl.java   Source Code and License 4 votes vote down vote up
public SelectedComponentFromSelectOrderVoCollection listInvestigationsOrProfiles(Category category, String name, LocationLiteVo location, ServiceShortVo service, Boolean isProfile, Boolean beginsWith, RoleDisciplineSecurityLevelLiteGCVo roleDiscliplineeSecurityLevels, LocationRefVoCollection locationList) 
{		
	SelectedComponentFromSelectOrderVoCollection listResults = new SelectedComponentFromSelectOrderVoCollection();
	
	ItemSelection impl = (ItemSelection)getDomainImpl(ItemSelectionImpl.class);
	if(impl != null)
	{
		//WDEV-10065 - pass param here for contract
		InvestShortVoCollection results = impl.listInvestigationsOrProfiles(category, name, location, service, isProfile, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, beginsWith, locationList);
		if(results == null)
			return listResults;
		
		for(int x = 0; x < results.size(); x++)
		{
			InvestShortVo result = results.get(x);
			
			//WDEV-9780 checkSecurityLevel - if doesn't pass continue in loop
			if(roleDiscliplineeSecurityLevels != null)
			{
				ServiceRefVo voInvService = result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull() ? result.getProviderService().getLocationService().getService() : null;
				SecurityLevelConfigVo voInvSecurityLevel = result.getInvestigationIndexIsNotNull() ? result.getInvestigationIndex().getSecurityLevel() : null;

				if(!roleDiscliplineeSecurityLevels.doesInvPassSecurityCheck(voInvService, voInvSecurityLevel,true)) //WDEV-11622
					continue;
			}

			if(result != null && result.getID_InvestigationIsNotNull() && result.getInvestigationIndexIsNotNull())
			{
				SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
				component.setID(result.getID_Investigation());
				component.setCategory(result.getInvestigationIndex().getCategory());
				component.setText(result.getInvestigationIndex().getName());
				component.setAdditionalLocationInfo(result.getLocationInfo());
				//component.setTooltip(result.getInvestigationIndex().getDescription());
				component.setHelpText(result.buildHelpTextTooltip());
				component.setIsAddon(result.getIsAddon());
				if(result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull())
					component.setServiceID(result.getProviderService().getLocationService().getService().getID_Service());
				
				component.setMinReOrderPeriod(result.getMinReorderPeriodUnit());
				component.setMinReOrderVal(result.getMinReorderPeriodVal());
				component.setMinReOrderFemalePeriod(result.getFemaleMinReorderPeriodUnit());
				component.setMinReOrderFemaleVal(result.getFemaleMinReorderPeriodVal());
				
				component.setRequiresSite(result.getInvestigationIndex().getRequiresSiteSpecifier());
				component.setGenderSpecific(result.getInvestigationIndex().getGenderSpecific());
				component.setPhlebMayCollect(result.getInvestigationIndex().getPhlebMayCollect());

				component.setTooltip(getComponentInvestigationTooltip(result));

				SelectAndOrderComponentType type = SelectAndOrderComponentType.INVESTIGATION;
				if(result.getInvestigationIndex().getIsProfileIsNotNull() && result.getInvestigationIndex().getIsProfile().booleanValue())
					type = SelectAndOrderComponentType.PROFILE;
				component.setComponentType(type);
				
				if(SelectAndOrderComponentType.PROFILE.equals(type))//WDEV-16624
				{
					component.setAssociatedInvestigations(result.getAssocInvestigations());
				}
				
				listResults.add(component);
			}
		}
	}
	
	return listResults;
}
 
Example 5
Project: openMAXIMS   File: BookAppointmentImpl.java   Source Code and License 4 votes vote down vote up
/**
 * getCurrentMonth
 */
public ims.framework.utils.Date getCurrentMonth(ims.core.vo.ActivityVo activity, ims.core.clinical.vo.ServiceRefVo service, ims.core.resource.place.vo.LocationRefVo location, ServiceFunctionRefVo clinicType, LocationRefVoCollection locationList)
{
	if (activity == null)
		throw new DomainRuntimeException("Not all mandatory search params set in method listGenericSession");

	ArrayList<String> markers = new ArrayList<String>();
	ArrayList<Serializable> values = new ArrayList<Serializable>();

	String serviceCriteria = "";
	String locationCriteria = "";
	String clinicTypeCriteria = "";
	String clinicTypeJoin = "";

	markers.add("activityId");
	markers.add("open");
	markers.add("today");

	values.add(activity.getID_Activity());
	values.add(getDomLookup(Session_Status_and_Reason.OPEN));
	values.add(new Date().getDate());

	if (service != null)
	{
		markers.add("idService");
		values.add(service.getID_Service());
		serviceCriteria = " and session.service.id = :idService";
	}
	if (location != null)
	{
		markers.add("idLocation");
		values.add(location.getID_Location());
		locationCriteria = " and session.schLocation.id = :idLocation";
	}
	else if(locationList != null)
	{
		List<String> locationIds = new ArrayList<String>();
		for(LocationRefVo voRef : locationList)
			locationIds.add(voRef.getID_Location().toString());
	
		locationCriteria = " and session.schLocation.id in (" + getIdString(locationIds) + ")";
	}
	if (clinicType != null)
	{
		markers.add("idClinicType");
		values.add(clinicType.getID_ServiceFunction());
		clinicTypeJoin = " join slot.functions as func ";
		clinicTypeCriteria = " and func.id = :idClinicType ";
	}

	DomainFactory factory = getDomainFactory();

	List date = factory.find(" Select min (session.sessionDate) from Sch_Session as session " + " left join session.sessionSlots as slot " + clinicTypeJoin + " where ( slot.activity.id = :activityId) " + serviceCriteria + locationCriteria + clinicTypeCriteria + " and session.sessionStatus = :open and session.sessionDate >= :today  and (session.isTheatreSession = FALSE or session.isTheatreSession is null)", markers, values, 1000);

	if (date != null && date.get(0) != null)
		return new ims.framework.utils.Date((java.util.Date) date.get(0));

	return null;
}
 
Example 6
Project: openmaxims-linux   File: SelectandOrderImpl.java   Source Code and License 4 votes vote down vote up
public SelectedComponentFromSelectOrderVoCollection listInvestigationsOrProfiles(Category category, String name, LocationLiteVo location, ServiceShortVo service, Boolean isProfile, Boolean beginsWith, RoleDisciplineSecurityLevelLiteGCVo roleDiscliplineeSecurityLevels, LocationRefVoCollection locationList) 
{		
	SelectedComponentFromSelectOrderVoCollection listResults = new SelectedComponentFromSelectOrderVoCollection();
	
	ItemSelection impl = (ItemSelection)getDomainImpl(ItemSelectionImpl.class);
	if(impl != null)
	{
		//WDEV-10065 - pass param here for contract
		InvestShortVoCollection results = impl.listInvestigationsOrProfiles(category, name, location, service, isProfile, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, beginsWith, locationList);
		if(results == null)
			return listResults;
		
		for(int x = 0; x < results.size(); x++)
		{
			InvestShortVo result = results.get(x);
			
			//WDEV-9780 checkSecurityLevel - if doesn't pass continue in loop
			if(roleDiscliplineeSecurityLevels != null)
			{
				ServiceRefVo voInvService = result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull() ? result.getProviderService().getLocationService().getService() : null;
				SecurityLevelConfigVo voInvSecurityLevel = result.getInvestigationIndexIsNotNull() ? result.getInvestigationIndex().getSecurityLevel() : null;

				if(!roleDiscliplineeSecurityLevels.doesInvPassSecurityCheck(voInvService, voInvSecurityLevel,true)) //WDEV-11622
					continue;
			}

			if(result != null && result.getID_InvestigationIsNotNull() && result.getInvestigationIndexIsNotNull())
			{
				SelectedComponentFromSelectOrderVo component = new SelectedComponentFromSelectOrderVo();
				component.setID(result.getID_Investigation());
				component.setCategory(result.getInvestigationIndex().getCategory());
				component.setText(result.getInvestigationIndex().getName());
				component.setAdditionalLocationInfo(result.getLocationInfo());
				//component.setTooltip(result.getInvestigationIndex().getDescription());
				component.setHelpText(result.buildHelpTextTooltip());
				component.setIsAddon(result.getIsAddon());
				if(result.getProviderServiceIsNotNull() && result.getProviderService().getLocationServiceIsNotNull() && result.getProviderService().getLocationService().getServiceIsNotNull())
					component.setServiceID(result.getProviderService().getLocationService().getService().getID_Service());
				
				component.setMinReOrderPeriod(result.getMinReorderPeriodUnit());
				component.setMinReOrderVal(result.getMinReorderPeriodVal());
				component.setMinReOrderFemalePeriod(result.getFemaleMinReorderPeriodUnit());
				component.setMinReOrderFemaleVal(result.getFemaleMinReorderPeriodVal());
				
				component.setRequiresSite(result.getInvestigationIndex().getRequiresSiteSpecifier());
				component.setGenderSpecific(result.getInvestigationIndex().getGenderSpecific());
				component.setPhlebMayCollect(result.getInvestigationIndex().getPhlebMayCollect());

				component.setTooltip(getComponentInvestigationTooltip(result));

				SelectAndOrderComponentType type = SelectAndOrderComponentType.INVESTIGATION;
				if(result.getInvestigationIndex().getIsProfileIsNotNull() && result.getInvestigationIndex().getIsProfile().booleanValue())
					type = SelectAndOrderComponentType.PROFILE;
				component.setComponentType(type);
				
				if(SelectAndOrderComponentType.PROFILE.equals(type))//WDEV-16624
				{
					component.setAssociatedInvestigations(result.getAssocInvestigations());
				}
				
				listResults.add(component);
			}
		}
	}
	
	return listResults;
}