Java Code Examples for ims.ntpf.vo.lookups.CaseTypeCollection

The following are top voted examples for showing how to use ims.ntpf.vo.lookups.CaseTypeCollection. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
	CaseTypeCollection coll = new CaseTypeCollection();
	for(int k = 0 ; k < form.grdCaseTypes().getRows().size() ; k++)
	{
		if (form.grdCaseTypes().getRows().get(k).getColSelect())
			coll.add(form.grdCaseTypes().getRows().get(k).getValue());
	}
	//if (coll.size() > 0)
		form.getGlobalContext().NTPF.setCaseTypes(coll);
	//else
		//form.getGlobalContext().NTPF.setCaseTypes(null);
		

	engine.close(DialogResult.OK);
}
 
Example 2
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
	CaseTypeCollection coll = new CaseTypeCollection();
	for(int k = 0 ; k < form.grdCaseTypes().getRows().size() ; k++)
	{
		if (form.grdCaseTypes().getRows().get(k).getColSelect())
			coll.add(form.grdCaseTypes().getRows().get(k).getValue());
	}
	//if (coll.size() > 0)
		form.getGlobalContext().NTPF.setCaseTypes(coll);
	//else
		//form.getGlobalContext().NTPF.setCaseTypes(null);
		

	engine.close(DialogResult.OK);
}
 
Example 3
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
	CaseTypeCollection coll = new CaseTypeCollection();
	for(int k = 0 ; k < form.grdCaseTypes().getRows().size() ; k++)
	{
		if (form.grdCaseTypes().getRows().get(k).getColSelect())
			coll.add(form.grdCaseTypes().getRows().get(k).getValue());
	}
	//if (coll.size() > 0)
		form.getGlobalContext().NTPF.setCaseTypes(coll);
	//else
		//form.getGlobalContext().NTPF.setCaseTypes(null);
		

	engine.close(DialogResult.OK);
}
 
Example 4
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
@Override
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException
{
	CaseTypeCollection coll = new CaseTypeCollection();
	for(int k = 0 ; k < form.grdCaseTypes().getRows().size() ; k++)
	{
		if (form.grdCaseTypes().getRows().get(k).getColSelect())
			coll.add(form.grdCaseTypes().getRows().get(k).getValue());
	}
	//if (coll.size() > 0)
		form.getGlobalContext().NTPF.setCaseTypes(coll);
	//else
		//form.getGlobalContext().NTPF.setCaseTypes(null);
		

	engine.close(DialogResult.OK);
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onDyngrdOrganisationLocationCellButtonClicked(DynamicGridCell cell)
{
	form.dyngrdOrganisationLocation().setSelectedRow(cell.getRow());
	
	
	DynamicGridCell cellAccreditation = cell.getRow().getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
	if (cellAccreditation.getValue() == null || (cellAccreditation.getValue() != null
		&& ( !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTICT_ACCRED)
			 && !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING))) )
		return;
	
	if (form.dyngrdOrganisationLocation().getSelectedRow() != null
		&& form.dyngrdOrganisationLocation().getSelectedRow().getValue() != null
		&& form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo )
		form.getGlobalContext().NTPF.setCaseTypes(((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()) != null ? ((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()).getCaseTypes() : null);
	else if (cell.getIdentifier() != null 
		&& cell.getIdentifier() instanceof CaseTypeCollection)
	{
		form.getGlobalContext().NTPF.setCaseTypes((CaseTypeCollection)cell.getIdentifier());
	}
	else
	{
		form.getGlobalContext().NTPF.setCaseTypes(null);
	}
	
	engine.open(form.getForms().Admin.NTPFCaseTypeConfigDialog);
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
	form.grdCaseTypes().getRows().clear();
	
	CaseTypeCollection coll = LookupHelper.getCaseType(domain.getLookupService());
	
	for(int k = 0 ; k < coll.size() ; k++)
	{
		grdCaseTypesRow row = form.grdCaseTypes().getRows().newRow();
		row.setColCaseType(coll.get(k).getText());
		row.setColSelect(checkSelect(coll.get(k)));
		row.setValue(coll.get(k));
	}
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean checkSelect(CaseType caseType)
{
	CaseTypeCollection coll = form.getGlobalContext().NTPF.getCaseTypes();
	for(int k = 0 ; coll != null && k < coll.size() ; k++)
	{
		if (coll.get(k).equals(caseType))
			return true;
	}
	return false;
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onDyngrdOrganisationLocationCellButtonClicked(DynamicGridCell cell)
{
	form.dyngrdOrganisationLocation().setSelectedRow(cell.getRow());
	
	
	DynamicGridCell cellAccreditation = cell.getRow().getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
	if (cellAccreditation.getValue() == null || (cellAccreditation.getValue() != null
		&& ( !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTICT_ACCRED)
			 && !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING))) )
		return;
	
	if (form.dyngrdOrganisationLocation().getSelectedRow() != null
		&& form.dyngrdOrganisationLocation().getSelectedRow().getValue() != null
		&& form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo )
		form.getGlobalContext().NTPF.setCaseTypes(((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()) != null ? ((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()).getCaseTypes() : null);
	else if (cell.getIdentifier() != null 
		&& cell.getIdentifier() instanceof CaseTypeCollection)
	{
		form.getGlobalContext().NTPF.setCaseTypes((CaseTypeCollection)cell.getIdentifier());
	}
	else
	{
		form.getGlobalContext().NTPF.setCaseTypes(null);
	}
	
	engine.open(form.getForms().Admin.NTPFCaseTypeConfigDialog);
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
	form.grdCaseTypes().getRows().clear();
	
	CaseTypeCollection coll = LookupHelper.getCaseType(domain.getLookupService());
	
	for(int k = 0 ; k < coll.size() ; k++)
	{
		grdCaseTypesRow row = form.grdCaseTypes().getRows().newRow();
		row.setColCaseType(coll.get(k).getText());
		row.setColSelect(checkSelect(coll.get(k)));
		row.setValue(coll.get(k));
	}
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean checkSelect(CaseType caseType)
{
	CaseTypeCollection coll = form.getGlobalContext().NTPF.getCaseTypes();
	for(int k = 0 ; coll != null && k < coll.size() ; k++)
	{
		if (coll.get(k).equals(caseType))
			return true;
	}
	return false;
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onDyngrdOrganisationLocationCellButtonClicked(DynamicGridCell cell)
{
	form.dyngrdOrganisationLocation().setSelectedRow(cell.getRow());
	
	
	DynamicGridCell cellAccreditation = cell.getRow().getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
	if (cellAccreditation.getValue() == null || (cellAccreditation.getValue() != null
		&& ( !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTICT_ACCRED)
			 && !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING))) )
		return;
	
	if (form.dyngrdOrganisationLocation().getSelectedRow() != null
		&& form.dyngrdOrganisationLocation().getSelectedRow().getValue() != null
		&& form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo )
		form.getGlobalContext().NTPF.setCaseTypes(((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()) != null ? ((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()).getCaseTypes() : null);
	else if (cell.getIdentifier() != null 
		&& cell.getIdentifier() instanceof CaseTypeCollection)
	{
		form.getGlobalContext().NTPF.setCaseTypes((CaseTypeCollection)cell.getIdentifier());
	}
	else
	{
		form.getGlobalContext().NTPF.setCaseTypes(null);
	}
	
	engine.open(form.getForms().Admin.NTPFCaseTypeConfigDialog);
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
	form.grdCaseTypes().getRows().clear();
	
	CaseTypeCollection coll = LookupHelper.getCaseType(domain.getLookupService());
	
	for(int k = 0 ; k < coll.size() ; k++)
	{
		grdCaseTypesRow row = form.grdCaseTypes().getRows().newRow();
		row.setColCaseType(coll.get(k).getText());
		row.setColSelect(checkSelect(coll.get(k)));
		row.setValue(coll.get(k));
	}
}
 
Example 13
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean checkSelect(CaseType caseType)
{
	CaseTypeCollection coll = form.getGlobalContext().NTPF.getCaseTypes();
	for(int k = 0 ; coll != null && k < coll.size() ; k++)
	{
		if (coll.get(k).equals(caseType))
			return true;
	}
	return false;
}
 
Example 14
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onDyngrdOrganisationLocationCellButtonClicked(DynamicGridCell cell)
{
	form.dyngrdOrganisationLocation().setSelectedRow(cell.getRow());
	
	
	DynamicGridCell cellAccreditation = cell.getRow().getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));
	if (cellAccreditation.getValue() == null || (cellAccreditation.getValue() != null
		&& ( !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTICT_ACCRED)
			 && !((AccreditationLocationStatus)cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING))) )
		return;
	
	if (form.dyngrdOrganisationLocation().getSelectedRow() != null
		&& form.dyngrdOrganisationLocation().getSelectedRow().getValue() != null
		&& form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo )
		form.getGlobalContext().NTPF.setCaseTypes(((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()) != null ? ((HcpLocationVo) form.dyngrdOrganisationLocation().getSelectedRow().getValue()).getCaseTypes() : null);
	else if (cell.getIdentifier() != null 
		&& cell.getIdentifier() instanceof CaseTypeCollection)
	{
		form.getGlobalContext().NTPF.setCaseTypes((CaseTypeCollection)cell.getIdentifier());
	}
	else
	{
		form.getGlobalContext().NTPF.setCaseTypes(null);
	}
	
	engine.open(form.getForms().Admin.NTPFCaseTypeConfigDialog);
}
 
Example 15
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException
{
	form.grdCaseTypes().getRows().clear();
	
	CaseTypeCollection coll = LookupHelper.getCaseType(domain.getLookupService());
	
	for(int k = 0 ; k < coll.size() ; k++)
	{
		grdCaseTypesRow row = form.grdCaseTypes().getRows().newRow();
		row.setColCaseType(coll.get(k).getText());
		row.setColSelect(checkSelect(coll.get(k)));
		row.setValue(coll.get(k));
	}
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean checkSelect(CaseType caseType)
{
	CaseTypeCollection coll = form.getGlobalContext().NTPF.getCaseTypes();
	for(int k = 0 ; coll != null && k < coll.size() ; k++)
	{
		if (coll.get(k).equals(caseType))
			return true;
	}
	return false;
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private String createAccreditationHistoryTooltip(HcpLocationAccreditationHistoryVoCollection accreditationHistory, CaseTypeCollection collCaseTypes)
{
	if (accreditationHistory != null && accreditationHistory.size() > 0 && collCaseTypes != null)
	{
		java.lang.StringBuffer strDetail = new StringBuffer();

		strDetail.append("<font color=\"#FF0000\"><b><u>Accreditation History</b></u></font><br>");
		
		StringBuffer sb = new StringBuffer();

		for (int k = 0 ; k < collCaseTypes.size() ; k++)
		{
			sb.append(collCaseTypes.get(k).getText());
			sb.append(", ");
		}
		if (sb.length() > 0)
		{
			strDetail.append("<b>Case Types:</b> ");
			strDetail.append(sb.substring(0, sb.length() - 2));
			strDetail.append("<br>");
		}
		
		for (int i = 0 ; i < accreditationHistory.size()-1 ; i++)
		{
			strDetail.append("<b>Accreditation:</b> ");
			if (accreditationHistory.get(i).getAccreditationStatusIsNotNull())
				strDetail.append(accreditationHistory.get(i).getAccreditationStatus().getText());

			strDetail.append("     ");
			strDetail.append("<b>Change Date:</b> ");
			if (accreditationHistory.get(i).getSystemInformationIsNotNull())
				strDetail.append(accreditationHistory.get(i).getSystemInformation().getCreationDateTime().getDate().toString());

			strDetail.append("     ");
			strDetail.append("<b>Start Date:</b> ");
			if (accreditationHistory.get(i).getStartDateIsNotNull())
				strDetail.append(accreditationHistory.get(i).getStartDate().toString());

			strDetail.append("     ");
			strDetail.append("<b>End Date:</b> ");
			if (accreditationHistory.get(i).getEndDateIsNotNull())
				strDetail.append(accreditationHistory.get(i).getEndDate().toString());

			strDetail.append("<br>");
		}

		return strDetail.toString();
	}
	return "";
}
 
Example 18
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private String createAccreditationHistoryTooltip(HcpLocationAccreditationHistoryVoCollection accreditationHistory, CaseTypeCollection collCaseTypes)
{
	if (accreditationHistory != null && accreditationHistory.size() > 0 && collCaseTypes != null)
	{
		java.lang.StringBuffer strDetail = new StringBuffer();

		strDetail.append("<font color=\"#FF0000\"><b><u>Accreditation History</b></u></font><br>");
		
		StringBuffer sb = new StringBuffer();

		for (int k = 0 ; k < collCaseTypes.size() ; k++)
		{
			sb.append(collCaseTypes.get(k).getText());
			sb.append(", ");
		}
		if (sb.length() > 0)
		{
			strDetail.append("<b>Case Types:</b> ");
			strDetail.append(sb.substring(0, sb.length() - 2));
			strDetail.append("<br>");
		}
		
		for (int i = 0 ; i < accreditationHistory.size()-1 ; i++)
		{
			strDetail.append("<b>Accreditation:</b> ");
			if (accreditationHistory.get(i).getAccreditationStatusIsNotNull())
				strDetail.append(accreditationHistory.get(i).getAccreditationStatus().getText());

			strDetail.append("     ");
			strDetail.append("<b>Change Date:</b> ");
			if (accreditationHistory.get(i).getSystemInformationIsNotNull())
				strDetail.append(accreditationHistory.get(i).getSystemInformation().getCreationDateTime().getDate().toString());

			strDetail.append("     ");
			strDetail.append("<b>Start Date:</b> ");
			if (accreditationHistory.get(i).getStartDateIsNotNull())
				strDetail.append(accreditationHistory.get(i).getStartDate().toString());

			strDetail.append("     ");
			strDetail.append("<b>End Date:</b> ");
			if (accreditationHistory.get(i).getEndDateIsNotNull())
				strDetail.append(accreditationHistory.get(i).getEndDate().toString());

			strDetail.append("<br>");
		}

		return strDetail.toString();
	}
	return "";
}
 
Example 19
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private String createAccreditationHistoryTooltip(HcpLocationAccreditationHistoryVoCollection accreditationHistory, CaseTypeCollection collCaseTypes)
{
	if (accreditationHistory != null && accreditationHistory.size() > 0 && collCaseTypes != null)
	{
		java.lang.StringBuffer strDetail = new StringBuffer();

		strDetail.append("<font color=\"#FF0000\"><b><u>Accreditation History</b></u></font><br>");
		
		StringBuffer sb = new StringBuffer();

		for (int k = 0 ; k < collCaseTypes.size() ; k++)
		{
			sb.append(collCaseTypes.get(k).getText());
			sb.append(", ");
		}
		if (sb.length() > 0)
		{
			strDetail.append("<b>Case Types:</b> ");
			strDetail.append(sb.substring(0, sb.length() - 2));
			strDetail.append("<br>");
		}
		
		for (int i = 0 ; i < accreditationHistory.size()-1 ; i++)
		{
			strDetail.append("<b>Accreditation:</b> ");
			if (accreditationHistory.get(i).getAccreditationStatusIsNotNull())
				strDetail.append(accreditationHistory.get(i).getAccreditationStatus().getText());

			strDetail.append("     ");
			strDetail.append("<b>Change Date:</b> ");
			if (accreditationHistory.get(i).getSystemInformationIsNotNull())
				strDetail.append(accreditationHistory.get(i).getSystemInformation().getCreationDateTime().getDate().toString());

			strDetail.append("     ");
			strDetail.append("<b>Start Date:</b> ");
			if (accreditationHistory.get(i).getStartDateIsNotNull())
				strDetail.append(accreditationHistory.get(i).getStartDate().toString());

			strDetail.append("     ");
			strDetail.append("<b>End Date:</b> ");
			if (accreditationHistory.get(i).getEndDateIsNotNull())
				strDetail.append(accreditationHistory.get(i).getEndDate().toString());

			strDetail.append("<br>");
		}

		return strDetail.toString();
	}
	return "";
}
 
Example 20
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private String createAccreditationHistoryTooltip(HcpLocationAccreditationHistoryVoCollection accreditationHistory, CaseTypeCollection collCaseTypes)
{
	if (accreditationHistory != null && accreditationHistory.size() > 0 && collCaseTypes != null)
	{
		java.lang.StringBuffer strDetail = new StringBuffer();

		strDetail.append("<font color=\"#FF0000\"><b><u>Accreditation History</b></u></font><br>");
		
		StringBuffer sb = new StringBuffer();

		for (int k = 0 ; k < collCaseTypes.size() ; k++)
		{
			sb.append(collCaseTypes.get(k).getText());
			sb.append(", ");
		}
		if (sb.length() > 0)
		{
			strDetail.append("<b>Case Types:</b> ");
			strDetail.append(sb.substring(0, sb.length() - 2));
			strDetail.append("<br>");
		}
		
		for (int i = 0 ; i < accreditationHistory.size()-1 ; i++)
		{
			strDetail.append("<b>Accreditation:</b> ");
			if (accreditationHistory.get(i).getAccreditationStatusIsNotNull())
				strDetail.append(accreditationHistory.get(i).getAccreditationStatus().getText());

			strDetail.append("     ");
			strDetail.append("<b>Change Date:</b> ");
			if (accreditationHistory.get(i).getSystemInformationIsNotNull())
				strDetail.append(accreditationHistory.get(i).getSystemInformation().getCreationDateTime().getDate().toString());

			strDetail.append("     ");
			strDetail.append("<b>Start Date:</b> ");
			if (accreditationHistory.get(i).getStartDateIsNotNull())
				strDetail.append(accreditationHistory.get(i).getStartDate().toString());

			strDetail.append("     ");
			strDetail.append("<b>End Date:</b> ");
			if (accreditationHistory.get(i).getEndDateIsNotNull())
				strDetail.append(accreditationHistory.get(i).getEndDate().toString());

			strDetail.append("<br>");
		}

		return strDetail.toString();
	}
	return "";
}