Java Code Examples for ims.correspondence.vo.ConsultantAccessVo

The following are top voted examples for showing how to use ims.correspondence.vo.ConsultantAccessVo. 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 5 votes vote down vote up
private void newConsultantCorrespondenceGridRow(DynamicGridRow parentRow, ConsultantAccessVo consultantAccess)
{
	if (parentRow == null)
		throw new CodingRuntimeException("Major Logical Error - Can not add consultant access row to a null row");
	
	if (consultantAccess == null)
		return;
	
	
	DynamicGridCell newCell;
	DynamicGridColumn column;

	// Create a new row
	DynamicGridRow newRow = parentRow.getRows().newRow();
	newRow.setValue(consultantAccess);
	
	// Create the first cell in the row
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_IMAGE);
	newCell = newRow.getCells().newCell(column, DynamicCellType.IMAGE);
	newCell.setValue(form.getImages().Core.User);

	// Create the second cell in the row
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESS_CATEGORY);
	newCell = newRow.getCells().newCell(column, DynamicCellType.STRING);
	newCell.setValue(consultantAccess.getConsultant().getIHcpName());
	newCell.setReadOnly(true);
	
	// Create the third cell in the row
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESSRIGHTS);
	newCell = newRow.getCells().newCell(column, DynamicCellType.ANSWER);
	engine.populate(newCell, Access.getNegativeInstancesAsIItemCollection());
	newCell.setValue(consultantAccess.getAccessRight());
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void newConsultantCorrespondece(DynamicGridRow parrentRow)
{
	if (parrentRow == null)
		throw new CodingRuntimeException("Major Logical Error - Can not add a CONSULTANT correspondence to a null parrent row");

	if (!(parrentRow.getValue() instanceof AccessCategory) || (((AccessCategory) parrentRow.getValue()) != AccessCategory.CONSULTANTS))
		throw new CodingRuntimeException("Logical Error - Function must be called from CONSULTANTS category row only");
	
	parrentRow.setExpanded(true);
	
	// Create a new row
	DynamicGridRow newRow = parrentRow.getRows().newRow(true);
	newRow.setValue(new ConsultantAccessVo());
	form.dyngrdDetails().resetScrollPosition();
	
	// Declare a new cell
	DynamicGridCell newCell;
	// Column identifier
	DynamicGridColumn column;
	
	
	// Create the first cell
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_IMAGE);
	newCell = newRow.getCells().newCell(column, DynamicCellType.IMAGE);
	newCell.setValue(form.getImages().Core.User);

	// Create the second cell
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESS_CATEGORY);
	newCell = newRow.getCells().newCell(column, DynamicCellType.QUERYCOMBOBOX);
	newCell.setAutoPostBack(true);
	
	// Create the third cell
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESSRIGHTS);
	newCell = newRow.getCells().newCell(column, DynamicCellType.ANSWER);
	engine.populate(newCell, Access.getNegativeInstancesAsIItemCollection());
	newCell.setAutoPostBack(true);
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateConsultantAccessRowValue(DynamicGridRow row)
{
	if (row == null || (row.getParent() == null) || (!(row.getParent().getValue() instanceof AccessCategory)) || (((AccessCategory)row.getParent().getValue()) != AccessCategory.CONSULTANTS))
		throw new CodingRuntimeException("Major Logical Problem");
	
	if (row.getValue() == null)
		row.setValue(new ConsultantAccessVo());
	
	if (!(row.getValue() instanceof ConsultantAccessVo))
		throw new CodingRuntimeException("BUG");


	DynamicGridColumn column;
	DynamicGridCell cell;
	
	// Get second cell value
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESS_CATEGORY);
	cell = row.getCells().get(column);
	if (cell.getType() != DynamicCellType.STRING)
	{
		if (cell.getValue() == null)
		{
			((ConsultantAccessVo) row.getValue()).setConsultant(null);
			cell.setTypedText(null);
		}
		else
		{
			((ConsultantAccessVo) row.getValue()).setConsultant((MedicLiteVo) cell.getValue());
		}
	}
	
	// Get third cell value
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESSRIGHTS);
	cell = row.getCells().get(column);
	((ConsultantAccessVo) row.getValue()).setAccessRight((Access) cell.getValue());
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addConsultantsToUserAccess(ConsultantAccessVoCollection consultants, DynamicGridRowCollection rows)
{
	// NOTE: DO NOT make consultants = new ConsultantAccessVoCollection() in this function
	// consultants MUST ALWAYS reference the clinics in the UserAccessVo

	if (rows == null)
		return;
	
	if (consultants == null)
		throw new CodingRuntimeException("Logical Error - Inserting values into null CONSULTANTS collection");

	
	// Add the records from the grid
	for (int i = 0; i < rows.size(); i++)
	{
		DynamicGridRow row = rows.get(i);
		
		if (row.getValue() == null)
			continue;
		
		if (!(row.getValue() instanceof ConsultantAccessVo))
			throw new CodingRuntimeException("Major Logical Error");
		
		updateConsultantAccessRowValue(row);
		
		ConsultantAccessVo consultantAccess = (ConsultantAccessVo) row.getValue();
		
		if (consultantAccess.getConsultant() != null || consultantAccess.getAccessRight() != null)
		{
			consultants.add((ConsultantAccessVo) row.getValue());
		}
	}
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void newConsultantCorrespondenceGridRow(DynamicGridRow parentRow, ConsultantAccessVo consultantAccess)
{
	if (parentRow == null)
		throw new CodingRuntimeException("Major Logical Error - Can not add consultant access row to a null row");
	
	if (consultantAccess == null)
		return;
	
	
	DynamicGridCell newCell;
	DynamicGridColumn column;

	// Create a new row
	DynamicGridRow newRow = parentRow.getRows().newRow();
	newRow.setValue(consultantAccess);
	
	// Create the first cell in the row
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_IMAGE);
	newCell = newRow.getCells().newCell(column, DynamicCellType.IMAGE);
	newCell.setValue(form.getImages().Core.User);

	// Create the second cell in the row
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESS_CATEGORY);
	newCell = newRow.getCells().newCell(column, DynamicCellType.STRING);
	newCell.setValue(consultantAccess.getConsultant().getIHcpName());
	newCell.setReadOnly(true);
	
	// Create the third cell in the row
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESSRIGHTS);
	newCell = newRow.getCells().newCell(column, DynamicCellType.ANSWER);
	engine.populate(newCell, Access.getNegativeInstancesAsIItemCollection());
	newCell.setValue(consultantAccess.getAccessRight());
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void newConsultantCorrespondece(DynamicGridRow parrentRow)
{
	if (parrentRow == null)
		throw new CodingRuntimeException("Major Logical Error - Can not add a CONSULTANT correspondence to a null parrent row");

	if (!(parrentRow.getValue() instanceof AccessCategory) || (((AccessCategory) parrentRow.getValue()) != AccessCategory.CONSULTANTS))
		throw new CodingRuntimeException("Logical Error - Function must be called from CONSULTANTS category row only");
	
	parrentRow.setExpanded(true);
	
	// Create a new row
	DynamicGridRow newRow = parrentRow.getRows().newRow(true);
	newRow.setValue(new ConsultantAccessVo());
	form.dyngrdDetails().resetScrollPosition();
	
	// Declare a new cell
	DynamicGridCell newCell;
	// Column identifier
	DynamicGridColumn column;
	
	
	// Create the first cell
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_IMAGE);
	newCell = newRow.getCells().newCell(column, DynamicCellType.IMAGE);
	newCell.setValue(form.getImages().Core.User);

	// Create the second cell
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESS_CATEGORY);
	newCell = newRow.getCells().newCell(column, DynamicCellType.QUERYCOMBOBOX);
	newCell.setAutoPostBack(true);
	
	// Create the third cell
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESSRIGHTS);
	newCell = newRow.getCells().newCell(column, DynamicCellType.ANSWER);
	engine.populate(newCell, Access.getNegativeInstancesAsIItemCollection());
	newCell.setAutoPostBack(true);
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateConsultantAccessRowValue(DynamicGridRow row)
{
	if (row == null || (row.getParent() == null) || (!(row.getParent().getValue() instanceof AccessCategory)) || (((AccessCategory)row.getParent().getValue()) != AccessCategory.CONSULTANTS))
		throw new CodingRuntimeException("Major Logical Problem");
	
	if (row.getValue() == null)
		row.setValue(new ConsultantAccessVo());
	
	if (!(row.getValue() instanceof ConsultantAccessVo))
		throw new CodingRuntimeException("BUG");


	DynamicGridColumn column;
	DynamicGridCell cell;
	
	// Get second cell value
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESS_CATEGORY);
	cell = row.getCells().get(column);
	if (cell.getType() != DynamicCellType.STRING)
	{
		if (cell.getValue() == null)
		{
			((ConsultantAccessVo) row.getValue()).setConsultant(null);
			cell.setTypedText(null);
		}
		else
		{
			((ConsultantAccessVo) row.getValue()).setConsultant((MedicLiteVo) cell.getValue());
		}
	}
	
	// Get third cell value
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESSRIGHTS);
	cell = row.getCells().get(column);
	((ConsultantAccessVo) row.getValue()).setAccessRight((Access) cell.getValue());
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addConsultantsToUserAccess(ConsultantAccessVoCollection consultants, DynamicGridRowCollection rows)
{
	// NOTE: DO NOT make consultants = new ConsultantAccessVoCollection() in this function
	// consultants MUST ALWAYS reference the clinics in the UserAccessVo

	if (rows == null)
		return;
	
	if (consultants == null)
		throw new CodingRuntimeException("Logical Error - Inserting values into null CONSULTANTS collection");

	
	// Add the records from the grid
	for (int i = 0; i < rows.size(); i++)
	{
		DynamicGridRow row = rows.get(i);
		
		if (row.getValue() == null)
			continue;
		
		if (!(row.getValue() instanceof ConsultantAccessVo))
			throw new CodingRuntimeException("Major Logical Error");
		
		updateConsultantAccessRowValue(row);
		
		ConsultantAccessVo consultantAccess = (ConsultantAccessVo) row.getValue();
		
		if (consultantAccess.getConsultant() != null || consultantAccess.getAccessRight() != null)
		{
			consultants.add((ConsultantAccessVo) row.getValue());
		}
	}
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void newConsultantCorrespondenceGridRow(DynamicGridRow parentRow, ConsultantAccessVo consultantAccess)
{
	if (parentRow == null)
		throw new CodingRuntimeException("Major Logical Error - Can not add consultant access row to a null row");
	
	if (consultantAccess == null)
		return;
	
	
	DynamicGridCell newCell;
	DynamicGridColumn column;

	// Create a new row
	DynamicGridRow newRow = parentRow.getRows().newRow();
	newRow.setValue(consultantAccess);
	
	// Create the first cell in the row
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_IMAGE);
	newCell = newRow.getCells().newCell(column, DynamicCellType.IMAGE);
	newCell.setValue(form.getImages().Core.User);

	// Create the second cell in the row
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESS_CATEGORY);
	newCell = newRow.getCells().newCell(column, DynamicCellType.STRING);
	newCell.setValue(consultantAccess.getConsultant().getIHcpName());
	newCell.setReadOnly(true);
	
	// Create the third cell in the row
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESSRIGHTS);
	newCell = newRow.getCells().newCell(column, DynamicCellType.ANSWER);
	engine.populate(newCell, Access.getNegativeInstancesAsIItemCollection());
	newCell.setValue(consultantAccess.getAccessRight());
}
 
Example 10
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void newConsultantCorrespondece(DynamicGridRow parrentRow)
{
	if (parrentRow == null)
		throw new CodingRuntimeException("Major Logical Error - Can not add a CONSULTANT correspondence to a null parrent row");

	if (!(parrentRow.getValue() instanceof AccessCategory) || (((AccessCategory) parrentRow.getValue()) != AccessCategory.CONSULTANTS))
		throw new CodingRuntimeException("Logical Error - Function must be called from CONSULTANTS category row only");
	
	parrentRow.setExpanded(true);
	
	// Create a new row
	DynamicGridRow newRow = parrentRow.getRows().newRow(true);
	newRow.setValue(new ConsultantAccessVo());
	form.dyngrdDetails().resetScrollPosition();
	
	// Declare a new cell
	DynamicGridCell newCell;
	// Column identifier
	DynamicGridColumn column;
	
	
	// Create the first cell
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_IMAGE);
	newCell = newRow.getCells().newCell(column, DynamicCellType.IMAGE);
	newCell.setValue(form.getImages().Core.User);

	// Create the second cell
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESS_CATEGORY);
	newCell = newRow.getCells().newCell(column, DynamicCellType.QUERYCOMBOBOX);
	newCell.setAutoPostBack(true);
	
	// Create the third cell
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESSRIGHTS);
	newCell = newRow.getCells().newCell(column, DynamicCellType.ANSWER);
	engine.populate(newCell, Access.getNegativeInstancesAsIItemCollection());
	newCell.setAutoPostBack(true);
}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateConsultantAccessRowValue(DynamicGridRow row)
{
	if (row == null || (row.getParent() == null) || (!(row.getParent().getValue() instanceof AccessCategory)) || (((AccessCategory)row.getParent().getValue()) != AccessCategory.CONSULTANTS))
		throw new CodingRuntimeException("Major Logical Problem");
	
	if (row.getValue() == null)
		row.setValue(new ConsultantAccessVo());
	
	if (!(row.getValue() instanceof ConsultantAccessVo))
		throw new CodingRuntimeException("BUG");


	DynamicGridColumn column;
	DynamicGridCell cell;
	
	// Get second cell value
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESS_CATEGORY);
	cell = row.getCells().get(column);
	if (cell.getType() != DynamicCellType.STRING)
	{
		if (cell.getValue() == null)
		{
			((ConsultantAccessVo) row.getValue()).setConsultant(null);
			cell.setTypedText(null);
		}
		else
		{
			((ConsultantAccessVo) row.getValue()).setConsultant((MedicLiteVo) cell.getValue());
		}
	}
	
	// Get third cell value
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESSRIGHTS);
	cell = row.getCells().get(column);
	((ConsultantAccessVo) row.getValue()).setAccessRight((Access) cell.getValue());
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addConsultantsToUserAccess(ConsultantAccessVoCollection consultants, DynamicGridRowCollection rows)
{
	// NOTE: DO NOT make consultants = new ConsultantAccessVoCollection() in this function
	// consultants MUST ALWAYS reference the clinics in the UserAccessVo

	if (rows == null)
		return;
	
	if (consultants == null)
		throw new CodingRuntimeException("Logical Error - Inserting values into null CONSULTANTS collection");

	
	// Add the records from the grid
	for (int i = 0; i < rows.size(); i++)
	{
		DynamicGridRow row = rows.get(i);
		
		if (row.getValue() == null)
			continue;
		
		if (!(row.getValue() instanceof ConsultantAccessVo))
			throw new CodingRuntimeException("Major Logical Error");
		
		updateConsultantAccessRowValue(row);
		
		ConsultantAccessVo consultantAccess = (ConsultantAccessVo) row.getValue();
		
		if (consultantAccess.getConsultant() != null || consultantAccess.getAccessRight() != null)
		{
			consultants.add((ConsultantAccessVo) row.getValue());
		}
	}
}
 
Example 13
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void newConsultantCorrespondenceGridRow(DynamicGridRow parentRow, ConsultantAccessVo consultantAccess)
{
	if (parentRow == null)
		throw new CodingRuntimeException("Major Logical Error - Can not add consultant access row to a null row");
	
	if (consultantAccess == null)
		return;
	
	
	DynamicGridCell newCell;
	DynamicGridColumn column;

	// Create a new row
	DynamicGridRow newRow = parentRow.getRows().newRow();
	newRow.setValue(consultantAccess);
	
	// Create the first cell in the row
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_IMAGE);
	newCell = newRow.getCells().newCell(column, DynamicCellType.IMAGE);
	newCell.setValue(form.getImages().Core.User);

	// Create the second cell in the row
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESS_CATEGORY);
	newCell = newRow.getCells().newCell(column, DynamicCellType.STRING);
	newCell.setValue(consultantAccess.getConsultant().getIHcpName());
	newCell.setReadOnly(true);
	
	// Create the third cell in the row
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESSRIGHTS);
	newCell = newRow.getCells().newCell(column, DynamicCellType.ANSWER);
	engine.populate(newCell, Access.getNegativeInstancesAsIItemCollection());
	newCell.setValue(consultantAccess.getAccessRight());
}
 
Example 14
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void newConsultantCorrespondece(DynamicGridRow parrentRow)
{
	if (parrentRow == null)
		throw new CodingRuntimeException("Major Logical Error - Can not add a CONSULTANT correspondence to a null parrent row");

	if (!(parrentRow.getValue() instanceof AccessCategory) || (((AccessCategory) parrentRow.getValue()) != AccessCategory.CONSULTANTS))
		throw new CodingRuntimeException("Logical Error - Function must be called from CONSULTANTS category row only");
	
	parrentRow.setExpanded(true);
	
	// Create a new row
	DynamicGridRow newRow = parrentRow.getRows().newRow(true);
	newRow.setValue(new ConsultantAccessVo());
	form.dyngrdDetails().resetScrollPosition();
	
	// Declare a new cell
	DynamicGridCell newCell;
	// Column identifier
	DynamicGridColumn column;
	
	
	// Create the first cell
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_IMAGE);
	newCell = newRow.getCells().newCell(column, DynamicCellType.IMAGE);
	newCell.setValue(form.getImages().Core.User);

	// Create the second cell
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESS_CATEGORY);
	newCell = newRow.getCells().newCell(column, DynamicCellType.QUERYCOMBOBOX);
	newCell.setAutoPostBack(true);
	
	// Create the third cell
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESSRIGHTS);
	newCell = newRow.getCells().newCell(column, DynamicCellType.ANSWER);
	engine.populate(newCell, Access.getNegativeInstancesAsIItemCollection());
	newCell.setAutoPostBack(true);
}
 
Example 15
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateConsultantAccessRowValue(DynamicGridRow row)
{
	if (row == null || (row.getParent() == null) || (!(row.getParent().getValue() instanceof AccessCategory)) || (((AccessCategory)row.getParent().getValue()) != AccessCategory.CONSULTANTS))
		throw new CodingRuntimeException("Major Logical Problem");
	
	if (row.getValue() == null)
		row.setValue(new ConsultantAccessVo());
	
	if (!(row.getValue() instanceof ConsultantAccessVo))
		throw new CodingRuntimeException("BUG");


	DynamicGridColumn column;
	DynamicGridCell cell;
	
	// Get second cell value
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESS_CATEGORY);
	cell = row.getCells().get(column);
	if (cell.getType() != DynamicCellType.STRING)
	{
		if (cell.getValue() == null)
		{
			((ConsultantAccessVo) row.getValue()).setConsultant(null);
			cell.setTypedText(null);
		}
		else
		{
			((ConsultantAccessVo) row.getValue()).setConsultant((MedicLiteVo) cell.getValue());
		}
	}
	
	// Get third cell value
	column = form.dyngrdDetails().getColumns().getByIdentifier(COL_ACCESSRIGHTS);
	cell = row.getCells().get(column);
	((ConsultantAccessVo) row.getValue()).setAccessRight((Access) cell.getValue());
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addConsultantsToUserAccess(ConsultantAccessVoCollection consultants, DynamicGridRowCollection rows)
{
	// NOTE: DO NOT make consultants = new ConsultantAccessVoCollection() in this function
	// consultants MUST ALWAYS reference the clinics in the UserAccessVo

	if (rows == null)
		return;
	
	if (consultants == null)
		throw new CodingRuntimeException("Logical Error - Inserting values into null CONSULTANTS collection");

	
	// Add the records from the grid
	for (int i = 0; i < rows.size(); i++)
	{
		DynamicGridRow row = rows.get(i);
		
		if (row.getValue() == null)
			continue;
		
		if (!(row.getValue() instanceof ConsultantAccessVo))
			throw new CodingRuntimeException("Major Logical Error");
		
		updateConsultantAccessRowValue(row);
		
		ConsultantAccessVo consultantAccess = (ConsultantAccessVo) row.getValue();
		
		if (consultantAccess.getConsultant() != null || consultantAccess.getAccessRight() != null)
		{
			consultants.add((ConsultantAccessVo) row.getValue());
		}
	}
}
 
Example 17
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateQueryComboboxConsultants(DynamicGridCell cell, MedicLiteVoCollection medicList)
{
	if (cell == null)
		throw new CodingRuntimeException("Major Logical Error - Can not populate a null cell");

	// Clear the query combobox
	cell.getItems().clear();
	
	if (medicList == null || medicList.size() == 0)
		return;
	
	if (cell.getRow() == null || cell.getRow().getParent() == null)
		throw new CodingRuntimeException("Major Logical Error - Cell must belong to a non category row");
	
	
	// Remove the medics already added
	DynamicGridRow parentRow = cell.getRow().getParent();
	DynamicGridRow row;
	
	for (int i = 0; i < parentRow.getRows().size(); i++)
	{
		row = parentRow.getRows().get(i);
		
		// If it is the same row as the cell row or the row has a null value move on to the next row
		if (row == null || row == cell.getRow() || row.getValue() == null)
			continue;
		
		if (!(row.getValue() instanceof ConsultantAccessVo))
			throw new CodingRuntimeException("Non consultant correspondence added to consultant category");
		
		medicList.remove(((ConsultantAccessVo) row.getValue()).getConsultant());
	}
	
	
	if (medicList.size() == 0)
		return;
	
	
	// Add consultants to query combobox item collection
	DynamicGridCellItem newMedicEntry;
	
	for (int i = 0; i < medicList.size(); i++)
	{
		// Create a new row for each entry
		newMedicEntry = cell.getItems().newItem();
		newMedicEntry.setValue(medicList.get(i));
	}
	
	// Expand the cell
	cell.setMaxDropDownItems(MAXDROPDOWNITEMS);
	cell.showOpened();
}
 
Example 18
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateQueryComboboxConsultants(DynamicGridCell cell, MedicLiteVoCollection medicList)
{
	if (cell == null)
		throw new CodingRuntimeException("Major Logical Error - Can not populate a null cell");

	// Clear the query combobox
	cell.getItems().clear();
	
	if (medicList == null || medicList.size() == 0)
		return;
	
	if (cell.getRow() == null || cell.getRow().getParent() == null)
		throw new CodingRuntimeException("Major Logical Error - Cell must belong to a non category row");
	
	
	// Remove the medics already added
	DynamicGridRow parentRow = cell.getRow().getParent();
	DynamicGridRow row;
	
	for (int i = 0; i < parentRow.getRows().size(); i++)
	{
		row = parentRow.getRows().get(i);
		
		// If it is the same row as the cell row or the row has a null value move on to the next row
		if (row == null || row == cell.getRow() || row.getValue() == null)
			continue;
		
		if (!(row.getValue() instanceof ConsultantAccessVo))
			throw new CodingRuntimeException("Non consultant correspondence added to consultant category");
		
		medicList.remove(((ConsultantAccessVo) row.getValue()).getConsultant());
	}
	
	
	if (medicList.size() == 0)
		return;
	
	
	// Add consultants to query combobox item collection
	DynamicGridCellItem newMedicEntry;
	
	for (int i = 0; i < medicList.size(); i++)
	{
		// Create a new row for each entry
		newMedicEntry = cell.getItems().newItem();
		newMedicEntry.setValue(medicList.get(i));
	}
	
	// Expand the cell
	cell.setMaxDropDownItems(MAXDROPDOWNITEMS);
	cell.showOpened();
}
 
Example 19
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateQueryComboboxConsultants(DynamicGridCell cell, MedicLiteVoCollection medicList)
{
	if (cell == null)
		throw new CodingRuntimeException("Major Logical Error - Can not populate a null cell");

	// Clear the query combobox
	cell.getItems().clear();
	
	if (medicList == null || medicList.size() == 0)
		return;
	
	if (cell.getRow() == null || cell.getRow().getParent() == null)
		throw new CodingRuntimeException("Major Logical Error - Cell must belong to a non category row");
	
	
	// Remove the medics already added
	DynamicGridRow parentRow = cell.getRow().getParent();
	DynamicGridRow row;
	
	for (int i = 0; i < parentRow.getRows().size(); i++)
	{
		row = parentRow.getRows().get(i);
		
		// If it is the same row as the cell row or the row has a null value move on to the next row
		if (row == null || row == cell.getRow() || row.getValue() == null)
			continue;
		
		if (!(row.getValue() instanceof ConsultantAccessVo))
			throw new CodingRuntimeException("Non consultant correspondence added to consultant category");
		
		medicList.remove(((ConsultantAccessVo) row.getValue()).getConsultant());
	}
	
	
	if (medicList.size() == 0)
		return;
	
	
	// Add consultants to query combobox item collection
	DynamicGridCellItem newMedicEntry;
	
	for (int i = 0; i < medicList.size(); i++)
	{
		// Create a new row for each entry
		newMedicEntry = cell.getItems().newItem();
		newMedicEntry.setValue(medicList.get(i));
	}
	
	// Expand the cell
	cell.setMaxDropDownItems(MAXDROPDOWNITEMS);
	cell.showOpened();
}
 
Example 20
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateQueryComboboxConsultants(DynamicGridCell cell, MedicLiteVoCollection medicList)
{
	if (cell == null)
		throw new CodingRuntimeException("Major Logical Error - Can not populate a null cell");

	// Clear the query combobox
	cell.getItems().clear();
	
	if (medicList == null || medicList.size() == 0)
		return;
	
	if (cell.getRow() == null || cell.getRow().getParent() == null)
		throw new CodingRuntimeException("Major Logical Error - Cell must belong to a non category row");
	
	
	// Remove the medics already added
	DynamicGridRow parentRow = cell.getRow().getParent();
	DynamicGridRow row;
	
	for (int i = 0; i < parentRow.getRows().size(); i++)
	{
		row = parentRow.getRows().get(i);
		
		// If it is the same row as the cell row or the row has a null value move on to the next row
		if (row == null || row == cell.getRow() || row.getValue() == null)
			continue;
		
		if (!(row.getValue() instanceof ConsultantAccessVo))
			throw new CodingRuntimeException("Non consultant correspondence added to consultant category");
		
		medicList.remove(((ConsultantAccessVo) row.getValue()).getConsultant());
	}
	
	
	if (medicList.size() == 0)
		return;
	
	
	// Add consultants to query combobox item collection
	DynamicGridCellItem newMedicEntry;
	
	for (int i = 0; i < medicList.size(); i++)
	{
		// Create a new row for each entry
		newMedicEntry = cell.getItems().newItem();
		newMedicEntry.setValue(medicList.get(i));
	}
	
	// Expand the cell
	cell.setMaxDropDownItems(MAXDROPDOWNITEMS);
	cell.showOpened();
}