Java Code Examples for ims.clinicaladmin.vo.TumourGroupVo

The following are top voted examples for showing how to use ims.clinicaladmin.vo.TumourGroupVo. 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: openMAXIMS   File: Logic.java   Source Code and License 7 votes vote down vote up
private void populateTitleLabels(Label label)
{
	if (form.getLocalContext().getSelectedRecordIsNotNull())
	{
		if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
		{
			label.setValue("Group : " + (((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getGroupNameIsNotNull() ? ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getGroupName() : "Unknown"));
		}
		else if (form.getLocalContext().getSelectedRecord() instanceof TumourSiteVo)
		{
			if (form.getLocalContext().getParentGroupIsNotNull())
			{
				label.setValue("Group : " + (((TumourGroupListVo) form.getLocalContext().getParentGroup()).getGroupNameIsNotNull() ? ((TumourGroupListVo) form.getLocalContext().getParentGroup()).getGroupName() : "Unknown") + ", Site : " + (((TumourSiteVo) form.getLocalContext().getSelectedRecord()).getNameIsNotNull() ? ((TumourSiteVo) form.getLocalContext().getSelectedRecord()).getName() : "Unknown"));
			}
		}
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void overallStaging()
{
	if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
	{
		form.getGlobalContext().ClinicalAdmin.setTumourGroup((TumourGroupVo) form.getLocalContext().getSelectedRecord());
		engine.open(form.getForms().ClinicalAdmin.TumourGroupOverallStaging);
		return;
	}
	
	if (form.getLocalContext().getSelectedRecord() instanceof TumourSiteVo)
	{
		form.getGlobalContext().ClinicalAdmin.setTumourGroup(domain.getGroup(form.getLocalContext().getParentGroup()));
		form.getGlobalContext().ClinicalAdmin.setTumourSite((TumourSiteVo) form.getLocalContext().getSelectedRecord());
		engine.open(form.getForms().ClinicalAdmin.TumourSiteOverallStaging);
		return;
	}
	
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onBtnCancelClick() throws PresentationLogicException
{
	reEnableTabs();

	populateTabWithSelectedNodValue(returnSelectedNod());
	if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
	{
		form.getLocalContext().setCurrentSelectedTab(TumourCategoryGroupSiteSelectedTab.GROUP);
		form.lyrConfig().showtabTGroup();
	}
	else if (form.getLocalContext().getSelectedRecord() instanceof TumourSiteVo)
	{
		form.getLocalContext().setCurrentSelectedTab(TumourCategoryGroupSiteSelectedTab.SITE);
		form.lyrConfig().showtabTSite();
	}

	form.setMode(FormMode.VIEW);
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private String[] validateSerumMarkers(TumourGroupVo voGroup)
{
	if (voGroup == null || voGroup.getSerumMarkers() == null)
		return null;
	Boolean flagDelete = false;
	TumourSerumMarkersLiteVoCollection tempVocol = voGroup.getSerumMarkers();
	TumourSerumMarkersLiteVoCollection tempVocol1 = new TumourSerumMarkersLiteVoCollection();
	for (int i = 0; i < tempVocol.size(); i++)
	{
		if (tempVocol.get(i).getSerumMarkerValue() == null || tempVocol.get(i).getSerumMarkerValue().toString().trim().length() == 0 || tempVocol.get(i).getSerumMarkerDescription() == null || tempVocol.get(i).getSerumMarkerDescription().toString().trim().length() == 0)
		{
			flagDelete = true;
			continue;
		}
		tempVocol1.add(tempVocol.get(i));
	}
	if (flagDelete == true)
	{
		voGroup.setSerumMarkers(tempVocol1);
		form.getLocalContext().setSelectedRecord(voGroup);
		form.getLocalContext().setSelectedSerumCollection(tempVocol1);
		return new String[] { "SerumMarkerValue and SerumMarkerDescription are mandatory." };
	}
	return null;

}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void rulesForGroup()
{
	if (form.getLocalContext().getSelectedRecordIsNotNull() && form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
	{
		// If Group have Overall Staging
		if (domain.countForOverallStaging((TumourGroupVo) form.getLocalContext().getSelectedRecord()) > 0)
		{
			enableTabs(false, false, true, false, true, true, false, false, true, true, true, false); // true, false);
		}
		else
		{				
			enableTabs(false, false, true, false, true, true, false, false, true, true, true, false);
		}
	}

	// Enable Speciality, Taxonomy and Differentiation tabs
	enableEmbeddedTabs(false, false, true, true, true);

	form.lyrConfig().showtabTGroup();
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLyrConfigTabTNM(ValueObject vo)
{
	// By default show all TNM
	form.lyrConfig().tabTNM().GroupTNMValues().setValue(GroupTNMValuesEnumeration.rdoAll);

	// Hide Taxonomy tab
	form.lyrConfig().tabTNM().lyrTNM().tabTNMMappings().setHeaderVisible(false);

	// Show active records
	form.lyrConfig().tabTNM().chkActiveTNM().setValue(true);

	if (vo instanceof TumourGroupVo)
	{
		populateLyrConfigTabTNMForGroup(vo);
	}
	else if (vo instanceof TumourSiteVo)
	{
		populateLyrConfigTabTNMForSite(vo);
	}
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLyrDetailsTabTNMDetails(TumourGroupVo voGroup) throws PresentationLogicException
{
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqHistology().setValue(voGroup.getHasTNM());

	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqSerumMarkers().setValue(voGroup.getTnmRequiresSMarkersIsNotNull() ? true : false);
	onChkReqSerumMarkersValueChanged();

	if (form.lyrConfig().tabSerumMarker().isHeaderVisible())
	{
		//  - add cod for this
			// Yeah, right - this was here from the first check in
	}

	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqDiff().setValue(voGroup.getTnmRequiresDiffIsNotNull() ? true : false);
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqO45().setValue(voGroup.getTnmRequiresOver45IsNotNull() ? true : false);
}
 
Example 8
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqSerumMarkersValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqSerumMarkers().getValue())
	{
		form.lyrConfig().tabSerumMarker().setHeaderVisible(true);
		form.lyrConfig().tabSerumMarker().setEnabled(true);
	}
	else
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresSMarkersIsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresSMarkers())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqSerumMarkers().setValue(true);
				}
			}
		}
	}
}
 
Example 9
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void displaySelectedTNMType(GroupTNMValuesEnumeration option)
{
	if (!form.getLocalContext().getSelectedRecordIsNotNull())
		return;

	ValueObject value = form.getLocalContext().getSelectedRecord();
	TumourGroupSiteTNMValueVoCollection voCollTNM = null;

	if (value instanceof TumourGroupVo)
	{
		voCollTNM = ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTNMValues();
	}
	else if (value instanceof TumourSiteVo)
	{
		voCollTNM = ((TumourSiteVo) form.getLocalContext().getSelectedRecord()).getTNMValues();
	}

	populateScreenFromDataForLyrConfigTabTNM(voCollTNM, option, form.lyrConfig().tabTNM().chkActiveTNM().getValue());
}
 
Example 10
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqDiffValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqDiff().getValue() == false)
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresDiffIsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresDiff())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqDiff().setValue(true);
				}
			}
		}
	}
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqHistologyValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqHistology().getValue() == false)
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresHistoIsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresHisto())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqHistology().setValue(true);
				}
			}
		}
	}
}
 
Example 12
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqO45ValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqO45().getValue() == false)
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresOver45IsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresOver45())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqO45().setValue(true);
				}
			}
		}
	}
}
 
Example 13
Project: AvoinApotti   File: TumourCategoryGroupSitesImpl.java   Source Code and License 6 votes vote down vote up
public TumourGroupVo saveGroup(TumourGroupVo voGroup, TumourCategoryVersionGroupsLiteVo version) throws StaleObjectException, UniqueKeyViolationException
{
	if (voGroup == null || version == null)
		throw new DomainRuntimeException("Invalid record to save");
	
	if (!voGroup.isValidated() || !version.isValidated())
		throw new DomainRuntimeException("Record to save not validated");
	
	TumourCategoryVersionGroups domVersion = (TumourCategoryVersionGroups) getDomainFactory().getDomainObject(version);
	TumourGroup domGroup = TumourGroupVoAssembler.extractTumourGroup(getDomainFactory(), voGroup);
	
	if (voGroup.getID_TumourGroupIsNotNull())
	{
		// Actually an edit - no need to save at version level
		getDomainFactory().save(domGroup);
		
		return TumourGroupVoAssembler.create(domGroup);
	}
	
	// A new group is created - we need to save the group at Version level
	domVersion.getGroups().add(domGroup);
	
	getDomainFactory().save(domVersion);

	return TumourGroupVoAssembler.create(domGroup);
}
 
Example 14
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqHistologyValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqHistology().getValue() == false)
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresHistoIsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresHisto())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqHistology().setValue(true);
				}
			}
		}
	}
}
 
Example 15
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void overallStaging()
{
	if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
	{
		form.getGlobalContext().ClinicalAdmin.setTumourGroup((TumourGroupVo) form.getLocalContext().getSelectedRecord());
		engine.open(form.getForms().ClinicalAdmin.TumourGroupOverallStaging);
		return;
	}
	
	if (form.getLocalContext().getSelectedRecord() instanceof TumourSiteVo)
	{
		form.getGlobalContext().ClinicalAdmin.setTumourGroup(domain.getGroup(form.getLocalContext().getParentGroup()));
		form.getGlobalContext().ClinicalAdmin.setTumourSite((TumourSiteVo) form.getLocalContext().getSelectedRecord());
		engine.open(form.getForms().ClinicalAdmin.TumourSiteOverallStaging);
		return;
	}
	
}
 
Example 16
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onBtnCancelClick() throws PresentationLogicException
{
	reEnableTabs();

	populateTabWithSelectedNodValue(returnSelectedNod());
	if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
	{
		form.getLocalContext().setCurrentSelectedTab(TumourCategoryGroupSiteSelectedTab.GROUP);
		form.lyrConfig().showtabTGroup();
	}
	else if (form.getLocalContext().getSelectedRecord() instanceof TumourSiteVo)
	{
		form.getLocalContext().setCurrentSelectedTab(TumourCategoryGroupSiteSelectedTab.SITE);
		form.lyrConfig().showtabTSite();
	}

	form.setMode(FormMode.VIEW);
}
 
Example 17
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private String[] validateSerumMarkers(TumourGroupVo voGroup)
{
	if (voGroup == null || voGroup.getSerumMarkers() == null)
		return null;
	Boolean flagDelete = false;
	TumourSerumMarkersLiteVoCollection tempVocol = voGroup.getSerumMarkers();
	TumourSerumMarkersLiteVoCollection tempVocol1 = new TumourSerumMarkersLiteVoCollection();
	for (int i = 0; i < tempVocol.size(); i++)
	{
		if (tempVocol.get(i).getSerumMarkerValue() == null || tempVocol.get(i).getSerumMarkerValue().toString().trim().length() == 0 || tempVocol.get(i).getSerumMarkerDescription() == null || tempVocol.get(i).getSerumMarkerDescription().toString().trim().length() == 0)
		{
			flagDelete = true;
			continue;
		}
		tempVocol1.add(tempVocol.get(i));
	}
	if (flagDelete == true)
	{
		voGroup.setSerumMarkers(tempVocol1);
		form.getLocalContext().setSelectedRecord(voGroup);
		form.getLocalContext().setSelectedSerumCollection(tempVocol1);
		return new String[] { "SerumMarkerValue and SerumMarkerDescription are mandatory." };
	}
	return null;

}
 
Example 18
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void rulesForGroup()
{
	if (form.getLocalContext().getSelectedRecordIsNotNull() && form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
	{
		// If Group have Overall Staging
		if (domain.countForOverallStaging((TumourGroupVo) form.getLocalContext().getSelectedRecord()) > 0)
		{
			enableTabs(false, false, true, false, true, true, false, false, true, true, true, false); // true, false);
		}
		else
		{				
			enableTabs(false, false, true, false, true, true, false, false, true, true, true, false);
		}
	}

	// Enable Speciality, Taxonomy and Differentiation tabs
	enableEmbeddedTabs(false, false, true, true, true);

	form.lyrConfig().showtabTGroup();
}
 
Example 19
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLyrConfigTabTNM(ValueObject vo)
{
	// By default show all TNM
	form.lyrConfig().tabTNM().GroupTNMValues().setValue(GroupTNMValuesEnumeration.rdoAll);

	// Hide Taxonomy tab
	form.lyrConfig().tabTNM().lyrTNM().tabTNMMappings().setHeaderVisible(false);

	// Show active records
	form.lyrConfig().tabTNM().chkActiveTNM().setValue(true);

	if (vo instanceof TumourGroupVo)
	{
		populateLyrConfigTabTNMForGroup(vo);
	}
	else if (vo instanceof TumourSiteVo)
	{
		populateLyrConfigTabTNMForSite(vo);
	}
}
 
Example 20
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLyrDetailsTabTNMDetails(TumourGroupVo voGroup) throws PresentationLogicException
{
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqHistology().setValue(voGroup.getHasTNM());

	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqSerumMarkers().setValue(voGroup.getTnmRequiresSMarkersIsNotNull() ? true : false);
	onChkReqSerumMarkersValueChanged();

	if (form.lyrConfig().tabSerumMarker().isHeaderVisible())
	{
		//  - add cod for this
			// Yeah, right - this was here from the first check in
	}

	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqDiff().setValue(voGroup.getTnmRequiresDiffIsNotNull() ? true : false);
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqO45().setValue(voGroup.getTnmRequiresOver45IsNotNull() ? true : false);
}
 
Example 21
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqSerumMarkersValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqSerumMarkers().getValue())
	{
		form.lyrConfig().tabSerumMarker().setHeaderVisible(true);
		form.lyrConfig().tabSerumMarker().setEnabled(true);
	}
	else
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresSMarkersIsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresSMarkers())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqSerumMarkers().setValue(true);
				}
			}
		}
	}
}
 
Example 22
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqDiffValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqDiff().getValue() == false)
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresDiffIsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresDiff())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqDiff().setValue(true);
				}
			}
		}
	}
}
 
Example 23
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqHistologyValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqHistology().getValue() == false)
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresHistoIsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresHisto())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqHistology().setValue(true);
				}
			}
		}
	}
}
 
Example 24
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqO45ValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqO45().getValue() == false)
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresOver45IsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresOver45())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqO45().setValue(true);
				}
			}
		}
	}
}
 
Example 25
Project: openMAXIMS   File: TumourCategoryGroupSitesImpl.java   Source Code and License 6 votes vote down vote up
public TumourGroupVo saveGroup(TumourGroupVo voGroup, TumourCategoryVersionGroupsLiteVo version) throws StaleObjectException, UniqueKeyViolationException
{
	if (voGroup == null || version == null)
		throw new DomainRuntimeException("Invalid record to save");
	
	if (!voGroup.isValidated() || !version.isValidated())
		throw new DomainRuntimeException("Record to save not validated");
	
	TumourCategoryVersionGroups domVersion = (TumourCategoryVersionGroups) getDomainFactory().getDomainObject(version);
	TumourGroup domGroup = TumourGroupVoAssembler.extractTumourGroup(getDomainFactory(), voGroup);
	
	if (voGroup.getID_TumourGroupIsNotNull())
	{
		// Actually an edit - no need to save at version level
		getDomainFactory().save(domGroup);
		
		return TumourGroupVoAssembler.create(domGroup);
	}
	
	// A new group is created - we need to save the group at Version level
	domVersion.getGroups().add(domGroup);
	
	getDomainFactory().save(domVersion);

	return TumourGroupVoAssembler.create(domGroup);
}
 
Example 26
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void overallStaging()
{
	if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
	{
		form.getGlobalContext().ClinicalAdmin.setTumourGroup((TumourGroupVo) form.getLocalContext().getSelectedRecord());
		engine.open(form.getForms().ClinicalAdmin.TumourGroupOverallStaging);
		return;
	}
	
	if (form.getLocalContext().getSelectedRecord() instanceof TumourSiteVo)
	{
		form.getGlobalContext().ClinicalAdmin.setTumourGroup(domain.getGroup(form.getLocalContext().getParentGroup()));
		form.getGlobalContext().ClinicalAdmin.setTumourSite((TumourSiteVo) form.getLocalContext().getSelectedRecord());
		engine.open(form.getForms().ClinicalAdmin.TumourSiteOverallStaging);
		return;
	}
	
}
 
Example 27
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqDiffValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqDiff().getValue() == false)
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresDiffIsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresDiff())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqDiff().setValue(true);
				}
			}
		}
	}
}
 
Example 28
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onBtnCancelClick() throws PresentationLogicException
{
	reEnableTabs();

	populateTabWithSelectedNodValue(returnSelectedNod());
	if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
	{
		form.getLocalContext().setCurrentSelectedTab(TumourCategoryGroupSiteSelectedTab.GROUP);
		form.lyrConfig().showtabTGroup();
	}
	else if (form.getLocalContext().getSelectedRecord() instanceof TumourSiteVo)
	{
		form.getLocalContext().setCurrentSelectedTab(TumourCategoryGroupSiteSelectedTab.SITE);
		form.lyrConfig().showtabTSite();
	}

	form.setMode(FormMode.VIEW);
}
 
Example 29
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private String[] validateSerumMarkers(TumourGroupVo voGroup)
{
	if (voGroup == null || voGroup.getSerumMarkers() == null)
		return null;
	Boolean flagDelete = false;
	TumourSerumMarkersLiteVoCollection tempVocol = voGroup.getSerumMarkers();
	TumourSerumMarkersLiteVoCollection tempVocol1 = new TumourSerumMarkersLiteVoCollection();
	for (int i = 0; i < tempVocol.size(); i++)
	{
		if (tempVocol.get(i).getSerumMarkerValue() == null || tempVocol.get(i).getSerumMarkerValue().toString().trim().length() == 0 || tempVocol.get(i).getSerumMarkerDescription() == null || tempVocol.get(i).getSerumMarkerDescription().toString().trim().length() == 0)
		{
			flagDelete = true;
			continue;
		}
		tempVocol1.add(tempVocol.get(i));
	}
	if (flagDelete == true)
	{
		voGroup.setSerumMarkers(tempVocol1);
		form.getLocalContext().setSelectedRecord(voGroup);
		form.getLocalContext().setSelectedSerumCollection(tempVocol1);
		return new String[] { "SerumMarkerValue and SerumMarkerDescription are mandatory." };
	}
	return null;

}
 
Example 30
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void rulesForGroup()
{
	if (form.getLocalContext().getSelectedRecordIsNotNull() && form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
	{
		// If Group have Overall Staging
		if (domain.countForOverallStaging((TumourGroupVo) form.getLocalContext().getSelectedRecord()) > 0)
		{
			enableTabs(false, false, true, false, true, true, false, false, true, true, true, false); // true, false);
		}
		else
		{				
			enableTabs(false, false, true, false, true, true, false, false, true, true, true, false);
		}
	}

	// Enable Speciality, Taxonomy and Differentiation tabs
	enableEmbeddedTabs(false, false, true, true, true);

	form.lyrConfig().showtabTGroup();
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLyrConfigTabTNM(ValueObject vo)
{
	// By default show all TNM
	form.lyrConfig().tabTNM().GroupTNMValues().setValue(GroupTNMValuesEnumeration.rdoAll);

	// Hide Taxonomy tab
	form.lyrConfig().tabTNM().lyrTNM().tabTNMMappings().setHeaderVisible(false);

	// Show active records
	form.lyrConfig().tabTNM().chkActiveTNM().setValue(true);

	if (vo instanceof TumourGroupVo)
	{
		populateLyrConfigTabTNMForGroup(vo);
	}
	else if (vo instanceof TumourSiteVo)
	{
		populateLyrConfigTabTNMForSite(vo);
	}
}
 
Example 32
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLyrDetailsTabTNMDetails(TumourGroupVo voGroup) throws PresentationLogicException
{
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqHistology().setValue(voGroup.getHasTNM());

	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqSerumMarkers().setValue(voGroup.getTnmRequiresSMarkersIsNotNull() ? true : false);
	onChkReqSerumMarkersValueChanged();

	if (form.lyrConfig().tabSerumMarker().isHeaderVisible())
	{
		//  - add cod for this
			// Yeah, right - this was here from the first check in
	}

	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqDiff().setValue(voGroup.getTnmRequiresDiffIsNotNull() ? true : false);
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqO45().setValue(voGroup.getTnmRequiresOver45IsNotNull() ? true : false);
}
 
Example 33
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqO45ValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqO45().getValue() == false)
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresOver45IsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresOver45())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqO45().setValue(true);
				}
			}
		}
	}
}
 
Example 34
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void displaySelectedTNMType(GroupTNMValuesEnumeration option)
{
	if (!form.getLocalContext().getSelectedRecordIsNotNull())
		return;

	ValueObject value = form.getLocalContext().getSelectedRecord();
	TumourGroupSiteTNMValueVoCollection voCollTNM = null;

	if (value instanceof TumourGroupVo)
	{
		voCollTNM = ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTNMValues();
	}
	else if (value instanceof TumourSiteVo)
	{
		voCollTNM = ((TumourSiteVo) form.getLocalContext().getSelectedRecord()).getTNMValues();
	}

	populateScreenFromDataForLyrConfigTabTNM(voCollTNM, option, form.lyrConfig().tabTNM().chkActiveTNM().getValue());
}
 
Example 35
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqDiffValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqDiff().getValue() == false)
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresDiffIsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresDiff())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqDiff().setValue(true);
				}
			}
		}
	}
}
 
Example 36
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqHistologyValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqHistology().getValue() == false)
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresHistoIsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresHisto())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqHistology().setValue(true);
				}
			}
		}
	}
}
 
Example 37
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqO45ValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqO45().getValue() == false)
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresOver45IsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresOver45())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqO45().setValue(true);
				}
			}
		}
	}
}
 
Example 38
Project: openMAXIMS   File: TumourCategoryGroupSitesImpl.java   Source Code and License 6 votes vote down vote up
public TumourGroupVo saveGroup(TumourGroupVo voGroup, TumourCategoryVersionGroupsLiteVo version) throws StaleObjectException, UniqueKeyViolationException
{
	if (voGroup == null || version == null)
		throw new DomainRuntimeException("Invalid record to save");
	
	if (!voGroup.isValidated() || !version.isValidated())
		throw new DomainRuntimeException("Record to save not validated");
	
	TumourCategoryVersionGroups domVersion = (TumourCategoryVersionGroups) getDomainFactory().getDomainObject(version);
	TumourGroup domGroup = TumourGroupVoAssembler.extractTumourGroup(getDomainFactory(), voGroup);
	
	if (voGroup.getID_TumourGroupIsNotNull())
	{
		// Actually an edit - no need to save at version level
		getDomainFactory().save(domGroup);
		
		return TumourGroupVoAssembler.create(domGroup);
	}
	
	// A new group is created - we need to save the group at Version level
	domVersion.getGroups().add(domGroup);
	
	getDomainFactory().save(domVersion);

	return TumourGroupVoAssembler.create(domGroup);
}
 
Example 39
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void overallStaging()
{
	if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
	{
		form.getGlobalContext().ClinicalAdmin.setTumourGroup((TumourGroupVo) form.getLocalContext().getSelectedRecord());
		engine.open(form.getForms().ClinicalAdmin.TumourGroupOverallStaging);
		return;
	}
	
	if (form.getLocalContext().getSelectedRecord() instanceof TumourSiteVo)
	{
		form.getGlobalContext().ClinicalAdmin.setTumourGroup(domain.getGroup(form.getLocalContext().getParentGroup()));
		form.getGlobalContext().ClinicalAdmin.setTumourSite((TumourSiteVo) form.getLocalContext().getSelectedRecord());
		engine.open(form.getForms().ClinicalAdmin.TumourSiteOverallStaging);
		return;
	}
	
}
 
Example 40
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onBtnCancelClick() throws PresentationLogicException
{
	reEnableTabs();

	populateTabWithSelectedNodValue(returnSelectedNod());
	if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
	{
		form.getLocalContext().setCurrentSelectedTab(TumourCategoryGroupSiteSelectedTab.GROUP);
		form.lyrConfig().showtabTGroup();
	}
	else if (form.getLocalContext().getSelectedRecord() instanceof TumourSiteVo)
	{
		form.getLocalContext().setCurrentSelectedTab(TumourCategoryGroupSiteSelectedTab.SITE);
		form.lyrConfig().showtabTSite();
	}

	form.setMode(FormMode.VIEW);
}
 
Example 41
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private String[] validateSerumMarkers(TumourGroupVo voGroup)
{
	if (voGroup == null || voGroup.getSerumMarkers() == null)
		return null;
	Boolean flagDelete = false;
	TumourSerumMarkersLiteVoCollection tempVocol = voGroup.getSerumMarkers();
	TumourSerumMarkersLiteVoCollection tempVocol1 = new TumourSerumMarkersLiteVoCollection();
	for (int i = 0; i < tempVocol.size(); i++)
	{
		if (tempVocol.get(i).getSerumMarkerValue() == null || tempVocol.get(i).getSerumMarkerValue().toString().trim().length() == 0 || tempVocol.get(i).getSerumMarkerDescription() == null || tempVocol.get(i).getSerumMarkerDescription().toString().trim().length() == 0)
		{
			flagDelete = true;
			continue;
		}
		tempVocol1.add(tempVocol.get(i));
	}
	if (flagDelete == true)
	{
		voGroup.setSerumMarkers(tempVocol1);
		form.getLocalContext().setSelectedRecord(voGroup);
		form.getLocalContext().setSelectedSerumCollection(tempVocol1);
		return new String[] { "SerumMarkerValue and SerumMarkerDescription are mandatory." };
	}
	return null;

}
 
Example 42
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void rulesForGroup()
{
	if (form.getLocalContext().getSelectedRecordIsNotNull() && form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
	{
		// If Group have Overall Staging
		if (domain.countForOverallStaging((TumourGroupVo) form.getLocalContext().getSelectedRecord()) > 0)
		{
			enableTabs(false, false, true, false, true, true, false, false, true, true, true, false); // true, false);
		}
		else
		{				
			enableTabs(false, false, true, false, true, true, false, false, true, true, true, false);
		}
	}

	// Enable Speciality, Taxonomy and Differentiation tabs
	enableEmbeddedTabs(false, false, true, true, true);

	form.lyrConfig().showtabTGroup();
}
 
Example 43
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLyrConfigTabTNM(ValueObject vo)
{
	// By default show all TNM
	form.lyrConfig().tabTNM().GroupTNMValues().setValue(GroupTNMValuesEnumeration.rdoAll);

	// Hide Taxonomy tab
	form.lyrConfig().tabTNM().lyrTNM().tabTNMMappings().setHeaderVisible(false);

	// Show active records
	form.lyrConfig().tabTNM().chkActiveTNM().setValue(true);

	if (vo instanceof TumourGroupVo)
	{
		populateLyrConfigTabTNMForGroup(vo);
	}
	else if (vo instanceof TumourSiteVo)
	{
		populateLyrConfigTabTNMForSite(vo);
	}
}
 
Example 44
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateLyrDetailsTabTNMDetails(TumourGroupVo voGroup) throws PresentationLogicException
{
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqHistology().setValue(voGroup.getHasTNM());

	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqSerumMarkers().setValue(voGroup.getTnmRequiresSMarkersIsNotNull() ? true : false);
	onChkReqSerumMarkersValueChanged();

	if (form.lyrConfig().tabSerumMarker().isHeaderVisible())
	{
		//  - add cod for this
			// Yeah, right - this was here from the first check in
	}

	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqDiff().setValue(voGroup.getTnmRequiresDiffIsNotNull() ? true : false);
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqO45().setValue(voGroup.getTnmRequiresOver45IsNotNull() ? true : false);
}
 
Example 45
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onChkReqSerumMarkersValueChanged() throws PresentationLogicException
{
	if (form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqSerumMarkers().getValue())
	{
		form.lyrConfig().tabSerumMarker().setHeaderVisible(true);
		form.lyrConfig().tabSerumMarker().setEnabled(true);
	}
	else
	{
		if (form.getLocalContext().getSelectedRecordIsNotNull())
		{
			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				if (form.getLocalContext().getHasOverallIsNotNull() && form.getLocalContext().getHasOverall() == true && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresSMarkersIsNotNull() && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTnmRequiresSMarkers())
				{
					displayErrorMessage("An Overall configuration exists!", true);
					form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqSerumMarkers().setValue(true);
				}
			}
		}
	}
}
 
Example 46
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void displaySelectedTNMType(GroupTNMValuesEnumeration option)
{
	if (!form.getLocalContext().getSelectedRecordIsNotNull())
		return;

	ValueObject value = form.getLocalContext().getSelectedRecord();
	TumourGroupSiteTNMValueVoCollection voCollTNM = null;

	if (value instanceof TumourGroupVo)
	{
		voCollTNM = ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTNMValues();
	}
	else if (value instanceof TumourSiteVo)
	{
		voCollTNM = ((TumourSiteVo) form.getLocalContext().getSelectedRecord()).getTNMValues();
	}

	populateScreenFromDataForLyrConfigTabTNM(voCollTNM, option, form.lyrConfig().tabTNM().chkActiveTNM().getValue());
}
 
Example 47
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateTitleLabels(Label label)
{
	if (form.getLocalContext().getSelectedRecordIsNotNull())
	{
		if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
		{
			label.setValue("Group : " + (((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getGroupNameIsNotNull() ? ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getGroupName() : "Unknown"));
		}
		else if (form.getLocalContext().getSelectedRecord() instanceof TumourSiteVo)
		{
			if (form.getLocalContext().getParentGroupIsNotNull())
			{
				label.setValue("Group : " + (((TumourGroupListVo) form.getLocalContext().getParentGroup()).getGroupNameIsNotNull() ? ((TumourGroupListVo) form.getLocalContext().getParentGroup()).getGroupName() : "Unknown") + ", Site : " + (((TumourSiteVo) form.getLocalContext().getSelectedRecord()).getNameIsNotNull() ? ((TumourSiteVo) form.getLocalContext().getSelectedRecord()).getName() : "Unknown"));
			}
		}
	}
}
 
Example 48
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void overallPrognostic()
{
	if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
	{
		form.getGlobalContext().ClinicalAdmin.setTumourGroup((TumourGroupVo) form.getLocalContext().getSelectedRecord());
		engine.open(form.getForms().ClinicalAdmin.TumourGroupOverallPrognostic);
	}
}
 
Example 49
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean checkFostActiveGroupsOrSitesRecords()
{
	String errors = new String();

	if (form.getLocalContext().getSelectedRecord() instanceof TumourCategoryVo)
	{
		if ((domain.countForActiveGroupOrSite(form.getLocalContext().getSelectedRecord()).intValue()) > 0)
		{
			errors = ("This tumour category has active tumour groups so may not be deactivated.");
		}
	}
	else if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
	{
		if ((domain.countForActiveGroupOrSite(form.getLocalContext().getSelectedRecord()).intValue()) > 0)
		{
			errors = ("This tumour Group has active Sites so may not be deactivated.");
		}
	}

	if (errors.length() > 0)
	{
		displayErrorMessage(errors, true);

		return true;
	}
	return false;
}
 
Example 50
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateLyrConfigTabTNMForGroup(ValueObject vo)
{
	enableTNMContextMenu(Boolean.TRUE);
	populateScreenFromDataForLyrConfigTabTNM(((TumourGroupVo) vo).getTNMValues(), GroupTNMValuesEnumeration.rdoAll, true);

	String groupName = (((TumourGroupVo) vo).getGroupNameIsNotNull() ? ((TumourGroupVo) vo).getGroupName() : "");

	// Populate labelTitle with the text of the Tumour group and site selected
	form.lyrConfig().tabTNM().lblTitle().setValue("Group selected : " + groupName.toUpperCase());
}
 
Example 51
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateLyrDetailsTabGroupTNM(TumourGroupVo voGroup)
{
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqHistology().setValue((voGroup.getTnmRequiresHistoIsNotNull() ? voGroup.getTnmRequiresHisto() : false));
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqSerumMarkers().setValue((voGroup.getTnmRequiresSMarkersIsNotNull() ? voGroup.getTnmRequiresSMarkers() : false));
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqDiff().setValue((voGroup.getTnmRequiresDiffIsNotNull() ? voGroup.getTnmRequiresDiff() : false));
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqO45().setValue((voGroup.getTnmRequiresOver45IsNotNull() ? voGroup.getTnmRequiresOver45() : false));
}
 
Example 52
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateLyrDetailsTabSpecialty(TumourGroupVo voGroup)
{
	if (voGroup != null)
	{
		TumourGroupSpecialtyVoCollection specialties = (voGroup.getAssociatedSpecialtiesIsNotNull() ? voGroup.getAssociatedSpecialties() : null);
		populateSpecialtyTree(specialties);
		form.getLocalContext().setSpecialtiesSavedCollection(specialties);
	}
}
 
Example 53
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateLyrDetailsTabConffiguration(TumourGroupVo voGroup)
{
	enableClassificationContextMenu(Boolean.TRUE);
	if (voGroup == null)
		return;

	populateClassificationTree(voGroup.getOtherClassifications());

	form.getLocalContext().setOtherClassificationSavedCollection(voGroup.getOtherClassifications());
}
 
Example 54
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateLyrDetailsTabDifferentation(TumourGroupVo voGroup)
	{
		initialiseDifferentationDynamicGrid();
		form.lyrConfig().tabHistologyGrade().dyngrdDifferentation().getRows().clear();
		TumourGroupHistopathologyGradeVoCollection voColl = voGroup.getHistopathologicGrades();

		for (int i = 0; voColl != null && i < voColl.size(); i++)
		{
			TumourGroupHistopathologyGradeVo tumourGroupHistopathologicGrade = voColl.get(i);
			
			DynamicGridRow row = form.lyrConfig().tabHistologyGrade().dyngrdDifferentation().getRows().newRow();

			DynamicGridCell diffCell = row.getCells().newCell(getDiffColumn(COLDIFF), DynamicCellType.STRING);

			diffCell.setValue(tumourGroupHistopathologicGrade.getTumourDifferentation().toString());
			diffCell.setIdentifier(tumourGroupHistopathologicGrade.getTumourDifferentation().getTumourDifferentation());
			
			diffCell = row.getCells().newCell(getDiffColumn(COLGRADE), DynamicCellType.STRING);
			diffCell.setValue(tumourGroupHistopathologicGrade.getTumourDifferentation().getGrade());
			
			row.setTextColor(Boolean.TRUE.equals(tumourGroupHistopathologicGrade.getIsActive()) ? Color.Black : Color.Gray);
			
			row.setValue(tumourGroupHistopathologicGrade);
		}

//		form.getLocalContext().setDifferentationCollection(domain.listAllTumourDiffs());
//		form.getLocalContext().setDifferentationSavedCollection(voColl);
	}
 
Example 55
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void initializeTabTNM(boolean isEnabled)
	{
		if (!isEnabled &&
		// If is not a new group
		form.getLocalContext().getSelectedRecordIsNotNull() && form.getLocalContext().getSelectedRecord() instanceof TumourGroupRefVo)
		{
			if (checkIfGroupHaveSiteWhoHaveTNM())
			{
				form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGroupDetails().chkHasTNM().setValue(true);
				return;
			}
		}
		else
		{
//			form.lyrConfig().tabTGroup().lyrGroupDetails().showtabGroupTNM();

			if (form.getLocalContext().getSelectedRecordIsNotNull() && form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo && ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getID_TumourGroup() == null)
			{
				form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqHistology().setValue(false);
				form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqSerumMarkers().setValue(false);
				form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqDiff().setValue(false);
				form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().chkReqO45().setValue(false);
			}
		}

		// activate tabTNM
		form.lyrConfig().tabTGroup().lyrGroupDetails().tabGroupTNM().setHeaderVisible(isEnabled);

//		if (!isEnabled)
//			form.lyrConfig().tabTGroup().lyrGroupDetails().showtabSpecialty();
		// activate tabTNM
		form.lyrConfig().tabTNM().setHeaderVisible(isEnabled);
		form.lyrConfig().tabTNM().setHeaderEnabled(isEnabled);
		form.lyrConfig().tabTNM().setEnabled(isEnabled);
		form.lyrConfig().tabTNM().chkActiveTNM().setValue(true);
		// form.lyrConfig().tabTNM().chkActiveTNM().setValue(isEnabled);
		displayTNMValueMappingsTab(!isEnabled);
		initialiseTNMDynamicGrid(false);

	}
 
Example 56
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onChkActiveTNMValueChanged() throws PresentationLogicException
{
	if (form.getMode().equals(FormMode.VIEW))
	{
		if (!form.lyrConfig().tabTNM().chkActiveTNM().getValue())
		{
			// Reinitialize dynGrid: add new Active coll
			initialiseTNMDynamicGrid(true);

			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				populateScreenFromDataForLyrConfigTabTNM(((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTNMValues(), form.lyrConfig().tabTNM().GroupTNMValues().getValue(), false);
			}
			else if (form.getLocalContext().getSelectedRecord() instanceof TumourSiteVo)
			{
				populateScreenFromDataForLyrConfigTabTNM(((TumourSiteVo) form.getLocalContext().getSelectedRecord()).getTNMValues(), form.lyrConfig().tabTNM().GroupTNMValues().getValue(), false);
			}
		}
		else
		{
			// Reinitialize dynGrid: add new Active coll
			initialiseTNMDynamicGrid(false);

			if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
			{
				populateScreenFromDataForLyrConfigTabTNM(((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getTNMValues(), form.lyrConfig().tabTNM().GroupTNMValues().getValue(), true);
			}
			else if (form.getLocalContext().getSelectedRecord() instanceof TumourSiteVo)
			{
				populateScreenFromDataForLyrConfigTabTNM(((TumourSiteVo) form.getLocalContext().getSelectedRecord()).getTNMValues(), form.lyrConfig().tabTNM().GroupTNMValues().getValue(), true);
			}
		}
	}
}
 
Example 57
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateTitleLabels(Label label)
{
	if (form.getLocalContext().getSelectedRecordIsNotNull())
	{
		if (form.getLocalContext().getSelectedRecord() instanceof TumourGroupVo)
		{
			label.setValue("Group : " + (((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getGroupNameIsNotNull() ? ((TumourGroupVo) form.getLocalContext().getSelectedRecord()).getGroupName() : "Unknown"));
		}
		else if (form.getLocalContext().getSelectedRecord() instanceof TumourSiteVo)
		{
			if (form.getLocalContext().getParentGroupIsNotNull())
			{
				label.setValue("Group : " + (((TumourGroupListVo) form.getLocalContext().getParentGroup()).getGroupNameIsNotNull() ? ((TumourGroupListVo) form.getLocalContext().getParentGroup()).getGroupName() : "Unknown") + ", Site : " + (((TumourSiteVo) form.getLocalContext().getSelectedRecord()).getNameIsNotNull() ? ((TumourSiteVo) form.getLocalContext().getSelectedRecord()).getName() : "Unknown"));
			}
		}
	}
}
 
Example 58
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * 
 * @param tumourGroup
 */
private void populateTabPageGleasonContainer(TumourGroupVo tumourGroup)
{
	// Check if refresh is needed
	if (!Boolean.TRUE.equals(form.getLocalContext().getRefreshGleasonTab()))
		return;
	
	// Mark this tab as have been populated
	form.getLocalContext().setRefreshGleasonTab(Boolean.FALSE);

	// Clear grid
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGleason().grdGleason().getRows().clear();
	
	// Check tumour group and records
	if (tumourGroup == null || !tumourGroup.getPrognosticGroupingConfigIsNotNull() || !tumourGroup.getPrognosticGroupingConfig().getGleasonIsNotNull())
		return;
	
	// Populate records to grid
	for (GleasonConfigLiteVo gleasonRecord : tumourGroup.getPrognosticGroupingConfig().getGleason())
	{
		grdGleasonRow gleasonRow = form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageGleason().grdGleason().getRows().newRow();
		
		gleasonRow.setColGleason(gleasonRecord.getGleasonName());
		
		gleasonRow.setValue(gleasonRecord);
	}
}
 
Example 59
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * 
 * @param tumourGroup
 */
private void populateTabPageTumourPSAContainer(TumourGroupVo tumourGroup)
{
	// Check if refresh is needed
	if (!Boolean.TRUE.equals(form.getLocalContext().getRefreshPSATab()))
		return;
	
	// Mark this tab as have been populated
	form.getLocalContext().setRefreshPSATab(Boolean.FALSE);

	// Clear grid
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabPagePSA().grdPSA().getRows().clear();
	
	// Check tumour group and records
	if (tumourGroup == null || !tumourGroup.getPrognosticGroupingConfigIsNotNull() || !tumourGroup.getPrognosticGroupingConfig().getPSAIsNotNull())
		return;
	
	// Populate records to grid
	for (PSAConfigVo psaRecord : tumourGroup.getPrognosticGroupingConfig().getPSA())
	{
		grdPSARow psaRow = form.lyrConfig().tabTGroup().lyrGroupDetails().tabPagePSA().grdPSA().getRows().newRow();
		
		psaRow.setColPSA(psaRecord.getPSAName());
		
		psaRow.setValue(psaRecord);
	}
}
 
Example 60
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * 
 * @param tumourGroup
 */
private void populateTabPageTumourRiskCategoryContainer(TumourGroupVo tumourGroup)
{
	// Check if refresh is needed
	if (!Boolean.TRUE.equals(form.getLocalContext().getRefreshRiskCategoryTab()))
		return;
	
	// Mark this tab as have been populated
	form.getLocalContext().setRefreshRiskCategoryTab(Boolean.FALSE);

	// Clear grid
	form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageRiskCategory().grdRiskCategory().getRows().clear();
	
	// Check tumour group and records
	if (tumourGroup == null || !tumourGroup.getPrognosticGroupingConfigIsNotNull() || !tumourGroup.getPrognosticGroupingConfig().getRiskIsNotNull())
		return;
	
	// Populate records to grid
	for (PrognosticRiskConfigVo riskRecord : tumourGroup.getPrognosticGroupingConfig().getRisk())
	{
		grdRiskCategoryRow riskRow = form.lyrConfig().tabTGroup().lyrGroupDetails().tabPageRiskCategory().grdRiskCategory().getRows().newRow();
		
		riskRow.setColRiskCategory(riskRecord.getRiskName());
		
		riskRow.setValue(riskRecord);
	}
}