Java Code Examples for ims.domain.SessionData

The following are top voted examples for showing how to use ims.domain.SessionData. 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: NHSParamProvider.java   Source Code and License 6 votes vote down vote up
private void processNHSNoContext(UIEngine engine, IAppParam[] params, String nhsno) 
{
	String patientNHSNo = "";
	
	if (params != null && params.length > 0)
	{
		for(int i = 0; i<params.length; i++)
		{
			if (params[i].getName().equals(nhsno))
			{
				patientNHSNo = params[i].getValue();
				break;
			}
		}
	}
	
	PatientShort patient = getPatientByNHS(patientNHSNo);
		
	if(patient != null)
	{
		SessionData sessData = (SessionData)super.getSession().getAttribute(SessionConstants.SESSION_DATA);
		sessData.context.get().put(ContextQueryItem.PATIENT.getKey(), patient);
			
		engine.open(ConfigFlag.UI.DEMOGRAPHICS_FORM.getValue() != null ? ConfigFlag.UI.DEMOGRAPHICS_FORM.getValue() : formDemographics , new Object[]{patient});
	}
}
 
Example 2
Project: AvoinApotti   File: WebServicesIntegrationImpl.java   Source Code and License 6 votes vote down vote up
public void setUserRole(String sessionToken, String role) 
{	
	IAppRole appRole = getAppRoleByTaxonomyType(role, TaxonomyType.WEB_SERVICE);
	if (appRole == null)
	{		
		createSOAPFault(SystemLogLevel.ERROR, "'role' not found");
	}
	
	IAppUser user = getLoggedInUser();
	if (user != null)
	{
		IAppRoleLight userRole = user.getAppRole(appRole.getId());
		if (userRole == null)
		{		
			createSOAPFault(SystemLogLevel.WARNING, "User '" + user.getUsername() + "' doesn't have assigned role '" + appRole.getName() + "'");
		}
	}
	else
	{
		createSOAPFault(SystemLogLevel.WARNING, "WebService error: setUserRole - \n loggedin user is null");
	}
	
	SessionData sessData = getSessionData();
	sessData.role.set(appRole);			
}
 
Example 3
Project: openMAXIMS   File: DemographicsImpl.java   Source Code and License 6 votes vote down vote up
private void triggerMergeAlertMessage(ims.core.patient.domain.objects.Patient domPatient,ims.core.patient.domain.objects.Patient foundPatient)
{
	DomainSession session = getSession();
	boolean bShowDomainMessage = true;
	SessionData sessData = (SessionData)session.getAttribute(SessionConstants.SESSION_DATA);
	String mergedDomainMessage = domPatient.getMergedMessage(foundPatient);
	if (sessData != null)
	{	
		ArrayList<String> messages = sessData.domainMessageBox.get();
		if (messages != null && messages.contains(mergedDomainMessage))
			bShowDomainMessage = false;			
	}
	if (bShowDomainMessage)
	{			
		raiseAlert(mergedDomainMessage);
	}
}
 
Example 4
Project: openMAXIMS   File: NHSParamProvider.java   Source Code and License 6 votes vote down vote up
private void processNHSNoContext(UIEngine engine, IAppParam[] params, String nhsno) 
{
	String patientNHSNo = "";
	
	if (params != null && params.length > 0)
	{
		for(int i = 0; i<params.length; i++)
		{
			if (params[i].getName().equals(nhsno))
			{
				patientNHSNo = params[i].getValue();
				break;
			}
		}
	}
	
	PatientShort patient = getPatientByNHS(patientNHSNo);
		
	if(patient != null)
	{
		SessionData sessData = (SessionData)super.getSession().getAttribute(SessionConstants.SESSION_DATA);
		sessData.context.get().put(ContextQueryItem.PATIENT.getKey(), patient);
			
		engine.open(ConfigFlag.UI.DEMOGRAPHICS_FORM.getValue() != null ? ConfigFlag.UI.DEMOGRAPHICS_FORM.getValue() : formDemographics , new Object[]{patient});
	}
}
 
Example 5
Project: openMAXIMS   File: WebServicesIntegrationImpl.java   Source Code and License 6 votes vote down vote up
public void setUserRole(String sessionToken, String role) 
{	
	IAppRole appRole = getAppRoleByTaxonomyType(role, TaxonomyType.WEB_SERVICE);
	if (appRole == null)
	{		
		createSOAPFault(SystemLogLevel.ERROR, "'role' not found");
	}
	
	IAppUser user = getLoggedInUser();
	if (user != null)
	{
		IAppRoleLight userRole = user.getAppRole(appRole.getId());
		if (userRole == null)
		{		
			createSOAPFault(SystemLogLevel.WARNING, "User '" + user.getUsername() + "' doesn't have assigned role '" + appRole.getName() + "'");
		}
	}
	else
	{
		createSOAPFault(SystemLogLevel.WARNING, "WebService error: setUserRole - \n loggedin user is null");
	}
	
	SessionData sessData = getSessionData();
	sessData.role.set(appRole);			
}
 
Example 6
Project: openMAXIMS   File: WebServicesIntegrationImpl.java   Source Code and License 6 votes vote down vote up
public void setAppointmentConsultantCode(String sessionToken, String code)
{
	SessionData sessData = getSessionData();
	if(sessData == null) {
		createSOAPFault(SystemLogLevel.ERROR, "setAppointmentConsultantCode(): 'sessData' can't be null");
	}
	
	if (ConfigFlag.FW.DEBUG_WEB_SERVICES.getValue()) {
		String message = "Call setAppointmentConsultantCode() with parameters: ConsultantCode: " +  code;
		createSystemLogEntry(SystemLogType.WEB_SERVICE, SystemLogLevel.INFORMATION, sessData.securityTokenLaunchUsername.get(), "", message);
	}
	
	if (code == null || 
			code.trim().length() == 0) {		
				createSOAPFault(SystemLogLevel.ERROR, 
						"setAppointmentConsultantCode(): 'ConsultantCode' can't be null");
	}
	
	sessData.appointmentConsultantCode.set(code);		
}
 
Example 7
Project: openMAXIMS   File: WebServicesIntegrationImpl.java   Source Code and License 6 votes vote down vote up
public void setAppointmentLocationCode(String sessionToken, String code)
{
	SessionData sessData = getSessionData();
	if(sessData == null) {
		createSOAPFault(SystemLogLevel.ERROR, "setAppointmentStartDateTime(): 'sessData' can't be null");
	}
	
	if (ConfigFlag.FW.DEBUG_WEB_SERVICES.getValue()) {
		String message = "Call setAppointmentLocationCode() with parameters: LocationCode: " +  code;
		createSystemLogEntry(SystemLogType.WEB_SERVICE, SystemLogLevel.INFORMATION, sessData.securityTokenLaunchUsername.get(), "", message);
	}
	
	if (code == null || 
			code.trim().length() == 0) {		
				createSOAPFault(SystemLogLevel.ERROR, 
						"setAppointmentLocationCode(): 'LocationCode' can't be null");
	}
		
	sessData.appointmentLocationCode.set(code);
}
 
Example 8
Project: openMAXIMS   File: WebServicesIntegrationImpl.java   Source Code and License 6 votes vote down vote up
public void setAppointmentStartDateTime(String sessionToken, String startDate)
{
	SessionData sessData = getSessionData();
	if(sessData == null) {
		createSOAPFault(SystemLogLevel.ERROR, "setAppointmentStartDateTime(): 'sessData' can't be null");
	}
	
	if (ConfigFlag.FW.DEBUG_WEB_SERVICES.getValue()) {
		String message = "Call setAppointmentStartDateTime() with parameters: endDatte: " +  startDate;
		createSystemLogEntry(SystemLogType.WEB_SERVICE, SystemLogLevel.INFORMATION, sessData.securityTokenLaunchUsername.get(), "", message);
	}

	if (startDate == null || 
			startDate.trim().length() == 0) {		
				createSOAPFault(SystemLogLevel.ERROR, 
						"setAppointmentStartDateTime(): 'AppointmentStartDateTime' can't be null");
	}
	
	sessData.appointmentStartDateTime.set(startDate);
}
 
Example 9
Project: openMAXIMS   File: WebServicesIntegrationImpl.java   Source Code and License 6 votes vote down vote up
public void setAppointmentEndDateTime(String sessionToken, String endDate)
{	
	SessionData sessData = getSessionData();
	if(sessData == null) {
		createSOAPFault(SystemLogLevel.ERROR, "setAppointmentEndDateTime(): 'sessData' can't be null");
	}
	
	if (ConfigFlag.FW.DEBUG_WEB_SERVICES.getValue()) {
		String message = "Call setAppointmentEndDateTime() with parameters: endDatte: " +  endDate;
		createSystemLogEntry(SystemLogType.WEB_SERVICE, SystemLogLevel.INFORMATION, sessData.securityTokenLaunchUsername.get(), "", message);
	}
	
	if (endDate == null || 
			endDate.trim().length() == 0) {		
				createSOAPFault(SystemLogLevel.ERROR, 
						"setAppointmentEndDateTime(): 'AppointmentEndDateTime' can't be null");
	}				
	
	sessData.appointmentEndDateTime.set(endDate);		
}
 
Example 10
Project: openMAXIMS   File: NHSParamProvider.java   Source Code and License 6 votes vote down vote up
private void processNHSNoContext(UIEngine engine, IAppParam[] params, String nhsno) 
{
	String patientNHSNo = "";
	
	if (params != null && params.length > 0)
	{
		for(int i = 0; i<params.length; i++)
		{
			if (params[i].getName().equals(nhsno))
			{
				patientNHSNo = params[i].getValue();
				break;
			}
		}
	}
	
	PatientShort patient = getPatientByNHS(patientNHSNo);
		
	if(patient != null)
	{
		SessionData sessData = (SessionData)super.getSession().getAttribute(SessionConstants.SESSION_DATA);
		sessData.context.get().put(ContextQueryItem.PATIENT.getKey(), patient);
			
		engine.open(ConfigFlag.UI.DEMOGRAPHICS_FORM.getValue() != null ? ConfigFlag.UI.DEMOGRAPHICS_FORM.getValue() : formDemographics , new Object[]{patient});
	}
}
 
Example 11
Project: openMAXIMS   File: WebServicesIntegrationImpl.java   Source Code and License 6 votes vote down vote up
public void setUserRole(String sessionToken, String role) 
{	
	IAppRole appRole = getAppRoleByTaxonomyType(role, TaxonomyType.WEB_SERVICE);
	if (appRole == null)
	{		
		createSOAPFault(SystemLogLevel.ERROR, "'role' not found");
	}
	
	IAppUser user = getLoggedInUser();
	if (user != null)
	{
		IAppRoleLight userRole = user.getAppRole(appRole.getId());
		if (userRole == null)
		{		
			createSOAPFault(SystemLogLevel.WARNING, "User '" + user.getUsername() + "' doesn't have assigned role '" + appRole.getName() + "'");
		}
	}
	else
	{
		createSOAPFault(SystemLogLevel.WARNING, "WebService error: setUserRole - \n loggedin user is null");
	}
	
	SessionData sessData = getSessionData();
	sessData.role.set(appRole);			
}
 
Example 12
Project: openmaxims-linux   File: NHSParamProvider.java   Source Code and License 6 votes vote down vote up
private void processNHSNoContext(UIEngine engine, IAppParam[] params, String nhsno) 
{
	String patientNHSNo = "";
	
	if (params != null && params.length > 0)
	{
		for(int i = 0; i<params.length; i++)
		{
			if (params[i].getName().equals(nhsno))
			{
				patientNHSNo = params[i].getValue();
				break;
			}
		}
	}
	
	PatientShort patient = getPatientByNHS(patientNHSNo);
		
	if(patient != null)
	{
		SessionData sessData = (SessionData)super.getSession().getAttribute(SessionConstants.SESSION_DATA);
		sessData.context.get().put(ContextQueryItem.PATIENT.getKey(), patient);
			
		engine.open(ConfigFlag.UI.DEMOGRAPHICS_FORM.getValue() != null ? ConfigFlag.UI.DEMOGRAPHICS_FORM.getValue() : formDemographics , new Object[]{patient});
	}
}
 
Example 13
Project: openmaxims-linux   File: WebServicesIntegrationImpl.java   Source Code and License 6 votes vote down vote up
public void setUserRole(String sessionToken, String role) 
{	
	IAppRole appRole = getAppRoleByTaxonomyType(role, TaxonomyType.WEB_SERVICE);
	if (appRole == null)
	{		
		createSOAPFault(SystemLogLevel.ERROR, "'role' not found");
	}
	
	IAppUser user = getLoggedInUser();
	if (user != null)
	{
		IAppRoleLight userRole = user.getAppRole(appRole.getId());
		if (userRole == null)
		{		
			createSOAPFault(SystemLogLevel.WARNING, "User '" + user.getUsername() + "' doesn't have assigned role '" + appRole.getName() + "'");
		}
	}
	else
	{
		createSOAPFault(SystemLogLevel.WARNING, "WebService error: setUserRole - \n loggedin user is null");
	}
	
	SessionData sessData = getSessionData();
	sessData.role.set(appRole);			
}
 
Example 14
Project: AvoinApotti   File: BaseContextEvalProvider.java   Source Code and License 5 votes vote down vote up
protected final SessionData getSessionData()
{
	SessionData sessData = (SessionData)super.getSession().getAttribute(SessionConstants.SESSION_DATA);
	if (sessData == null)
		throw new DomainRuntimeException("SessionData in domain session cannot be null");
	
	return sessData;
}
 
Example 15
Project: AvoinApotti   File: ContextEvalProvider.java   Source Code and License 5 votes vote down vote up
public void execute(ValueObjectRef refVo) 
{	
	SessionData sessData = getSessionData();
	ims.core.vo.Patient voPat = null;
	
	if (refVo != null)
	{
		Demographics demog = (Demographics)getDomainImpl(DemographicsImpl.class);
		voPat = demog.getPatient((PatientRefVo)refVo);			
	}
	
	if (refVo == null || (sessData.patientId.get() != null && (voPat.getID_Patient() !=  sessData.patientId.get())))
	{		
		ArrayList<Integer> urlsID = sessData.urlToClose.get();		
	    if(urlsID == null)
	      	urlsID = new ArrayList<Integer>();
	  
	    ArrayList<Integer> urlsToCloseOnContextChanged = sessData.urlToCloseOnContextChanged.get();
	    if (urlsToCloseOnContextChanged != null && urlsToCloseOnContextChanged.size() > 0)
	    {
	    	for (int i = 0; i < urlsToCloseOnContextChanged.size(); i++) 
	    	{
	    		urlsID.add(urlsToCloseOnContextChanged.get(i));
			}
	    	 
	    	sessData.urlToClose.set(urlsID);
	    }
	}
}
 
Example 16
Project: AvoinApotti   File: CcoBaseContextEvalProvider.java   Source Code and License 5 votes vote down vote up
protected final SessionData getSessionData()
{
	SessionData sessData = (SessionData)super.getSession().getAttribute(SessionConstants.SESSION_DATA);
	if (sessData == null)
		throw new DomainRuntimeException("SessionData in domain session cannot be null");
	
	return sessData;
}
 
Example 17
Project: AvoinApotti   File: OcrrContextEvalProvider.java   Source Code and License 5 votes vote down vote up
public void execute(ValueObjectRef refVo) 
{	
	SessionData sessData = getSessionData();
	ims.core.vo.Patient voPat = null;
	
	if (refVo != null)
	{
		Demographics demog = (Demographics)getDomainImpl(DemographicsImpl.class);
		voPat = demog.getPatient((PatientRefVo)refVo);			
	}
	
	if (refVo == null || (sessData.patientId.get() != null && (voPat.getID_Patient() !=  sessData.patientId.get())))
	{		
		ArrayList<Integer> urlsID = sessData.urlToClose.get();		
	    if(urlsID == null)
	      	urlsID = new ArrayList<Integer>();
	  
	    ArrayList<Integer> urlsToCloseOnContextChanged = sessData.urlToCloseOnContextChanged.get();
	    if (urlsToCloseOnContextChanged != null && urlsToCloseOnContextChanged.size() > 0)
	    {
	    	for (int i = 0; i < urlsToCloseOnContextChanged.size(); i++) 
	    	{
	    		urlsID.add(urlsToCloseOnContextChanged.get(i));
			}
	    	 
	    	sessData.urlToClose.set(urlsID);
	    }
	}
}
 
Example 18
Project: AvoinApotti   File: BaseContextEvalProvider.java   Source Code and License 5 votes vote down vote up
protected final SessionData getSessionData()
{
	SessionData sessData = (SessionData)super.getSession().getAttribute(SessionConstants.SESSION_DATA);
	if (sessData == null)
		throw new DomainRuntimeException("SessionData in domain session cannot be null");
	
	return sessData;
}
 
Example 19
Project: AvoinApotti   File: WebServicesIntegrationImpl.java   Source Code and License 5 votes vote down vote up
public void setPatientIdentifierTypeAndValue(String identifierType, String identifierValue) 
{	
	if ((identifierType == null || identifierType.trim().length() == 0) ||
			(identifierValue == null || identifierValue.trim().length() == 0))
	{
		createSOAPFault(SystemLogLevel.WARNING, "'identifierType' and 'identifierValue' cannot be null")
;
	}
	
	HashMap<String, String> parameters = new HashMap<String, String>();
	parameters.put(identifierType, identifierValue);
	
	SessionData sessData = getSessionData();		
	sessData.securityTokenParameters.set(parameters);		
}
 
Example 20
Project: AvoinApotti   File: WebServicesIntegrationImpl.java   Source Code and License 5 votes vote down vote up
public void setPatientIdentifier(String sessionToken, String identifierValue) 
{	
	if (identifierValue == null || identifierValue.trim().length() == 0)
	{			
		createSOAPFault(SystemLogLevel.ERROR, "'identifierValue' cannot be null");
	}
	
	SessionData sessData = getSessionData();
	sessData.securityTokenPatientIdentifierValue.set(identifierValue);		
}
 
Example 21
Project: AvoinApotti   File: WebServicesIntegrationImpl.java   Source Code and License 5 votes vote down vote up
public void setPatientIdentifierType(String sessionToken, String identifierType)
{
	if (identifierType == null || identifierType.trim().length() == 0)
	{			
		createSOAPFault(SystemLogLevel.ERROR,"'identifierType' cannot be null");
	}
	
	SessionData sessData = getSessionData();
	sessData.securityTokenPatientIdentifierType.set(identifierType);
}
 
Example 22
Project: AvoinApotti   File: WebServicesIntegrationImpl.java   Source Code and License 5 votes vote down vote up
public void setUserLocation(String sessionToken, String location) 
{
	ILocation loc = getLocationLiteByTaxonomyType(location,TaxonomyType.WEB_SERVICE);
	if (loc == null)
	{		
		createSOAPFault(SystemLogLevel.ERROR, "'location' not found");
	}
	SessionData sessData = getSessionData();
	sessData.selectedLocation.set(loc);
}
 
Example 23
Project: AvoinApotti   File: WebServicesIntegrationImpl.java   Source Code and License 5 votes vote down vote up
public void setStartupForm(String sessionToken, String form) 
{
	IAppForm appForm = getAppFormListByTaxonomyType(form, TaxonomyType.WEB_SERVICE);
	if (appForm == null)
	{		
		createSOAPFault(SystemLogLevel.ERROR, "'startupForm' not found");
	}
	SessionData sessData = getSessionData();
	sessData.openForm.set(Integer.valueOf(appForm.getFormId()));	
}
 
Example 24
Project: AvoinApotti   File: WebServicesIntegrationImpl.java   Source Code and License 5 votes vote down vote up
private ims.domain.SessionData getSessionData()
{
	SessionData sessData = (SessionData)this.getDomainFactory().getDomainSession().getAttribute(SessionConstants.SESSION_DATA);
	
	if (sessData == null) {
		 throw new SOAPFaultException(null, "getSessionData(): sessionData cannot be null", null, null);
	}
	
	return sessData;
}
 
Example 25
Project: AvoinApotti   File: WebServicesIntegrationImpl.java   Source Code and License 5 votes vote down vote up
public void restrictPatientAccess(String sessionToken, String restrict) 
{				
	//Default restrict patient access
	SessionData sessData = getSessionData();
	sessData.restrictPatientAccess.set("true");
	
	if (restrict.toLowerCase().equals("false"))
	{
		sessData.restrictPatientAccess.set("false");
	}		
}
 
Example 26
Project: openMAXIMS   File: BaseContextEvalProvider.java   Source Code and License 5 votes vote down vote up
protected final SessionData getSessionData()
{
	SessionData sessData = (SessionData)super.getSession().getAttribute(SessionConstants.SESSION_DATA);
	if (sessData == null)
		throw new DomainRuntimeException("SessionData in domain session cannot be null");
	
	return sessData;
}
 
Example 27
Project: openMAXIMS   File: CcoContextEvalProvider.java   Source Code and License 5 votes vote down vote up
public void execute(ValueObjectRef refVo) 
{	
	SessionData sessData = getSessionData();
	ims.core.vo.Patient voPat = null;
	
	if (refVo != null)
	{
		Demographics demog = (Demographics)getDomainImpl(DemographicsImpl.class);
		voPat = demog.getPatient((PatientRefVo)refVo);			
	}
	
	if (refVo == null || (sessData.patientId.get() != null && (voPat.getID_Patient() !=  sessData.patientId.get())))
	{		
		ArrayList<Integer> urlsID = sessData.urlToClose.get();		
	    if(urlsID == null)
	      	urlsID = new ArrayList<Integer>();
	  
	    ArrayList<Integer> urlsToCloseOnContextChanged = sessData.urlToCloseOnContextChanged.get();
	    if (urlsToCloseOnContextChanged != null && urlsToCloseOnContextChanged.size() > 0)
	    {
	    	for (int i = 0; i < urlsToCloseOnContextChanged.size(); i++) 
	    	{
	    		urlsID.add(urlsToCloseOnContextChanged.get(i));
			}
	    	 
	    	sessData.urlToClose.set(urlsID);
	    }
	}
}
 
Example 28
Project: openMAXIMS   File: ContextEvalProvider.java   Source Code and License 5 votes vote down vote up
public void execute(ValueObjectRef refVo) 
{	
	SessionData sessData = getSessionData();
	ims.core.vo.Patient voPat = null;
	
	if (refVo != null)
	{
		Demographics demog = (Demographics)getDomainImpl(DemographicsImpl.class);
		voPat = demog.getPatient((PatientRefVo)refVo);			
	}
	
	if (refVo == null || voPat == null || (sessData.patientId.get() != null && (voPat.getID_Patient() !=  sessData.patientId.get())))
	{		
		ArrayList<Integer> urlsID = sessData.urlToClose.get();		
	    if(urlsID == null)
	      	urlsID = new ArrayList<Integer>();
	  
	    ArrayList<Integer> urlsToCloseOnContextChanged = sessData.urlToCloseOnContextChanged.get();
	    if (urlsToCloseOnContextChanged != null && urlsToCloseOnContextChanged.size() > 0)
	    {
	    	for (int i = 0; i < urlsToCloseOnContextChanged.size(); i++) 
	    	{
	    		urlsID.add(urlsToCloseOnContextChanged.get(i));
			}
	    	 
	    	sessData.urlToClose.set(urlsID);
	    }
	}
}
 
Example 29
Project: openMAXIMS   File: CcoBaseContextEvalProvider.java   Source Code and License 5 votes vote down vote up
protected final SessionData getSessionData()
{
	SessionData sessData = (SessionData)super.getSession().getAttribute(SessionConstants.SESSION_DATA);
	if (sessData == null)
		throw new DomainRuntimeException("SessionData in domain session cannot be null");
	
	return sessData;
}
 
Example 30
Project: openMAXIMS   File: OcrrContextEvalProvider.java   Source Code and License 5 votes vote down vote up
public void execute(ValueObjectRef refVo) 
{	
	SessionData sessData = getSessionData();
	ims.core.vo.Patient voPat = null;
	
	if (refVo != null)
	{
		Demographics demog = (Demographics)getDomainImpl(DemographicsImpl.class);
		voPat = demog.getPatient((PatientRefVo)refVo);			
	}
	
	if (refVo == null || voPat == null || (sessData.patientId.get() != null && (voPat.getID_Patient() !=  sessData.patientId.get())))
	{		
		ArrayList<Integer> urlsID = sessData.urlToClose.get();		
	    if(urlsID == null)
	      	urlsID = new ArrayList<Integer>();
	  
	    ArrayList<Integer> urlsToCloseOnContextChanged = sessData.urlToCloseOnContextChanged.get();
	    if (urlsToCloseOnContextChanged != null && urlsToCloseOnContextChanged.size() > 0)
	    {
	    	for (int i = 0; i < urlsToCloseOnContextChanged.size(); i++) 
	    	{
	    		urlsID.add(urlsToCloseOnContextChanged.get(i));
			}
	    	 
	    	sessData.urlToClose.set(urlsID);
	    }
	}
}
 
Example 31
Project: openMAXIMS   File: WardAttenderImpl.java   Source Code and License 5 votes vote down vote up
public Boolean isAdmissionScreenAlreadyOpened()
{
	DomainSession session = getSession();
	SessionData sessData = (SessionData)session.getAttribute(SessionConstants.SESSION_DATA);
	if (sessData == null)
		return false;
	
	ArrayList<?> prevForms = sessData.previousForms.get();
	
	if (prevForms == null || prevForms.size() == 0)
		return false;				
	if ((prevForms.contains(WardAttender.getID()) || prevForms.contains(WardAttenderDialog.getID())) && prevForms.contains(WardViewDialog.getID()))
		return true;		
	return false;
}
 
Example 32
Project: openMAXIMS   File: BaseContextEvalProvider.java   Source Code and License 5 votes vote down vote up
protected final SessionData getSessionData()
{
	SessionData sessData = (SessionData)super.getSession().getAttribute(SessionConstants.SESSION_DATA);
	if (sessData == null)
		throw new DomainRuntimeException("SessionData in domain session cannot be null");
	
	return sessData;
}
 
Example 33
Project: openMAXIMS   File: WebServicesIntegrationImpl.java   Source Code and License 5 votes vote down vote up
public void setPatientIdentifierTypeAndValue(String identifierType, String identifierValue) 
{	
	if ((identifierType == null || identifierType.trim().length() == 0) ||
			(identifierValue == null || identifierValue.trim().length() == 0))
	{
		createSOAPFault(SystemLogLevel.WARNING, "'identifierType' and 'identifierValue' cannot be null")
;
	}
	
	HashMap<String, String> parameters = new HashMap<String, String>();
	parameters.put(identifierType, identifierValue);
	
	SessionData sessData = getSessionData();		
	sessData.securityTokenParameters.set(parameters);		
}
 
Example 34
Project: openMAXIMS   File: WebServicesIntegrationImpl.java   Source Code and License 5 votes vote down vote up
public void setPatientIdentifier(String sessionToken, String identifierValue) 
{	
	if (identifierValue == null || identifierValue.trim().length() == 0)
	{			
		createSOAPFault(SystemLogLevel.ERROR, "'identifierValue' cannot be null");
	}
	
	SessionData sessData = getSessionData();
	sessData.securityTokenPatientIdentifierValue.set(identifierValue);		
}
 
Example 35
Project: openMAXIMS   File: WebServicesIntegrationImpl.java   Source Code and License 5 votes vote down vote up
public void setPatientIdentifierType(String sessionToken, String identifierType)
{
	if (identifierType == null || identifierType.trim().length() == 0)
	{			
		createSOAPFault(SystemLogLevel.ERROR,"'identifierType' cannot be null");
	}
	
	SessionData sessData = getSessionData();
	sessData.securityTokenPatientIdentifierType.set(identifierType);
}
 
Example 36
Project: openMAXIMS   File: WebServicesIntegrationImpl.java   Source Code and License 5 votes vote down vote up
public void setUserLocation(String sessionToken, String location) 
{
	ILocation loc = getLocationLiteByTaxonomyType(location,TaxonomyType.WEB_SERVICE);
	if (loc == null)
	{		
		createSOAPFault(SystemLogLevel.ERROR, "'location' not found");
	}
	SessionData sessData = getSessionData();
	sessData.selectedLocation.set(loc);
}
 
Example 37
Project: openMAXIMS   File: WebServicesIntegrationImpl.java   Source Code and License 5 votes vote down vote up
public void setStartupForm(String sessionToken, String form) 
{
	IAppForm appForm = getAppFormListByTaxonomyType(form, TaxonomyType.WEB_SERVICE);
	if (appForm == null)
	{		
		createSOAPFault(SystemLogLevel.ERROR, "'startupForm' not found");
	}
	SessionData sessData = getSessionData();
	sessData.openForm.set(Integer.valueOf(appForm.getFormId()));	
}
 
Example 38
Project: openMAXIMS   File: WebServicesIntegrationImpl.java   Source Code and License 5 votes vote down vote up
private ims.domain.SessionData getSessionData()
{
	SessionData sessData = (SessionData)this.getDomainFactory().getDomainSession().getAttribute(SessionConstants.SESSION_DATA);
	
	if (sessData == null) {
		 throw new SOAPFaultException(null, "getSessionData(): sessionData cannot be null", null, null);
	}
	
	return sessData;
}
 
Example 39
Project: openMAXIMS   File: WebServicesIntegrationImpl.java   Source Code and License 5 votes vote down vote up
public void restrictPatientAccess(String sessionToken, String restrict) 
{				
	//Default restrict patient access
	SessionData sessData = getSessionData();
	sessData.restrictPatientAccess.set("true");
	
	if (restrict.toLowerCase().equals("false"))
	{
		sessData.restrictPatientAccess.set("false");
	}		
}
 
Example 40
Project: openMAXIMS   File: BaseContextEvalProvider.java   Source Code and License 5 votes vote down vote up
protected final SessionData getSessionData()
{
	SessionData sessData = (SessionData)super.getSession().getAttribute(SessionConstants.SESSION_DATA);
	if (sessData == null)
		throw new DomainRuntimeException("SessionData in domain session cannot be null");
	
	return sessData;
}