Java Code Examples for ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVoCollection

The following are top voted examples for showing how to use ims.clinicaladmin.vo.TumourGroupSiteTNMValueListVoCollection. 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   View source code 5 votes vote down vote up
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
	if (form.getGlobalContext().Oncology.getSelectedRecordForOverallDialogIsNotNull())
	{
		ValueObjectRef voSiteRef  = form.getGlobalContext().Oncology.getSelectedRecordForOverallDialog().getSelectedSiteRecord();
		ValueObjectRef voGroupRef = form.getGlobalContext().Oncology.getSelectedRecordForOverallDialog().getSelectedGroupRecord();
		TumourGroupSiteForOverallStagingDialogVo voGroup = domain.getGroupForOverallStaging((TumourGroupRefVo)voGroupRef);
		
		// WDEV-13091
		// This check theoretically should not fail, but
		if (voGroup == null)
			throw new PresentationLogicException("Minimal context for form is not met");
		
		form.getLocalContext().setSelectedGroup(null);
		if (voGroup != null)
			form.getLocalContext().setSelectedGroup(voGroup);
		
		//if dialog is open from Group
		if (voSiteRef == null)
		{
			populateComboBoxes(voGroup, null, voGroup.getTNMValues());
		}
		//if dialog is open from Site
		else
		{
			TumourGroupSiteTNMValueListVoCollection voCollTNM = domain.getTNMValueForSite((TumourSiteRefVo)voSiteRef);
			
			TumourSiteVo voSite = domain.getSiteVo((TumourSiteRefVo)voSiteRef);
			form.getLocalContext().setSelectedSite(null);
			if (voSite != null)
				form.getLocalContext().setSelectedSite(voSite);
			
			populateComboBoxes(voGroup, voSite, voCollTNM);
		}
	} 
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void populateTNMCmbs(TumourGroupSiteTNMValueListVoCollection voCollTNM) 
{	
	TumourGroupSiteTNMValueListVoCollection voTNMTypeT = new TumourGroupSiteTNMValueListVoCollection(); 
	TumourGroupSiteTNMValueListVoCollection voTNMTypeN = new TumourGroupSiteTNMValueListVoCollection();
	TumourGroupSiteTNMValueListVoCollection voTNMTypeM = new TumourGroupSiteTNMValueListVoCollection();
	
	for (int i = 0; i < voCollTNM.size(); i++) 
	{
		// WDEV-13259
		// Pathological T, N, M values are not used for OverallStaging so exclude them
		if (TNMClinicalpathological.PATHOLOGICALONLY.equals(voCollTNM.get(i).getClinicalPathological()))
			continue;
		
		if (voCollTNM.get(i).getTNMType().equals(TNMType.T) && voCollTNM.get(i).getIsActive())
			voTNMTypeT.add(voCollTNM.get(i));
		else if (voCollTNM.get(i).getTNMType().equals(TNMType.N) && voCollTNM.get(i).getIsActive())
			voTNMTypeN.add(voCollTNM.get(i));
		else if (voCollTNM.get(i).getTNMType().equals(TNMType.M) && voCollTNM.get(i).getIsActive())
			voTNMTypeM.add(voCollTNM.get(i));
	}
	
	form.cmbTValue().clear();
	for (int i = 0; i < voTNMTypeT.size(); i++) 
	{
		form.cmbTValue().newRow(voTNMTypeT.get(i), voTNMTypeT.get(i).getTNMValue());
	}
	form.cmbNValue().clear();
	for (int j = 0; j < voTNMTypeN.size(); j++) 
	{
		form.cmbNValue().newRow(voTNMTypeN.get(j), voTNMTypeN.get(j).getTNMValue());
	}
	form.cmbMValue().clear();
	for (int i = 0; i < voTNMTypeM.size(); i++) 
	{
		form.cmbMValue().newRow(voTNMTypeM.get(i), voTNMTypeM.get(i).getTNMValue());
	}
}
 
Example 3
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
	if (form.getGlobalContext().Oncology.getSelectedRecordForOverallDialogIsNotNull())
	{
		ValueObjectRef voSiteRef  = form.getGlobalContext().Oncology.getSelectedRecordForOverallDialog().getSelectedSiteRecord();
		ValueObjectRef voGroupRef = form.getGlobalContext().Oncology.getSelectedRecordForOverallDialog().getSelectedGroupRecord();
		TumourGroupSiteForOverallStagingDialogVo voGroup = domain.getGroupForOverallStaging((TumourGroupRefVo)voGroupRef);
		
		// WDEV-13091
		// This check theoretically should not fail, but
		if (voGroup == null)
			throw new PresentationLogicException("Minimal context for form is not met");
		
		form.getLocalContext().setSelectedGroup(null);
		if (voGroup != null)
			form.getLocalContext().setSelectedGroup(voGroup);
		
		//if dialog is open from Group
		if (voSiteRef == null)
		{
			populateComboBoxes(voGroup, null, voGroup.getTNMValues());
		}
		//if dialog is open from Site
		else
		{
			TumourGroupSiteTNMValueListVoCollection voCollTNM = domain.getTNMValueForSite((TumourSiteRefVo)voSiteRef);
			
			TumourSiteVo voSite = domain.getSiteVo((TumourSiteRefVo)voSiteRef);
			form.getLocalContext().setSelectedSite(null);
			if (voSite != null)
				form.getLocalContext().setSelectedSite(voSite);
			
			populateComboBoxes(voGroup, voSite, voCollTNM);
		}
	} 
}
 
Example 4
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private void populateTNMCmbs(TumourGroupSiteTNMValueListVoCollection voCollTNM) 
{	
	TumourGroupSiteTNMValueListVoCollection voTNMTypeT = new TumourGroupSiteTNMValueListVoCollection(); 
	TumourGroupSiteTNMValueListVoCollection voTNMTypeN = new TumourGroupSiteTNMValueListVoCollection();
	TumourGroupSiteTNMValueListVoCollection voTNMTypeM = new TumourGroupSiteTNMValueListVoCollection();
	
	for (int i = 0; i < voCollTNM.size(); i++) 
	{
		// WDEV-13259
		// Pathological T, N, M values are not used for OverallStaging so exclude them
		if (TNMClinicalpathological.PATHOLOGICALONLY.equals(voCollTNM.get(i).getClinicalPathological()))
			continue;
		
		if (voCollTNM.get(i).getTNMType().equals(TNMType.T) && voCollTNM.get(i).getIsActive())
			voTNMTypeT.add(voCollTNM.get(i));
		else if (voCollTNM.get(i).getTNMType().equals(TNMType.N) && voCollTNM.get(i).getIsActive())
			voTNMTypeN.add(voCollTNM.get(i));
		else if (voCollTNM.get(i).getTNMType().equals(TNMType.M) && voCollTNM.get(i).getIsActive())
			voTNMTypeM.add(voCollTNM.get(i));
	}
	
	form.cmbTValue().clear();
	for (int i = 0; i < voTNMTypeT.size(); i++) 
	{
		form.cmbTValue().newRow(voTNMTypeT.get(i), voTNMTypeT.get(i).getTNMValue());
	}
	form.cmbNValue().clear();
	for (int j = 0; j < voTNMTypeN.size(); j++) 
	{
		form.cmbNValue().newRow(voTNMTypeN.get(j), voTNMTypeN.get(j).getTNMValue());
	}
	form.cmbMValue().clear();
	for (int i = 0; i < voTNMTypeM.size(); i++) 
	{
		form.cmbMValue().newRow(voTNMTypeM.get(i), voTNMTypeM.get(i).getTNMValue());
	}
}
 
Example 5
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
	if (form.getGlobalContext().Oncology.getSelectedRecordForOverallDialogIsNotNull())
	{
		ValueObjectRef voSiteRef  = form.getGlobalContext().Oncology.getSelectedRecordForOverallDialog().getSelectedSiteRecord();
		ValueObjectRef voGroupRef = form.getGlobalContext().Oncology.getSelectedRecordForOverallDialog().getSelectedGroupRecord();
		TumourGroupSiteForOverallStagingDialogVo voGroup = domain.getGroupForOverallStaging((TumourGroupRefVo)voGroupRef);
		
		// WDEV-13091
		// This check theoretically should not fail, but
		if (voGroup == null)
			throw new PresentationLogicException("Minimal context for form is not met");
		
		form.getLocalContext().setSelectedGroup(null);
		if (voGroup != null)
			form.getLocalContext().setSelectedGroup(voGroup);
		
		//if dialog is open from Group
		if (voSiteRef == null)
		{
			populateComboBoxes(voGroup, null, voGroup.getTNMValues());
		}
		//if dialog is open from Site
		else
		{
			TumourGroupSiteTNMValueListVoCollection voCollTNM = domain.getTNMValueForSite((TumourSiteRefVo)voSiteRef);
			
			TumourSiteVo voSite = domain.getSiteVo((TumourSiteRefVo)voSiteRef);
			form.getLocalContext().setSelectedSite(null);
			if (voSite != null)
				form.getLocalContext().setSelectedSite(voSite);
			
			populateComboBoxes(voGroup, voSite, voCollTNM);
		}
	} 
}
 
Example 6
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private void populateTNMCmbs(TumourGroupSiteTNMValueListVoCollection voCollTNM) 
{	
	TumourGroupSiteTNMValueListVoCollection voTNMTypeT = new TumourGroupSiteTNMValueListVoCollection(); 
	TumourGroupSiteTNMValueListVoCollection voTNMTypeN = new TumourGroupSiteTNMValueListVoCollection();
	TumourGroupSiteTNMValueListVoCollection voTNMTypeM = new TumourGroupSiteTNMValueListVoCollection();
	
	for (int i = 0; i < voCollTNM.size(); i++) 
	{
		// WDEV-13259
		// Pathological T, N, M values are not used for OverallStaging so exclude them
		if (TNMClinicalpathological.PATHOLOGICALONLY.equals(voCollTNM.get(i).getClinicalPathological()))
			continue;
		
		if (voCollTNM.get(i).getTNMType().equals(TNMType.T) && voCollTNM.get(i).getIsActive())
			voTNMTypeT.add(voCollTNM.get(i));
		else if (voCollTNM.get(i).getTNMType().equals(TNMType.N) && voCollTNM.get(i).getIsActive())
			voTNMTypeN.add(voCollTNM.get(i));
		else if (voCollTNM.get(i).getTNMType().equals(TNMType.M) && voCollTNM.get(i).getIsActive())
			voTNMTypeM.add(voCollTNM.get(i));
	}
	
	form.cmbTValue().clear();
	for (int i = 0; i < voTNMTypeT.size(); i++) 
	{
		form.cmbTValue().newRow(voTNMTypeT.get(i), voTNMTypeT.get(i).getTNMValue());
	}
	form.cmbNValue().clear();
	for (int j = 0; j < voTNMTypeN.size(); j++) 
	{
		form.cmbNValue().newRow(voTNMTypeN.get(j), voTNMTypeN.get(j).getTNMValue());
	}
	form.cmbMValue().clear();
	for (int i = 0; i < voTNMTypeM.size(); i++) 
	{
		form.cmbMValue().newRow(voTNMTypeM.get(i), voTNMTypeM.get(i).getTNMValue());
	}
}
 
Example 7
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
	if (form.getGlobalContext().Oncology.getSelectedRecordForOverallDialogIsNotNull())
	{
		ValueObjectRef voSiteRef  = form.getGlobalContext().Oncology.getSelectedRecordForOverallDialog().getSelectedSiteRecord();
		ValueObjectRef voGroupRef = form.getGlobalContext().Oncology.getSelectedRecordForOverallDialog().getSelectedGroupRecord();
		TumourGroupSiteForOverallStagingDialogVo voGroup = domain.getGroupForOverallStaging((TumourGroupRefVo)voGroupRef);
		
		// WDEV-13091
		// This check theoretically should not fail, but
		if (voGroup == null)
			throw new PresentationLogicException("Minimal context for form is not met");
		
		form.getLocalContext().setSelectedGroup(null);
		if (voGroup != null)
			form.getLocalContext().setSelectedGroup(voGroup);
		
		//if dialog is open from Group
		if (voSiteRef == null)
		{
			populateComboBoxes(voGroup, null, voGroup.getTNMValues());
		}
		//if dialog is open from Site
		else
		{
			TumourGroupSiteTNMValueListVoCollection voCollTNM = domain.getTNMValueForSite((TumourSiteRefVo)voSiteRef);
			
			TumourSiteVo voSite = domain.getSiteVo((TumourSiteRefVo)voSiteRef);
			form.getLocalContext().setSelectedSite(null);
			if (voSite != null)
				form.getLocalContext().setSelectedSite(voSite);
			
			populateComboBoxes(voGroup, voSite, voCollTNM);
		}
	} 
}
 
Example 8
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
private void populateTNMCmbs(TumourGroupSiteTNMValueListVoCollection voCollTNM) 
{	
	TumourGroupSiteTNMValueListVoCollection voTNMTypeT = new TumourGroupSiteTNMValueListVoCollection(); 
	TumourGroupSiteTNMValueListVoCollection voTNMTypeN = new TumourGroupSiteTNMValueListVoCollection();
	TumourGroupSiteTNMValueListVoCollection voTNMTypeM = new TumourGroupSiteTNMValueListVoCollection();
	
	for (int i = 0; i < voCollTNM.size(); i++) 
	{
		// WDEV-13259
		// Pathological T, N, M values are not used for OverallStaging so exclude them
		if (TNMClinicalpathological.PATHOLOGICALONLY.equals(voCollTNM.get(i).getClinicalPathological()))
			continue;
		
		if (voCollTNM.get(i).getTNMType().equals(TNMType.T) && voCollTNM.get(i).getIsActive())
			voTNMTypeT.add(voCollTNM.get(i));
		else if (voCollTNM.get(i).getTNMType().equals(TNMType.N) && voCollTNM.get(i).getIsActive())
			voTNMTypeN.add(voCollTNM.get(i));
		else if (voCollTNM.get(i).getTNMType().equals(TNMType.M) && voCollTNM.get(i).getIsActive())
			voTNMTypeM.add(voCollTNM.get(i));
	}
	
	form.cmbTValue().clear();
	for (int i = 0; i < voTNMTypeT.size(); i++) 
	{
		form.cmbTValue().newRow(voTNMTypeT.get(i), voTNMTypeT.get(i).getTNMValue());
	}
	form.cmbNValue().clear();
	for (int j = 0; j < voTNMTypeN.size(); j++) 
	{
		form.cmbNValue().newRow(voTNMTypeN.get(j), voTNMTypeN.get(j).getTNMValue());
	}
	form.cmbMValue().clear();
	for (int i = 0; i < voTNMTypeM.size(); i++) 
	{
		form.cmbMValue().newRow(voTNMTypeM.get(i), voTNMTypeM.get(i).getTNMValue());
	}
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View source code 4 votes vote down vote up
/**
 * Function used to populate Pathological Staging TNM Comboboxes
 * Keep this separate from Integrated TNM Comboboxes
 */
private void populateTNMComboboxes(TumourGroupSiteTNMValueListVoCollection tnmValues)
{
	// Clear Pathological TNM Comboboxes
	form.lyrMain().tabTumourDetails().cmbPTValue().clear();
	form.lyrMain().tabTumourDetails().cmbPNValue().clear();
	form.lyrMain().tabTumourDetails().cmbPMValue().clear();
	
	form.lyrMain().tabTumourDetails().cmbTValue().clear();
	form.lyrMain().tabTumourDetails().cmbNValue().clear();
	form.lyrMain().tabTumourDetails().cmbMValue().clear();
	
	// If the TNM values collection passed is null - terminate the function
	if (tnmValues == null)
		return;
	
	for (TumourGroupSiteTNMValueListVo tnmValue : tnmValues)
	{
		boolean noType = !tnmValue.getClinicalPathologicalIsNotNull();
		boolean bothTypes = TNMClinicalpathological.BOTH.equals(tnmValue.getClinicalPathological());
		boolean clinicalType = TNMClinicalpathological.CLINICALONLY.equals(tnmValue.getClinicalPathological());
		boolean pathologicalType = TNMClinicalpathological.PATHOLOGICALONLY.equals(tnmValue.getClinicalPathological());
		
		if (TNMType.T.equals(tnmValue.getTNMType()))
		{
			if (noType || bothTypes || pathologicalType)
			{
				form.lyrMain().tabTumourDetails().cmbPTValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
			
			if (noType || bothTypes || clinicalType)
			{
				form.lyrMain().tabTumourDetails().cmbTValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
		}
		else if (TNMType.N.equals(tnmValue.getTNMType()))
		{
			if (noType || bothTypes || pathologicalType)
			{
				form.lyrMain().tabTumourDetails().cmbPNValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
			
			if (noType || bothTypes || clinicalType)
			{
				form.lyrMain().tabTumourDetails().cmbNValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
		}
		else if (TNMType.M.equals(tnmValue.getTNMType()))
		{
			if (noType || bothTypes || pathologicalType)
			{
				form.lyrMain().tabTumourDetails().cmbPMValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
			
			if (noType || bothTypes || clinicalType)
			{
				form.lyrMain().tabTumourDetails().cmbMValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
		}
	}
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View source code 4 votes vote down vote up
private void generateDefaultRecords(TumourGroupVo group, TumourSiteVo site)
{
	// Check group parameter
	if (site == null)
		return;

	// Separate T, N and M collection values
	TumourGroupSiteTNMValueListVoCollection TValues = new TumourGroupSiteTNMValueListVoCollection();
	TumourGroupSiteTNMValueListVoCollection NValues = new TumourGroupSiteTNMValueListVoCollection();
	TumourGroupSiteTNMValueListVoCollection MValues = new TumourGroupSiteTNMValueListVoCollection();

	if (site.getTNMValuesIsNotNull())
	{
		for (TumourGroupSiteTNMValueListVo tumourGroupSiteTNM : site.getTNMValues())
		{
			// WDEV-13259
			// Pathological T, N, M values are not used for OverallStaging so exclude them
			if (TNMClinicalpathological.PATHOLOGICALONLY.equals(tumourGroupSiteTNM.getClinicalPathological()))
				continue;
			
			if (!Boolean.TRUE.equals(tumourGroupSiteTNM.getIsActive()))
				continue;

			if (TNMType.T.equals(tumourGroupSiteTNM.getTNMType()))
			{
				TValues.add(tumourGroupSiteTNM);
				continue;
			}

			if (TNMType.N.equals(tumourGroupSiteTNM.getTNMType()))
			{
				NValues.add(tumourGroupSiteTNM);
				continue;
			}

			if (TNMType.M.equals(tumourGroupSiteTNM.getTNMType()))
			{
				MValues.add(tumourGroupSiteTNM);
			}
		}
	}

	// Check T values
	if (TValues == null || TValues.size() == 0)
	{
		engine.showMessage("No TNM T Type values exist and they are required to create Overall Staging values.", "Missing data", MessageButtons.OK, MessageIcon.WARNING);
		form.chkDefault().setValue(false);
		return;
	}
	// Check N values
	if (NValues == null || NValues.size() == 0)
	{
		engine.showMessage("No TNM N Type values exist and they are required to create Overall Staging values.", "Missing data", MessageButtons.OK, MessageIcon.WARNING);
		form.chkDefault().setValue(false);
		return;
	}
	// Check M values
	if (MValues == null || MValues.size() == 0)
	{
		engine.showMessage("No TNM M Type values exist and they are required to create Overall Staging values.", "Missing data", MessageButtons.OK, MessageIcon.WARNING);
		form.chkDefault().setValue(false);
		return;
	}

	for (int indexTVal = 0; indexTVal < TValues.size(); indexTVal++)
	{
		for (int indexNVal = 0; indexNVal < NValues.size(); indexNVal++)
		{
			for (int indexMVal = 0; indexMVal < MValues.size(); indexMVal++)
			{
				addOverallStagingRow(TValues.get(indexTVal), NValues.get(indexNVal), MValues.get(indexMVal));
			}
		}
	}
}
 
Example 11
Project: AvoinApotti   File: Logic.java   View source code 4 votes vote down vote up
/**
 * 
 */
private void populateDataFromScreen(SelectedRecordForOverallStagingDialogVo record) 
{
	TumourGroupSiteTNMValueListVoCollection voCollTNM = new TumourGroupSiteTNMValueListVoCollection();
	
	voCollTNM.add(form.cmbTValue().getValue());
	voCollTNM.add(form.cmbNValue().getValue());
	voCollTNM.add(form.cmbMValue().getValue());
	record.setTNMValues(voCollTNM);

	// WDEV-13091
	// If no site selected - the Overall Staging is recorded at Tumour Group level and then
	// the Histology Type, Histology Grade, Serum Marker and Over 45 values need to be populated
	if (!form.getLocalContext().getSelectedSiteIsNotNull())
	{
		if (form.cmbHistology().getValue() != null)
			record.setHistologyValue(form.cmbHistology().getValue());

		if (form.cmbDifferentation().getValue() != null)
			record.setDifferentationValue(form.cmbDifferentation().getValue());

		if (form.cmbOverall45().getValue() != null)
		{
			if (form.cmbOverall45().getValue().equals(YesNo.YES))
				record.setOver45(Boolean.TRUE);
			else
				record.setOver45(Boolean.FALSE);
		}

		if (form.cmbSerumMarker().getValue() != null)
			record.setSerumMarker(form.cmbSerumMarker().getValue());
	}
	
	if (form.cmbOverall().getValue() != null)
		record.setOverallValue(form.cmbOverall().getValue());
	
	if(checkIfIsUnique(record))
	{
		form.getGlobalContext().Oncology.setSelectedRecordForOverallDialog(record);
		engine.close(DialogResult.OK);
	}
	else
		engine.showMessage("An active overall stage already exists for this combination", "Warning", MessageButtons.OK, MessageIcon.WARNING);
	
}
 
Example 12
Project: openMAXIMS   File: Logic.java   View source code 4 votes vote down vote up
/**
 * Function used to populate Pathological Staging TNM Comboboxes
 * Keep this separate from Integrated TNM Comboboxes
 */
private void populateTNMComboboxes(TumourGroupSiteTNMValueListVoCollection tnmValues)
{
	// Clear Pathological TNM Comboboxes
	form.lyrMain().tabTumourDetails().cmbPTValue().clear();
	form.lyrMain().tabTumourDetails().cmbPNValue().clear();
	form.lyrMain().tabTumourDetails().cmbPMValue().clear();
	
	form.lyrMain().tabTumourDetails().cmbTValue().clear();
	form.lyrMain().tabTumourDetails().cmbNValue().clear();
	form.lyrMain().tabTumourDetails().cmbMValue().clear();
	
	// If the TNM values collection passed is null - terminate the function
	if (tnmValues == null)
		return;
	
	for (TumourGroupSiteTNMValueListVo tnmValue : tnmValues)
	{
		boolean noType = !tnmValue.getClinicalPathologicalIsNotNull();
		boolean bothTypes = TNMClinicalpathological.BOTH.equals(tnmValue.getClinicalPathological());
		boolean clinicalType = TNMClinicalpathological.CLINICALONLY.equals(tnmValue.getClinicalPathological());
		boolean pathologicalType = TNMClinicalpathological.PATHOLOGICALONLY.equals(tnmValue.getClinicalPathological());
		
		if (TNMType.T.equals(tnmValue.getTNMType()))
		{
			if (noType || bothTypes || pathologicalType)
			{
				form.lyrMain().tabTumourDetails().cmbPTValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
			
			if (noType || bothTypes || clinicalType)
			{
				form.lyrMain().tabTumourDetails().cmbTValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
		}
		else if (TNMType.N.equals(tnmValue.getTNMType()))
		{
			if (noType || bothTypes || pathologicalType)
			{
				form.lyrMain().tabTumourDetails().cmbPNValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
			
			if (noType || bothTypes || clinicalType)
			{
				form.lyrMain().tabTumourDetails().cmbNValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
		}
		else if (TNMType.M.equals(tnmValue.getTNMType()))
		{
			if (noType || bothTypes || pathologicalType)
			{
				form.lyrMain().tabTumourDetails().cmbPMValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
			
			if (noType || bothTypes || clinicalType)
			{
				form.lyrMain().tabTumourDetails().cmbMValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
		}
	}
}
 
Example 13
Project: openMAXIMS   File: Logic.java   View source code 4 votes vote down vote up
private void generateDefaultRecords(TumourGroupVo group, TumourSiteVo site)
{
	// Check group parameter
	if (site == null)
		return;

	// Separate T, N and M collection values
	TumourGroupSiteTNMValueListVoCollection TValues = new TumourGroupSiteTNMValueListVoCollection();
	TumourGroupSiteTNMValueListVoCollection NValues = new TumourGroupSiteTNMValueListVoCollection();
	TumourGroupSiteTNMValueListVoCollection MValues = new TumourGroupSiteTNMValueListVoCollection();

	if (site.getTNMValuesIsNotNull())
	{
		for (TumourGroupSiteTNMValueListVo tumourGroupSiteTNM : site.getTNMValues())
		{
			// WDEV-13259
			// Pathological T, N, M values are not used for OverallStaging so exclude them
			if (TNMClinicalpathological.PATHOLOGICALONLY.equals(tumourGroupSiteTNM.getClinicalPathological()))
				continue;
			
			if (!Boolean.TRUE.equals(tumourGroupSiteTNM.getIsActive()))
				continue;

			if (TNMType.T.equals(tumourGroupSiteTNM.getTNMType()))
			{
				TValues.add(tumourGroupSiteTNM);
				continue;
			}

			if (TNMType.N.equals(tumourGroupSiteTNM.getTNMType()))
			{
				NValues.add(tumourGroupSiteTNM);
				continue;
			}

			if (TNMType.M.equals(tumourGroupSiteTNM.getTNMType()))
			{
				MValues.add(tumourGroupSiteTNM);
			}
		}
	}

	// Check T values
	if (TValues == null || TValues.size() == 0)
	{
		engine.showMessage("No TNM T Type values exist and they are required to create Overall Staging values.", "Missing data", MessageButtons.OK, MessageIcon.WARNING);
		form.chkDefault().setValue(false);
		return;
	}
	// Check N values
	if (NValues == null || NValues.size() == 0)
	{
		engine.showMessage("No TNM N Type values exist and they are required to create Overall Staging values.", "Missing data", MessageButtons.OK, MessageIcon.WARNING);
		form.chkDefault().setValue(false);
		return;
	}
	// Check M values
	if (MValues == null || MValues.size() == 0)
	{
		engine.showMessage("No TNM M Type values exist and they are required to create Overall Staging values.", "Missing data", MessageButtons.OK, MessageIcon.WARNING);
		form.chkDefault().setValue(false);
		return;
	}

	for (int indexTVal = 0; indexTVal < TValues.size(); indexTVal++)
	{
		for (int indexNVal = 0; indexNVal < NValues.size(); indexNVal++)
		{
			for (int indexMVal = 0; indexMVal < MValues.size(); indexMVal++)
			{
				addOverallStagingRow(TValues.get(indexTVal), NValues.get(indexNVal), MValues.get(indexMVal));
			}
		}
	}
}
 
Example 14
Project: openMAXIMS   File: Logic.java   View source code 4 votes vote down vote up
/**
 * 
 */
private void populateDataFromScreen(SelectedRecordForOverallStagingDialogVo record) 
{
	TumourGroupSiteTNMValueListVoCollection voCollTNM = new TumourGroupSiteTNMValueListVoCollection();
	
	voCollTNM.add(form.cmbTValue().getValue());
	voCollTNM.add(form.cmbNValue().getValue());
	voCollTNM.add(form.cmbMValue().getValue());
	record.setTNMValues(voCollTNM);

	// WDEV-13091
	// If no site selected - the Overall Staging is recorded at Tumour Group level and then
	// the Histology Type, Histology Grade, Serum Marker and Over 45 values need to be populated
	if (!form.getLocalContext().getSelectedSiteIsNotNull())
	{
		if (form.cmbHistology().getValue() != null)
			record.setHistologyValue(form.cmbHistology().getValue());

		if (form.cmbDifferentation().getValue() != null)
			record.setDifferentationValue(form.cmbDifferentation().getValue());

		if (form.cmbOverall45().getValue() != null)
		{
			if (form.cmbOverall45().getValue().equals(YesNo.YES))
				record.setOver45(Boolean.TRUE);
			else
				record.setOver45(Boolean.FALSE);
		}

		if (form.cmbSerumMarker().getValue() != null)
			record.setSerumMarker(form.cmbSerumMarker().getValue());
	}
	
	if (form.cmbOverall().getValue() != null)
		record.setOverallValue(form.cmbOverall().getValue());
	
	if(checkIfIsUnique(record))
	{
		form.getGlobalContext().Oncology.setSelectedRecordForOverallDialog(record);
		engine.close(DialogResult.OK);
	}
	else
		engine.showMessage("An active overall stage already exists for this combination", "Warning", MessageButtons.OK, MessageIcon.WARNING);
	
}
 
Example 15
Project: openMAXIMS   File: Logic.java   View source code 4 votes vote down vote up
/**
 * Function used to populate Pathological Staging TNM Comboboxes
 * Keep this separate from Integrated TNM Comboboxes
 */
private void populateTNMComboboxes(TumourGroupSiteTNMValueListVoCollection tnmValues)
{
	// Clear Pathological TNM Comboboxes
	form.lyrMain().tabTumourDetails().cmbPTValue().clear();
	form.lyrMain().tabTumourDetails().cmbPNValue().clear();
	form.lyrMain().tabTumourDetails().cmbPMValue().clear();
	
	form.lyrMain().tabTumourDetails().cmbTValue().clear();
	form.lyrMain().tabTumourDetails().cmbNValue().clear();
	form.lyrMain().tabTumourDetails().cmbMValue().clear();
	
	// If the TNM values collection passed is null - terminate the function
	if (tnmValues == null)
		return;
	
	for (TumourGroupSiteTNMValueListVo tnmValue : tnmValues)
	{
		boolean noType = !tnmValue.getClinicalPathologicalIsNotNull();
		boolean bothTypes = TNMClinicalpathological.BOTH.equals(tnmValue.getClinicalPathological());
		boolean clinicalType = TNMClinicalpathological.CLINICALONLY.equals(tnmValue.getClinicalPathological());
		boolean pathologicalType = TNMClinicalpathological.PATHOLOGICALONLY.equals(tnmValue.getClinicalPathological());
		
		if (TNMType.T.equals(tnmValue.getTNMType()))
		{
			if (noType || bothTypes || pathologicalType)
			{
				form.lyrMain().tabTumourDetails().cmbPTValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
			
			if (noType || bothTypes || clinicalType)
			{
				form.lyrMain().tabTumourDetails().cmbTValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
		}
		else if (TNMType.N.equals(tnmValue.getTNMType()))
		{
			if (noType || bothTypes || pathologicalType)
			{
				form.lyrMain().tabTumourDetails().cmbPNValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
			
			if (noType || bothTypes || clinicalType)
			{
				form.lyrMain().tabTumourDetails().cmbNValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
		}
		else if (TNMType.M.equals(tnmValue.getTNMType()))
		{
			if (noType || bothTypes || pathologicalType)
			{
				form.lyrMain().tabTumourDetails().cmbPMValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
			
			if (noType || bothTypes || clinicalType)
			{
				form.lyrMain().tabTumourDetails().cmbMValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
		}
	}
}
 
Example 16
Project: openMAXIMS   File: Logic.java   View source code 4 votes vote down vote up
private void generateDefaultRecords(TumourGroupVo group, TumourSiteVo site)
{
	// Check group parameter
	if (site == null)
		return;

	// Separate T, N and M collection values
	TumourGroupSiteTNMValueListVoCollection TValues = new TumourGroupSiteTNMValueListVoCollection();
	TumourGroupSiteTNMValueListVoCollection NValues = new TumourGroupSiteTNMValueListVoCollection();
	TumourGroupSiteTNMValueListVoCollection MValues = new TumourGroupSiteTNMValueListVoCollection();

	if (site.getTNMValuesIsNotNull())
	{
		for (TumourGroupSiteTNMValueListVo tumourGroupSiteTNM : site.getTNMValues())
		{
			// WDEV-13259
			// Pathological T, N, M values are not used for OverallStaging so exclude them
			if (TNMClinicalpathological.PATHOLOGICALONLY.equals(tumourGroupSiteTNM.getClinicalPathological()))
				continue;
			
			if (!Boolean.TRUE.equals(tumourGroupSiteTNM.getIsActive()))
				continue;

			if (TNMType.T.equals(tumourGroupSiteTNM.getTNMType()))
			{
				TValues.add(tumourGroupSiteTNM);
				continue;
			}

			if (TNMType.N.equals(tumourGroupSiteTNM.getTNMType()))
			{
				NValues.add(tumourGroupSiteTNM);
				continue;
			}

			if (TNMType.M.equals(tumourGroupSiteTNM.getTNMType()))
			{
				MValues.add(tumourGroupSiteTNM);
			}
		}
	}

	// Check T values
	if (TValues == null || TValues.size() == 0)
	{
		engine.showMessage("No TNM T Type values exist and they are required to create Overall Staging values.", "Missing data", MessageButtons.OK, MessageIcon.WARNING);
		form.chkDefault().setValue(false);
		return;
	}
	// Check N values
	if (NValues == null || NValues.size() == 0)
	{
		engine.showMessage("No TNM N Type values exist and they are required to create Overall Staging values.", "Missing data", MessageButtons.OK, MessageIcon.WARNING);
		form.chkDefault().setValue(false);
		return;
	}
	// Check M values
	if (MValues == null || MValues.size() == 0)
	{
		engine.showMessage("No TNM M Type values exist and they are required to create Overall Staging values.", "Missing data", MessageButtons.OK, MessageIcon.WARNING);
		form.chkDefault().setValue(false);
		return;
	}

	for (int indexTVal = 0; indexTVal < TValues.size(); indexTVal++)
	{
		for (int indexNVal = 0; indexNVal < NValues.size(); indexNVal++)
		{
			for (int indexMVal = 0; indexMVal < MValues.size(); indexMVal++)
			{
				addOverallStagingRow(TValues.get(indexTVal), NValues.get(indexNVal), MValues.get(indexMVal));
			}
		}
	}
}
 
Example 17
Project: openMAXIMS   File: Logic.java   View source code 4 votes vote down vote up
/**
 * 
 */
private void populateDataFromScreen(SelectedRecordForOverallStagingDialogVo record) 
{
	TumourGroupSiteTNMValueListVoCollection voCollTNM = new TumourGroupSiteTNMValueListVoCollection();
	
	voCollTNM.add(form.cmbTValue().getValue());
	voCollTNM.add(form.cmbNValue().getValue());
	voCollTNM.add(form.cmbMValue().getValue());
	record.setTNMValues(voCollTNM);

	// WDEV-13091
	// If no site selected - the Overall Staging is recorded at Tumour Group level and then
	// the Histology Type, Histology Grade, Serum Marker and Over 45 values need to be populated
	if (!form.getLocalContext().getSelectedSiteIsNotNull())
	{
		if (form.cmbHistology().getValue() != null)
			record.setHistologyValue(form.cmbHistology().getValue());

		if (form.cmbDifferentation().getValue() != null)
			record.setDifferentationValue(form.cmbDifferentation().getValue());

		if (form.cmbOverall45().getValue() != null)
		{
			if (form.cmbOverall45().getValue().equals(YesNo.YES))
				record.setOver45(Boolean.TRUE);
			else
				record.setOver45(Boolean.FALSE);
		}

		if (form.cmbSerumMarker().getValue() != null)
			record.setSerumMarker(form.cmbSerumMarker().getValue());
	}
	
	if (form.cmbOverall().getValue() != null)
		record.setOverallValue(form.cmbOverall().getValue());
	
	if(checkIfIsUnique(record))
	{
		form.getGlobalContext().Oncology.setSelectedRecordForOverallDialog(record);
		engine.close(DialogResult.OK);
	}
	else
		engine.showMessage("An active overall stage already exists for this combination", "Warning", MessageButtons.OK, MessageIcon.WARNING);
	
}
 
Example 18
Project: openmaxims-linux   File: Logic.java   View source code 4 votes vote down vote up
/**
 * Function used to populate Pathological Staging TNM Comboboxes
 * Keep this separate from Integrated TNM Comboboxes
 */
private void populateTNMComboboxes(TumourGroupSiteTNMValueListVoCollection tnmValues)
{
	// Clear Pathological TNM Comboboxes
	form.lyrMain().tabTumourDetails().cmbPTValue().clear();
	form.lyrMain().tabTumourDetails().cmbPNValue().clear();
	form.lyrMain().tabTumourDetails().cmbPMValue().clear();
	
	form.lyrMain().tabTumourDetails().cmbTValue().clear();
	form.lyrMain().tabTumourDetails().cmbNValue().clear();
	form.lyrMain().tabTumourDetails().cmbMValue().clear();
	
	// If the TNM values collection passed is null - terminate the function
	if (tnmValues == null)
		return;
	
	for (TumourGroupSiteTNMValueListVo tnmValue : tnmValues)
	{
		boolean noType = !tnmValue.getClinicalPathologicalIsNotNull();
		boolean bothTypes = TNMClinicalpathological.BOTH.equals(tnmValue.getClinicalPathological());
		boolean clinicalType = TNMClinicalpathological.CLINICALONLY.equals(tnmValue.getClinicalPathological());
		boolean pathologicalType = TNMClinicalpathological.PATHOLOGICALONLY.equals(tnmValue.getClinicalPathological());
		
		if (TNMType.T.equals(tnmValue.getTNMType()))
		{
			if (noType || bothTypes || pathologicalType)
			{
				form.lyrMain().tabTumourDetails().cmbPTValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
			
			if (noType || bothTypes || clinicalType)
			{
				form.lyrMain().tabTumourDetails().cmbTValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
		}
		else if (TNMType.N.equals(tnmValue.getTNMType()))
		{
			if (noType || bothTypes || pathologicalType)
			{
				form.lyrMain().tabTumourDetails().cmbPNValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
			
			if (noType || bothTypes || clinicalType)
			{
				form.lyrMain().tabTumourDetails().cmbNValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
		}
		else if (TNMType.M.equals(tnmValue.getTNMType()))
		{
			if (noType || bothTypes || pathologicalType)
			{
				form.lyrMain().tabTumourDetails().cmbPMValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
			
			if (noType || bothTypes || clinicalType)
			{
				form.lyrMain().tabTumourDetails().cmbMValue().newRow(tnmValue, tnmValue.getTNMValue());
			}
		}
	}
}
 
Example 19
Project: openmaxims-linux   File: Logic.java   View source code 4 votes vote down vote up
private void generateDefaultRecords(TumourGroupVo group, TumourSiteVo site)
{
	// Check group parameter
	if (site == null)
		return;

	// Separate T, N and M collection values
	TumourGroupSiteTNMValueListVoCollection TValues = new TumourGroupSiteTNMValueListVoCollection();
	TumourGroupSiteTNMValueListVoCollection NValues = new TumourGroupSiteTNMValueListVoCollection();
	TumourGroupSiteTNMValueListVoCollection MValues = new TumourGroupSiteTNMValueListVoCollection();

	if (site.getTNMValuesIsNotNull())
	{
		for (TumourGroupSiteTNMValueListVo tumourGroupSiteTNM : site.getTNMValues())
		{
			// WDEV-13259
			// Pathological T, N, M values are not used for OverallStaging so exclude them
			if (TNMClinicalpathological.PATHOLOGICALONLY.equals(tumourGroupSiteTNM.getClinicalPathological()))
				continue;
			
			if (!Boolean.TRUE.equals(tumourGroupSiteTNM.getIsActive()))
				continue;

			if (TNMType.T.equals(tumourGroupSiteTNM.getTNMType()))
			{
				TValues.add(tumourGroupSiteTNM);
				continue;
			}

			if (TNMType.N.equals(tumourGroupSiteTNM.getTNMType()))
			{
				NValues.add(tumourGroupSiteTNM);
				continue;
			}

			if (TNMType.M.equals(tumourGroupSiteTNM.getTNMType()))
			{
				MValues.add(tumourGroupSiteTNM);
			}
		}
	}

	// Check T values
	if (TValues == null || TValues.size() == 0)
	{
		engine.showMessage("No TNM T Type values exist and they are required to create Overall Staging values.", "Missing data", MessageButtons.OK, MessageIcon.WARNING);
		form.chkDefault().setValue(false);
		return;
	}
	// Check N values
	if (NValues == null || NValues.size() == 0)
	{
		engine.showMessage("No TNM N Type values exist and they are required to create Overall Staging values.", "Missing data", MessageButtons.OK, MessageIcon.WARNING);
		form.chkDefault().setValue(false);
		return;
	}
	// Check M values
	if (MValues == null || MValues.size() == 0)
	{
		engine.showMessage("No TNM M Type values exist and they are required to create Overall Staging values.", "Missing data", MessageButtons.OK, MessageIcon.WARNING);
		form.chkDefault().setValue(false);
		return;
	}

	for (int indexTVal = 0; indexTVal < TValues.size(); indexTVal++)
	{
		for (int indexNVal = 0; indexNVal < NValues.size(); indexNVal++)
		{
			for (int indexMVal = 0; indexMVal < MValues.size(); indexMVal++)
			{
				addOverallStagingRow(TValues.get(indexTVal), NValues.get(indexNVal), MValues.get(indexMVal));
			}
		}
	}
}
 
Example 20
Project: openmaxims-linux   File: Logic.java   View source code 4 votes vote down vote up
/**
 * 
 */
private void populateDataFromScreen(SelectedRecordForOverallStagingDialogVo record) 
{
	TumourGroupSiteTNMValueListVoCollection voCollTNM = new TumourGroupSiteTNMValueListVoCollection();
	
	voCollTNM.add(form.cmbTValue().getValue());
	voCollTNM.add(form.cmbNValue().getValue());
	voCollTNM.add(form.cmbMValue().getValue());
	record.setTNMValues(voCollTNM);

	// WDEV-13091
	// If no site selected - the Overall Staging is recorded at Tumour Group level and then
	// the Histology Type, Histology Grade, Serum Marker and Over 45 values need to be populated
	if (!form.getLocalContext().getSelectedSiteIsNotNull())
	{
		if (form.cmbHistology().getValue() != null)
			record.setHistologyValue(form.cmbHistology().getValue());

		if (form.cmbDifferentation().getValue() != null)
			record.setDifferentationValue(form.cmbDifferentation().getValue());

		if (form.cmbOverall45().getValue() != null)
		{
			if (form.cmbOverall45().getValue().equals(YesNo.YES))
				record.setOver45(Boolean.TRUE);
			else
				record.setOver45(Boolean.FALSE);
		}

		if (form.cmbSerumMarker().getValue() != null)
			record.setSerumMarker(form.cmbSerumMarker().getValue());
	}
	
	if (form.cmbOverall().getValue() != null)
		record.setOverallValue(form.cmbOverall().getValue());
	
	if(checkIfIsUnique(record))
	{
		form.getGlobalContext().Oncology.setSelectedRecordForOverallDialog(record);
		engine.close(DialogResult.OK);
	}
	else
		engine.showMessage("An active overall stage already exists for this combination", "Warning", MessageButtons.OK, MessageIcon.WARNING);
	
}