Java Code Examples for ims.ocrr.vo.SecurityLevelConfigVo

The following are top voted examples for showing how to use ims.ocrr.vo.SecurityLevelConfigVo. 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 open()
{
	form.grdSecurity().getRows().clear();

	SecurityLevelConfigVoCollection voCollSecurityLevelConfig = domain.listSecurityLevel();
	if (voCollSecurityLevelConfig == null)
		return;

	for (SecurityLevelConfigVo voSecurityLevelConfig : voCollSecurityLevelConfig)
	{
		grdSecurityRow row = form.grdSecurity().getRows().newRow();
		row.setColSecurityLevelDesc(voSecurityLevelConfig.getSecurityLevelDescription());
		row.setValue(voSecurityLevelConfig);
	}

	updateControlState();
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void increaseSecurityLevel()
{
	//moveDown
	form.grdSecurity().moveDown();
	
	//moved up
	SecurityLevelConfigVo voMoveUp = form.grdSecurity().getRows().get(form.grdSecurity().getSelectedRowIndex() -1).getValue();
	voMoveUp.setSecurityLevel( voMoveUp.getSecurityLevel() - 1 );
	
	//moved down
	SecurityLevelConfigVo voMoveDown = form.grdSecurity().getSelectedRow().getValue();
	voMoveDown.setSecurityLevel( voMoveDown.getSecurityLevel() + 1 );
	
	try
	{
		domain.saveSecurityLevelSwop(voMoveUp, voMoveDown);
	}
	catch (StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
	}
	
	open();
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void decreaseSecurityLevel()
{
	//move up	
	form.grdSecurity().moveUp();
	
	//moved down
	SecurityLevelConfigVo voMoveDown = form.grdSecurity().getRows().get(form.grdSecurity().getSelectedRowIndex() + 1).getValue();
	voMoveDown.setSecurityLevel( voMoveDown.getSecurityLevel() + 1 );
	
	//moved up
	SecurityLevelConfigVo voMoveUp = form.grdSecurity().getSelectedRow().getValue();
	voMoveUp.setSecurityLevel( voMoveUp.getSecurityLevel() - 1 );
	
	try
	{
		domain.saveSecurityLevelSwop(voMoveUp, voMoveDown);
	}
	catch (StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
	}
	
	open();
}
 
Example 4
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void open()
{
	form.grdSecurity().getRows().clear();

	SecurityLevelConfigVoCollection voCollSecurityLevelConfig = domain.listSecurityLevel();
	if (voCollSecurityLevelConfig == null)
		return;

	for (SecurityLevelConfigVo voSecurityLevelConfig : voCollSecurityLevelConfig)
	{
		grdSecurityRow row = form.grdSecurity().getRows().newRow();
		row.setColSecurityLevelDesc(voSecurityLevelConfig.getSecurityLevelDescription());
		row.setValue(voSecurityLevelConfig);
	}

	updateControlState();
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void increaseSecurityLevel()
{
	//moveDown
	form.grdSecurity().moveDown();
	
	//moved up
	SecurityLevelConfigVo voMoveUp = form.grdSecurity().getRows().get(form.grdSecurity().getSelectedRowIndex() -1).getValue();
	voMoveUp.setSecurityLevel( voMoveUp.getSecurityLevel() - 1 );
	
	//moved down
	SecurityLevelConfigVo voMoveDown = form.grdSecurity().getSelectedRow().getValue();
	voMoveDown.setSecurityLevel( voMoveDown.getSecurityLevel() + 1 );
	
	try
	{
		domain.saveSecurityLevelSwop(voMoveUp, voMoveDown);
	}
	catch (StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
	}
	
	open();
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void decreaseSecurityLevel()
{
	//move up	
	form.grdSecurity().moveUp();
	
	//moved down
	SecurityLevelConfigVo voMoveDown = form.grdSecurity().getRows().get(form.grdSecurity().getSelectedRowIndex() + 1).getValue();
	voMoveDown.setSecurityLevel( voMoveDown.getSecurityLevel() + 1 );
	
	//moved up
	SecurityLevelConfigVo voMoveUp = form.grdSecurity().getSelectedRow().getValue();
	voMoveUp.setSecurityLevel( voMoveUp.getSecurityLevel() - 1 );
	
	try
	{
		domain.saveSecurityLevelSwop(voMoveUp, voMoveDown);
	}
	catch (StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
	}
	
	open();
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void open()
{
	form.grdSecurity().getRows().clear();

	SecurityLevelConfigVoCollection voCollSecurityLevelConfig = domain.listSecurityLevel();
	if (voCollSecurityLevelConfig == null)
		return;

	for (SecurityLevelConfigVo voSecurityLevelConfig : voCollSecurityLevelConfig)
	{
		grdSecurityRow row = form.grdSecurity().getRows().newRow();
		row.setColSecurityLevelDesc(voSecurityLevelConfig.getSecurityLevelDescription());
		row.setValue(voSecurityLevelConfig);
	}

	updateControlState();
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void increaseSecurityLevel()
{
	//moveDown
	form.grdSecurity().moveDown();
	
	//moved up
	SecurityLevelConfigVo voMoveUp = form.grdSecurity().getRows().get(form.grdSecurity().getSelectedRowIndex() -1).getValue();
	voMoveUp.setSecurityLevel( voMoveUp.getSecurityLevel() - 1 );
	
	//moved down
	SecurityLevelConfigVo voMoveDown = form.grdSecurity().getSelectedRow().getValue();
	voMoveDown.setSecurityLevel( voMoveDown.getSecurityLevel() + 1 );
	
	try
	{
		domain.saveSecurityLevelSwop(voMoveUp, voMoveDown);
	}
	catch (StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
	}
	
	open();
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void decreaseSecurityLevel()
{
	//move up	
	form.grdSecurity().moveUp();
	
	//moved down
	SecurityLevelConfigVo voMoveDown = form.grdSecurity().getRows().get(form.grdSecurity().getSelectedRowIndex() + 1).getValue();
	voMoveDown.setSecurityLevel( voMoveDown.getSecurityLevel() + 1 );
	
	//moved up
	SecurityLevelConfigVo voMoveUp = form.grdSecurity().getSelectedRow().getValue();
	voMoveUp.setSecurityLevel( voMoveUp.getSecurityLevel() - 1 );
	
	try
	{
		domain.saveSecurityLevelSwop(voMoveUp, voMoveDown);
	}
	catch (StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
	}
	
	open();
}
 
Example 10
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void open()
{
	form.grdSecurity().getRows().clear();

	SecurityLevelConfigVoCollection voCollSecurityLevelConfig = domain.listSecurityLevel();
	if (voCollSecurityLevelConfig == null)
		return;

	for (SecurityLevelConfigVo voSecurityLevelConfig : voCollSecurityLevelConfig)
	{
		grdSecurityRow row = form.grdSecurity().getRows().newRow();
		row.setColSecurityLevelDesc(voSecurityLevelConfig.getSecurityLevelDescription());
		row.setValue(voSecurityLevelConfig);
	}

	updateControlState();
}
 
Example 11
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void increaseSecurityLevel()
{
	//moveDown
	form.grdSecurity().moveDown();
	
	//moved up
	SecurityLevelConfigVo voMoveUp = form.grdSecurity().getRows().get(form.grdSecurity().getSelectedRowIndex() -1).getValue();
	voMoveUp.setSecurityLevel( voMoveUp.getSecurityLevel() - 1 );
	
	//moved down
	SecurityLevelConfigVo voMoveDown = form.grdSecurity().getSelectedRow().getValue();
	voMoveDown.setSecurityLevel( voMoveDown.getSecurityLevel() + 1 );
	
	try
	{
		domain.saveSecurityLevelSwop(voMoveUp, voMoveDown);
	}
	catch (StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
	}
	
	open();
}
 
Example 12
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void decreaseSecurityLevel()
{
	//move up	
	form.grdSecurity().moveUp();
	
	//moved down
	SecurityLevelConfigVo voMoveDown = form.grdSecurity().getRows().get(form.grdSecurity().getSelectedRowIndex() + 1).getValue();
	voMoveDown.setSecurityLevel( voMoveDown.getSecurityLevel() + 1 );
	
	//moved up
	SecurityLevelConfigVo voMoveUp = form.grdSecurity().getSelectedRow().getValue();
	voMoveUp.setSecurityLevel( voMoveUp.getSecurityLevel() - 1 );
	
	try
	{
		domain.saveSecurityLevelSwop(voMoveUp, voMoveDown);
	}
	catch (StaleObjectException e)
	{
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
	}
	
	open();
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void loadSecurityLevel()
{
	form.cmbSecurityLevel().clear();
	
	SecurityLevelConfigVoCollection voColSecurity = domain.listSecurityLevel();
	for(SecurityLevelConfigVo voSecurity : voColSecurity)
		form.cmbSecurityLevel().newRow(voSecurity, voSecurity.getSecurityLevelDescription());
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void newSecurityLevel()
{
	SecurityLevelConfigVo voSecurityLevel = new SecurityLevelConfigVo();
	voSecurityLevel.setSecurityLevel(getNextIndexValue());
	
	form.getGlobalContext().OCRR.setSecurityLevelConfigVoRecord(voSecurityLevel);
	engine.open(form.getForms().OCRR.SecurityLevelDescriptionDialog);
}
 
Example 15
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateScreenFromData()
{
	clearScreen();
	SecurityLevelConfigVo voSecurityLevel = (SecurityLevelConfigVo)form.getGlobalContext().OCRR.getSecurityLevelConfigVoRecord().clone();
	
	if(voSecurityLevel != null)
	{
		form.txtDescription().setValue(voSecurityLevel.getSecurityLevelDescription());
	}
}
 
Example 16
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
	SecurityLevelConfigVo voSecurityLevel = populateDataFromScreen();
	
	String[] arrErrors = voSecurityLevel.validate();
	if(arrErrors != null)
	{
		engine.showErrors(arrErrors);
		return;
	}
	form.getGlobalContext().OCRR.setSecurityLevelConfigVoRecord(voSecurityLevel);
	engine.close(DialogResult.OK);
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private SecurityLevelConfigVo populateDataFromScreen()
{
	SecurityLevelConfigVo voSecurityLevel = form.getGlobalContext().OCRR.getSecurityLevelConfigVoRecord();
	
	voSecurityLevel.setSecurityLevelDescription(form.txtDescription().getValue());
	
	return voSecurityLevel;
}
 
Example 18
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void loadSecurityLevel()
{
	form.cmbSecurityLevel().clear();
	
	SecurityLevelConfigVoCollection voColSecurity = domain.listSecurityLevel();
	for(SecurityLevelConfigVo voSecurity : voColSecurity)
		form.cmbSecurityLevel().newRow(voSecurity, voSecurity.getSecurityLevelDescription());
}
 
Example 19
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void newSecurityLevel()
{
	SecurityLevelConfigVo voSecurityLevel = new SecurityLevelConfigVo();
	voSecurityLevel.setSecurityLevel(getNextIndexValue());
	
	form.getGlobalContext().OCRR.setSecurityLevelConfigVoRecord(voSecurityLevel);
	engine.open(form.getForms().OCRR.SecurityLevelDescriptionDialog);
}
 
Example 20
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateScreenFromData()
{
	clearScreen();
	SecurityLevelConfigVo voSecurityLevel = (SecurityLevelConfigVo)form.getGlobalContext().OCRR.getSecurityLevelConfigVoRecord().clone();
	
	if(voSecurityLevel != null)
	{
		form.txtDescription().setValue(voSecurityLevel.getSecurityLevelDescription());
	}
}
 
Example 21
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
	SecurityLevelConfigVo voSecurityLevel = populateDataFromScreen();
	
	String[] arrErrors = voSecurityLevel.validate();
	if(arrErrors != null)
	{
		engine.showErrors(arrErrors);
		return;
	}
	form.getGlobalContext().OCRR.setSecurityLevelConfigVoRecord(voSecurityLevel);
	engine.close(DialogResult.OK);
}
 
Example 22
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private SecurityLevelConfigVo populateDataFromScreen()
{
	SecurityLevelConfigVo voSecurityLevel = form.getGlobalContext().OCRR.getSecurityLevelConfigVoRecord();
	
	voSecurityLevel.setSecurityLevelDescription(form.txtDescription().getValue());
	
	return voSecurityLevel;
}
 
Example 23
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void loadSecurityLevel()
{
	form.cmbSecurityLevel().clear();
	
	SecurityLevelConfigVoCollection voColSecurity = domain.listSecurityLevel();
	for(SecurityLevelConfigVo voSecurity : voColSecurity)
		form.cmbSecurityLevel().newRow(voSecurity, voSecurity.getSecurityLevelDescription());
}
 
Example 24
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void newSecurityLevel()
{
	SecurityLevelConfigVo voSecurityLevel = new SecurityLevelConfigVo();
	voSecurityLevel.setSecurityLevel(getNextIndexValue());
	
	form.getGlobalContext().OCRR.setSecurityLevelConfigVoRecord(voSecurityLevel);
	engine.open(form.getForms().OCRR.SecurityLevelDescriptionDialog);
}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateScreenFromData()
{
	clearScreen();
	SecurityLevelConfigVo voSecurityLevel = (SecurityLevelConfigVo)form.getGlobalContext().OCRR.getSecurityLevelConfigVoRecord().clone();
	
	if(voSecurityLevel != null)
	{
		form.txtDescription().setValue(voSecurityLevel.getSecurityLevelDescription());
	}
}
 
Example 26
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
	SecurityLevelConfigVo voSecurityLevel = populateDataFromScreen();
	
	String[] arrErrors = voSecurityLevel.validate();
	if(arrErrors != null)
	{
		engine.showErrors(arrErrors);
		return;
	}
	form.getGlobalContext().OCRR.setSecurityLevelConfigVoRecord(voSecurityLevel);
	engine.close(DialogResult.OK);
}
 
Example 27
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private SecurityLevelConfigVo populateDataFromScreen()
{
	SecurityLevelConfigVo voSecurityLevel = form.getGlobalContext().OCRR.getSecurityLevelConfigVoRecord();
	
	voSecurityLevel.setSecurityLevelDescription(form.txtDescription().getValue());
	
	return voSecurityLevel;
}
 
Example 28
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void loadSecurityLevel()
{
	form.cmbSecurityLevel().clear();
	
	SecurityLevelConfigVoCollection voColSecurity = domain.listSecurityLevel();
	for(SecurityLevelConfigVo voSecurity : voColSecurity)
		form.cmbSecurityLevel().newRow(voSecurity, voSecurity.getSecurityLevelDescription());
}
 
Example 29
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void newSecurityLevel()
{
	SecurityLevelConfigVo voSecurityLevel = new SecurityLevelConfigVo();
	voSecurityLevel.setSecurityLevel(getNextIndexValue());
	
	form.getGlobalContext().OCRR.setSecurityLevelConfigVoRecord(voSecurityLevel);
	engine.open(form.getForms().OCRR.SecurityLevelDescriptionDialog);
}
 
Example 30
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateScreenFromData()
{
	clearScreen();
	SecurityLevelConfigVo voSecurityLevel = (SecurityLevelConfigVo)form.getGlobalContext().OCRR.getSecurityLevelConfigVoRecord().clone();
	
	if(voSecurityLevel != null)
	{
		form.txtDescription().setValue(voSecurityLevel.getSecurityLevelDescription());
	}
}
 
Example 31
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
	SecurityLevelConfigVo voSecurityLevel = populateDataFromScreen();
	
	String[] arrErrors = voSecurityLevel.validate();
	if(arrErrors != null)
	{
		engine.showErrors(arrErrors);
		return;
	}
	form.getGlobalContext().OCRR.setSecurityLevelConfigVoRecord(voSecurityLevel);
	engine.close(DialogResult.OK);
}
 
Example 32
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private SecurityLevelConfigVo populateDataFromScreen()
{
	SecurityLevelConfigVo voSecurityLevel = form.getGlobalContext().OCRR.getSecurityLevelConfigVoRecord();
	
	voSecurityLevel.setSecurityLevelDescription(form.txtDescription().getValue());
	
	return voSecurityLevel;
}
 
Example 33
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private OcsOrderSummaryVo enforceSecurity(OcsOrderSummaryVo voOrderSummary)
{		
	if(voOrderSummary == null)
		return null;
	
	//investigations collection
	if(voOrderSummary.getInvestigationsIsNotNull())
	{
		for(OrderInvestigationListVo voOrderInv : voOrderSummary.getInvestigations())
		{
			// WDEV-11080
			voOrderInv.setPassesSecurity(true);
			if (form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevelsIsNotNull())
			{
				ServiceRefVo voInvService = voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getProviderServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationService().getServiceIsNotNull() ? voOrderInv.getInvestigation().getProviderService().getLocationService().getService() : null;
				SecurityLevelConfigVo voInvSecurityLevel = voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getInvestigationIndexIsNotNull() ? voOrderInv.getInvestigation().getInvestigationIndex().getSecurityLevel() : null;

				//set a boolean in the for security check
				if(!form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels().doesInvPassSecurityCheck(voInvService, voInvSecurityLevel,false)) //WDEV-11622
					voOrderInv.setPassesSecurity(false);
			}
			
			//we have done all the investigations above so just need to copy security check result into each record within the specimen's investigation collection
			if(voOrderSummary.getSpecimensIsNotNull())
			{
				for(PathologySpecimenVo voSpec : voOrderSummary.getSpecimens())
				{
					if(voSpec.getInvestigationsIsNotNull())
					{
						for(PathologySpecimenOrderInvestigationVo voSpecOrdInv : voSpec.getInvestigations())
						{
							if(voOrderInv.getBoId().equals(voSpecOrdInv.getBoId()))
							{
								voSpecOrdInv.setPassesSecurity(voOrderInv.getPassesSecurity());
								break;
							}
						}
					}
				}
			}	
		}
	}
	form.getLocalContext().setOrderSummary(voOrderSummary);
	return voOrderSummary;
}
 
Example 34
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void editSecurityLevel()
{
	form.getGlobalContext().OCRR.setSecurityLevelConfigVoRecord((SecurityLevelConfigVo)form.grdSecurity().getValue().clone());
	engine.open(form.getForms().OCRR.SecurityLevelDescriptionDialog);
}
 
Example 35
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private int addOrderRow(PathologyOrderVo voOrderInv)
{
	if(voOrderInv == null || voOrderInv.getSpecimen() == null)
		return 0;
	
	//WDEV-9780
	if(form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevelsIsNotNull())
	{
		ServiceRefVo voInvService =  voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getProviderServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationService().getServiceIsNotNull() ? voOrderInv.getInvestigation().getProviderService().getLocationService().getService() : null;
		SecurityLevelConfigVo voInvSecurityLevel = voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getInvestigationIndexIsNotNull() ? voOrderInv.getInvestigation().getInvestigationIndex().getSecurityLevel() : null;

		if(!form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels().doesInvPassSecurityCheck(voInvService, voInvSecurityLevel, false)) //WDEV-11622
			return 0;
	}		
	
	grdResultsRow parentRow = createOrFindSpecimenGridRow(voOrderInv);
	if(parentRow == null)
		return 0;
	
	grdResultsRow row = null;
	if (parentRow.getColExamName() == null)
		row = parentRow; 
	else	
		row = parentRow.getRows().newRow();

	if (voOrderInv.getDisplayDateTimeIsNotNull())
		row.setColDateTime(voOrderInv.getDisplayDateTime().toString(DateTimeFormat.STANDARD));

	if (voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getInvestigationIndexIsNotNull())
		row.setColExamName(voOrderInv.getInvestigation().getInvestigationIndex().getName());

	if (voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getProviderServiceIsNotNull() 
		&& voOrderInv.getInvestigation().getProviderService().getLocationServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationService().getServiceIsNotNull())
		row.setColDepartment(voOrderInv.getInvestigation().getProviderService().getLocationService().getService().getServiceName());

	if (voOrderInv.getOrderDetailsIsNotNull())
		row.setColOrderingLocation(voOrderInv.getOrderDetails().getCorrectLocation());

	if (voOrderInv.getOrderDetailsIsNotNull())
		row.setColClinician(voOrderInv.getOrderDetails().getCorrectClinician());

	
	row.setBackColor(parentRow.getBackColor());
	row.setValue(voOrderInv);
	
	return 1;
}
 
Example 36
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void setResultGridRowData(RadiologyOrderVo voRadiologyOrder)
{	
	//WDEV-9780
	if(form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevelsIsNotNull())
	{
		ServiceRefVo voInvService =  voRadiologyOrder.getInvestigationIsNotNull() && voRadiologyOrder.getInvestigation().getProviderServiceIsNotNull() && voRadiologyOrder.getInvestigation().getProviderService().getLocationServiceIsNotNull() && voRadiologyOrder.getInvestigation().getProviderService().getLocationService().getServiceIsNotNull() ? voRadiologyOrder.getInvestigation().getProviderService().getLocationService().getService() : null;
		SecurityLevelConfigVo voInvSecurityLevel = voRadiologyOrder.getInvestigationIsNotNull() && voRadiologyOrder.getInvestigation().getInvestigationIndexIsNotNull() ? voRadiologyOrder.getInvestigation().getInvestigationIndex().getSecurityLevel() : null;

		if(!form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels().doesInvPassSecurityCheck(voInvService, voInvSecurityLevel, false)) //WDEV-11622
			return;
	}		
	
	grdResultsRow row = form.grdResults().getRows().newRow();
	
	if (voRadiologyOrder.getDisplayDateTimeIsNotNull())
		row.setColDateTime(voRadiologyOrder.getDisplayDateTime().toString(DateTimeFormat.STANDARD));

	if (voRadiologyOrder.getInvestigationIsNotNull() && voRadiologyOrder.getInvestigation().getInvestigationIndexIsNotNull())
		row.setColExamName(voRadiologyOrder.getInvestigation().getInvestigationIndex().getName());
	
	//WDEV-12054
	if(voRadiologyOrder.getOrdInvXOStatusHistoryIsNotNull())
		row.setTooltipForColExamName(voRadiologyOrder.getOrdInvXOStatusHistory().generateXoStatusTooltip());
	
	if (voRadiologyOrder.getInvestigationIsNotNull() && voRadiologyOrder.getInvestigation().getProviderServiceIsNotNull() && voRadiologyOrder.getInvestigation().getProviderService().getLocationServiceIsNotNull() && voRadiologyOrder.getInvestigation().getProviderService().getLocationService().getServiceIsNotNull())
		row.setColDepartment(voRadiologyOrder.getInvestigation().getProviderService().getLocationService().getService().getServiceName());

	if (voRadiologyOrder.getOrderDetailsIsNotNull())
		row.setColOrderingLocation(voRadiologyOrder.getOrderDetails().getCorrectLocation());

	if (voRadiologyOrder.getOrderDetailsIsNotNull())
		row.setColClinician(voRadiologyOrder.getOrderDetails().getCorrectClinician());

	//Patient details
	if (voRadiologyOrder.getOrderDetailsIsNotNull() && voRadiologyOrder.getOrderDetails().getPatientIsNotNull())
	{
		PatientShort patient = voRadiologyOrder.getOrderDetails().getPatient();

		if (patient.getDisplayId() != null)
		{
			row.setColHospNum(patient.getDisplayId().getValue());
		}

		if (patient.getName() != null)
			row.setColName(patient.getName().toString());

		if (patient.getSexIsNotNull())
			row.setColSex(patient.getSex().getText());
	}
	
	row.setValue(voRadiologyOrder);
}
 
Example 37
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 38
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private OcsOrderSummaryVo enforceSecurity(OcsOrderSummaryVo voOrderSummary)
{		
	if(voOrderSummary == null)
		return null;
	
	//investigations collection
	if(voOrderSummary.getInvestigationsIsNotNull())
	{
		for(OrderInvestigationListVo voOrderInv : voOrderSummary.getInvestigations())
		{
			// WDEV-11080
			voOrderInv.setPassesSecurity(true);
			if (form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevelsIsNotNull())
			{
				ServiceRefVo voInvService = voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getProviderServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationService().getServiceIsNotNull() ? voOrderInv.getInvestigation().getProviderService().getLocationService().getService() : null;
				SecurityLevelConfigVo voInvSecurityLevel = voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getInvestigationIndexIsNotNull() ? voOrderInv.getInvestigation().getInvestigationIndex().getSecurityLevel() : null;

				//set a boolean in the for security check
				if(!form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels().doesInvPassSecurityCheck(voInvService, voInvSecurityLevel,false)) //WDEV-11622
					voOrderInv.setPassesSecurity(false);
			}
			
			//we have done all the investigations above so just need to copy security check result into each record within the specimen's investigation collection
			if(voOrderSummary.getSpecimensIsNotNull())
			{
				for(PathologySpecimenVo voSpec : voOrderSummary.getSpecimens())
				{
					if(voSpec.getInvestigationsIsNotNull())
					{
						for(PathologySpecimenOrderInvestigationVo voSpecOrdInv : voSpec.getInvestigations())
						{
							if(voOrderInv.getBoId().equals(voSpecOrdInv.getBoId()))
							{
								voSpecOrdInv.setPassesSecurity(voOrderInv.getPassesSecurity());
								break;
							}
						}
					}
				}
			}	
		}
	}
	form.getLocalContext().setOrderSummary(voOrderSummary);
	return voOrderSummary;
}
 
Example 39
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void editSecurityLevel()
{
	form.getGlobalContext().OCRR.setSecurityLevelConfigVoRecord((SecurityLevelConfigVo)form.grdSecurity().getValue().clone());
	engine.open(form.getForms().OCRR.SecurityLevelDescriptionDialog);
}
 
Example 40
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private int addOrderRow(PathologyOrderVo voOrderInv)
{
	if(voOrderInv == null || voOrderInv.getSpecimen() == null)
		return 0;
	
	//WDEV-9780
	if(form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevelsIsNotNull())
	{
		ServiceRefVo voInvService =  voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getProviderServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationService().getServiceIsNotNull() ? voOrderInv.getInvestigation().getProviderService().getLocationService().getService() : null;
		SecurityLevelConfigVo voInvSecurityLevel = voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getInvestigationIndexIsNotNull() ? voOrderInv.getInvestigation().getInvestigationIndex().getSecurityLevel() : null;

		if(!form.getGlobalContext().OCRR.getRoleDisciplineSecurityLevels().doesInvPassSecurityCheck(voInvService, voInvSecurityLevel, false)) //WDEV-11622
			return 0;
	}		
	
	grdResultsRow parentRow = createOrFindSpecimenGridRow(voOrderInv);
	if(parentRow == null)
		return 0;
	
	grdResultsRow row = null;
	if (parentRow.getColExamName() == null)
		row = parentRow; 
	else	
		row = parentRow.getRows().newRow();

	if (voOrderInv.getDisplayDateTimeIsNotNull())
		row.setColDateTime(voOrderInv.getDisplayDateTime().toString(DateTimeFormat.STANDARD));

	if (voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getInvestigationIndexIsNotNull())
		row.setColExamName(voOrderInv.getInvestigation().getInvestigationIndex().getName());

	if (voOrderInv.getInvestigationIsNotNull() && voOrderInv.getInvestigation().getProviderServiceIsNotNull() 
		&& voOrderInv.getInvestigation().getProviderService().getLocationServiceIsNotNull() && voOrderInv.getInvestigation().getProviderService().getLocationService().getServiceIsNotNull())
		row.setColDepartment(voOrderInv.getInvestigation().getProviderService().getLocationService().getService().getServiceName());

	if (voOrderInv.getOrderDetailsIsNotNull())
		row.setColOrderingLocation(voOrderInv.getOrderDetails().getCorrectLocation());

	if (voOrderInv.getOrderDetailsIsNotNull())
		row.setColClinician(voOrderInv.getOrderDetails().getCorrectClinician());

	
	row.setBackColor(parentRow.getBackColor());
	row.setValue(voOrderInv);
	
	return 1;
}