Java Code Examples for ims.framework.enumerations.DynamicCellDecoratorMode

The following are top voted examples for showing how to use ims.framework.enumerations.DynamicCellDecoratorMode. 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: UserAssessmentInstHelper.java   View source code 6 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly) throws PresentationLogicException 
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);				
	setCellTooltip(cell, configAnswer);
	if(isDPP && cellAnswerType != null && cellAnswerType.equals(DynamicCellType.MULTISELECT))
	{
		cell.setAutoPostBack(true);
	}
	
	return cell;
}
 
Example 2
Project: AvoinApotti   File: UserAssessmentInstHelper.java   View source code 6 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, Question_AnswerTypeVo configAnswer, Answer_DetailsVo instAnswer, boolean readOnly) throws PresentationLogicException 
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);				
	setCellTooltip(cell, configAnswer);
	if(isDPP && cellAnswerType != null && cellAnswerType.equals(DynamicCellType.MULTISELECT))
	{
		cell.setAutoPostBack(true);
	}
	
	return cell;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void addMessage()
{
	DynamicGridRow messageRow = form.lyrRules().tabActions().dyngrdActions().getSelectedRow();
	if (messageRow != null)
	{
		DynamicGridRow messageInstanceRow = messageRow.getRows().newRow();
		DynamicGridColumn messageInstanceColl = getColByIndexForActionGrid(0);
		if (messageInstanceColl == null)
		{
			messageInstanceColl = createColumnForActionGrid("", 0);
		}
		DynamicGridCell messageInstancCell = messageInstanceRow.getCells().newCell(messageInstanceColl, DynamicCellType.WRAPTEXT);
		messageInstancCell.setAutoPostBack(true);
		messageInstancCell.setWidth(450);
		messageInstancCell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
		messageInstanceRow.setIdentifier(NOTIFICATION_MESSAGE_INSTANCE);
	}
}
 
Example 4
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   View source code 6 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly)  throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellAnswer(cell, instAnswer);
	
	if (instAnswer == null)
	{
		setCellTooltip(cell, configAnswer);
	}
	else //WDEV-16927
	{
		setCellAnswerTooltip(cell, instAnswer);
	}
	
	return cell;
}
 
Example 5
Project: openMAXIMS   File: UserAssessmentInstHelper.java   View source code 6 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly) throws PresentationLogicException 
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);				
	setCellTooltip(cell, configAnswer);
	if(isDPP && cellAnswerType != null && cellAnswerType.equals(DynamicCellType.MULTISELECT))
	{
		cell.setAutoPostBack(true);
	}
	
	return cell;
}
 
Example 6
Project: openMAXIMS   File: UserAssessmentInstHelper.java   View source code 6 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, Question_AnswerTypeVo configAnswer, Answer_DetailsVo instAnswer, boolean readOnly) throws PresentationLogicException 
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);				
	setCellTooltip(cell, configAnswer);
	if(isDPP && cellAnswerType != null && cellAnswerType.equals(DynamicCellType.MULTISELECT))
	{
		cell.setAutoPostBack(true);
	}
	
	return cell;
}
 
Example 7
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void addMessage()
{
	DynamicGridRow messageRow = form.lyrRules().tabActions().dyngrdActions().getSelectedRow();
	if (messageRow != null)
	{
		DynamicGridRow messageInstanceRow = messageRow.getRows().newRow();
		DynamicGridColumn messageInstanceColl = getColByIndexForActionGrid(0);
		if (messageInstanceColl == null)
		{
			messageInstanceColl = createColumnForActionGrid("", 0);
		}
		DynamicGridCell messageInstancCell = messageInstanceRow.getCells().newCell(messageInstanceColl, DynamicCellType.WRAPTEXT);
		messageInstancCell.setAutoPostBack(true);
		messageInstancCell.setWidth(450);
		messageInstancCell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
		messageInstanceRow.setIdentifier(NOTIFICATION_MESSAGE_INSTANCE);
	}
}
 
Example 8
Project: openMAXIMS   File: MyOrderQuestionsPopulation.java   View source code 6 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly)  throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellAnswer(cell, instAnswer);
	
	if (instAnswer == null)
	{
		setCellTooltip(cell, configAnswer);
	}
	else //WDEV-16927
	{
		setCellAnswerTooltip(cell, instAnswer);
	}
	
	return cell;
}
 
Example 9
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly)
{

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);

	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellAnswer(cell, instAnswer);

	if (instAnswer == null)
	{
		setCellTooltip(cell, configAnswer);
	}
	else
	{
		setCellAnswerTooltip(cell, instAnswer);
	}

	return cell;
}
 
Example 10
Project: openMAXIMS   File: UserAssessmentInstHelper.java   View source code 6 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly) throws PresentationLogicException 
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);				
	setCellTooltip(cell, configAnswer);
	if(isDPP && cellAnswerType != null && cellAnswerType.equals(DynamicCellType.MULTISELECT))
	{
		cell.setAutoPostBack(true);
	}
	
	return cell;
}
 
Example 11
Project: openMAXIMS   File: UserAssessmentInstHelper.java   View source code 6 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, Question_AnswerTypeVo configAnswer, Answer_DetailsVo instAnswer, boolean readOnly) throws PresentationLogicException 
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);				
	setCellTooltip(cell, configAnswer);
	if(isDPP && cellAnswerType != null && cellAnswerType.equals(DynamicCellType.MULTISELECT))
	{
		cell.setAutoPostBack(true);
	}
	
	return cell;
}
 
Example 12
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void addMessage()
{
	DynamicGridRow messageRow = form.lyrRules().tabActions().dyngrdActions().getSelectedRow();
	if (messageRow != null)
	{
		DynamicGridRow messageInstanceRow = messageRow.getRows().newRow();
		DynamicGridColumn messageInstanceColl = getColByIndexForActionGrid(0);
		if (messageInstanceColl == null)
		{
			messageInstanceColl = createColumnForActionGrid("", 0);
		}
		DynamicGridCell messageInstancCell = messageInstanceRow.getCells().newCell(messageInstanceColl, DynamicCellType.WRAPTEXT);
		messageInstancCell.setAutoPostBack(true);
		messageInstancCell.setWidth(450);
		messageInstancCell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
		messageInstanceRow.setIdentifier(NOTIFICATION_MESSAGE_INSTANCE);
	}
}
 
Example 13
Project: openMAXIMS   File: MyOrderQuestionsPopulation.java   View source code 6 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly)  throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellAnswer(cell, instAnswer);
	
	if (instAnswer == null)
	{
		setCellTooltip(cell, configAnswer);
	}
	else //WDEV-16927
	{
		setCellAnswerTooltip(cell, instAnswer);
	}
	
	return cell;
}
 
Example 14
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   View source code 6 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly) throws PresentationLogicException 
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);				
	setCellTooltip(cell, configAnswer);
	if(isDPP && cellAnswerType != null && cellAnswerType.equals(DynamicCellType.MULTISELECT))
	{
		cell.setAutoPostBack(true);
	}
	
	return cell;
}
 
Example 15
Project: openmaxims-linux   File: UserAssessmentInstHelper.java   View source code 6 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, Question_AnswerTypeVo configAnswer, Answer_DetailsVo instAnswer, boolean readOnly) throws PresentationLogicException 
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);				
	setCellTooltip(cell, configAnswer);
	if(isDPP && cellAnswerType != null && cellAnswerType.equals(DynamicCellType.MULTISELECT))
	{
		cell.setAutoPostBack(true);
	}
	
	return cell;
}
 
Example 16
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void addMessage()
{
	DynamicGridRow messageRow = form.lyrRules().tabActions().dyngrdActions().getSelectedRow();
	if (messageRow != null)
	{
		DynamicGridRow messageInstanceRow = messageRow.getRows().newRow();
		DynamicGridColumn messageInstanceColl = getColByIndexForActionGrid(0);
		if (messageInstanceColl == null)
		{
			messageInstanceColl = createColumnForActionGrid("", 0);
		}
		DynamicGridCell messageInstancCell = messageInstanceRow.getCells().newCell(messageInstanceColl, DynamicCellType.WRAPTEXT);
		messageInstancCell.setAutoPostBack(true);
		messageInstancCell.setWidth(450);
		messageInstancCell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
		messageInstanceRow.setIdentifier(NOTIFICATION_MESSAGE_INSTANCE);
	}
}
 
Example 17
Project: openmaxims-linux   File: MyOrderQuestionsPopulation.java   View source code 6 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly)  throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicCellType cellAnswerType = getCellAnswerType(configAnswer.getAnswerType());
	DynamicGridCell cell = row.getCells().newCell(column, cellAnswerType);
	
	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellAnswer(cell, instAnswer);
	
	if (instAnswer == null)
	{
		setCellTooltip(cell, configAnswer);
	}
	else //WDEV-16927
	{
		setCellAnswerTooltip(cell, instAnswer);
	}
	
	return cell;
}
 
Example 18
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly, boolean readOnlyBecauseUserHasNoRoles) throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicGridCell cell = row.getCells().newCell(column, getCellAnswerType(configAnswer.getAnswerType()));

	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellTooltip(cell, configAnswer, readOnlyBecauseUserHasNoRoles);//wdev-3709

	return cell;
}
 
Example 19
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, Question_AnswerTypeVo configAnswer, Answer_DetailsVo instAnswer, boolean readOnly, boolean readOnlyBecauseUserHasNoRoles) throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicGridCell cell = row.getCells().newCell(column, getCellAnswerType(configAnswer.getAnswerType()));

	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellTooltip(cell, configAnswer, readOnlyBecauseUserHasNoRoles);//wdev-3709

	return cell;
}
 
Example 20
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   View source code 5 votes vote down vote up
private boolean addAnswers(DynamicGridRow row, DynamicGridColumn[] columns, GeneralQuestionAnswerVo question)
{
	if(row == null || question == null || question.getIQuestionTypeQuestion() == null ||  question.getIQuestionTypeQuestion().getAnswerTypes() == null  || question.getIQuestionTypeQuestion().getAnswerTypes().size() == 0)
		return false;
		
	for(int x = 0; x < question.getIQuestionTypeQuestion().getAnswerTypes().size(); x++)
	{
		QuestionAnswerTypeVo answer = question.getIQuestionTypeQuestion().getAnswerTypes().get(x);
		if(answer != null)
		{
			QuestionAnswerType type = answer.getAnswerType();
			DynamicCellType cellType = getQuestionAnswerType(type);
			DynamicGridCell answerCell = row.getCells().newCell(columns[x], getQuestionAnswerType(type));
			answerCell.setWidth(getAnswerCellWidth(cellType));
			answerCell.setReadOnly(false);
			
			setAnswerCellValue(answerCell, answer);
			
			if(cellType == DynamicCellType.DYNAMICLABEL || cellType == DynamicCellType.BOOL)
				answerCell.setDecoratorType(DynamicCellDecoratorMode.NEVER);
			else
				answerCell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
			
			answerCell.setTooltip(getAnswerCellTooltip(cellType));
			answerCell.setIdentifier(answer);
			
			addAnswerData(row, question);
		}
	}
	
	return true;		
}
 
Example 21
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void newNote(DynamicGridRow row, TltSummaryNoteVo note, boolean isEditMode) 
{			
	if (row == null) {
		throw new CodingRuntimeException("DynamicGridRow is null");
	}
	
	if (note == null) {
		row.setIdentifier(NEW_ROW_IDENTIFIER);
	}
	
	DynamicGridColumn 	coll;
	DynamicGridCell 	cell;
			
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_DATE);
	cell = row.getCells().newCell(coll, DynamicCellType.DATETIME);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? note.getAuthoringInformation().getAuthoringDateTime() : new DateTime())  : new DateTime());				
	cell.setBackColor(Color.fromRGB(224, 224, 224));		
	cell.setReadOnly(true);
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_USER);
	cell = row.getCells().newCell(coll, DynamicCellType.STRING);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcpIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcp().getName() != null ? note.getAuthoringInformation().getAuthoringHcp().getName().toString() : null) : null ) : null)  : domain.getHcpLiteUser() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName().toString() : null : null);		
	cell.setBackColor(Color.fromRGB(224, 224, 224));
	cell.setReadOnly(true);
			
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTES);		
	cell = row.getCells().newCell(coll, DynamicCellType.WRAPTEXT);						
	cell.setValue(note != null ? note.getSummaryNote() : null);
	cell.setDecoratorType(DynamicCellDecoratorMode.NEVER);	
	cell.setReadOnly(isEditMode ? false : true);
	cell.setBackColor(isEditMode ? Color.White : Color.fromRGB(224, 224, 224));
	cell.setReadOnly(!isEditMode);		
	cell.setStringMaxLength(3000);
	
	row.setValue(note);		
	
	if (isEditMode) {
		form.getLocalContext().setEditedNote(note);
	}			
}
 
Example 22
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly, boolean readOnlyBecauseUserHasNoRoles) throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicGridCell cell = row.getCells().newCell(column, getCellAnswerType(configAnswer.getAnswerType()));

	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellTooltip(cell, configAnswer, readOnlyBecauseUserHasNoRoles);//wdev-3709

	return cell;
}
 
Example 23
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, Question_AnswerTypeVo configAnswer, Answer_DetailsVo instAnswer, boolean readOnly, boolean readOnlyBecauseUserHasNoRoles) throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicGridCell cell = row.getCells().newCell(column, getCellAnswerType(configAnswer.getAnswerType()));

	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellTooltip(cell, configAnswer, readOnlyBecauseUserHasNoRoles);//wdev-3709

	return cell;
}
 
Example 24
Project: openMAXIMS   File: MyOrderQuestionsPopulation.java   View source code 5 votes vote down vote up
private boolean addAnswers(DynamicGridRow row, DynamicGridColumn[] columns, GeneralQuestionAnswerVo question)
{
	if(row == null || question == null || question.getIQuestionTypeQuestion() == null ||  question.getIQuestionTypeQuestion().getAnswerTypes() == null  || question.getIQuestionTypeQuestion().getAnswerTypes().size() == 0)
		return false;
		
	for(int x = 0; x < question.getIQuestionTypeQuestion().getAnswerTypes().size(); x++)
	{
		QuestionAnswerTypeVo answer = question.getIQuestionTypeQuestion().getAnswerTypes().get(x);
		if(answer != null)
		{
			QuestionAnswerType type = answer.getAnswerType();
			DynamicCellType cellType = getQuestionAnswerType(type);
			DynamicGridCell answerCell = row.getCells().newCell(columns[x], getQuestionAnswerType(type));
			answerCell.setWidth(getAnswerCellWidth(cellType));
			answerCell.setReadOnly(false);
			
			setAnswerCellValue(answerCell, answer);
			
			if(cellType == DynamicCellType.DYNAMICLABEL || cellType == DynamicCellType.BOOL)
				answerCell.setDecoratorType(DynamicCellDecoratorMode.NEVER);
			else
				answerCell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
			
			answerCell.setTooltip(getAnswerCellTooltip(cellType));
			answerCell.setIdentifier(answer);
			
			addAnswerData(row, question);
		}
	}
	
	return true;		
}
 
Example 25
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private void newNote(DynamicGridRow row, TltSummaryNoteVo note, boolean isEditMode) 
{			
	if (row == null) {
		throw new CodingRuntimeException("DynamicGridRow is null");
	}
	
	if (note == null) {
		row.setIdentifier(NEW_ROW_IDENTIFIER);
	}
	
	DynamicGridColumn 	coll;
	DynamicGridCell 	cell;
			
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_DATE);
	cell = row.getCells().newCell(coll, DynamicCellType.DATETIME);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? note.getAuthoringInformation().getAuthoringDateTime() : new DateTime())  : new DateTime());				
	cell.setBackColor(Color.fromRGB(224, 224, 224));		
	cell.setReadOnly(true);
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_USER);
	cell = row.getCells().newCell(coll, DynamicCellType.STRING);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcpIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcp().getName() != null ? note.getAuthoringInformation().getAuthoringHcp().getName().toString() : null) : null ) : null)  : domain.getHcpLiteUser() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName().toString() : null : null);		
	cell.setBackColor(Color.fromRGB(224, 224, 224));
	cell.setReadOnly(true);
			
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTES);		
	cell = row.getCells().newCell(coll, DynamicCellType.WRAPTEXT);						
	cell.setValue(note != null ? note.getSummaryNote() : null);
	cell.setDecoratorType(DynamicCellDecoratorMode.NEVER);	
	cell.setReadOnly(isEditMode ? false : true);
	cell.setBackColor(isEditMode ? Color.White : Color.fromRGB(224, 224, 224));
	cell.setReadOnly(!isEditMode);		
	cell.setStringMaxLength(3000);
	
	row.setValue(note);		
	
	if (isEditMode) {
		form.getLocalContext().setEditedNote(note);
	}			
}
 
Example 26
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly, boolean readOnlyBecauseUserHasNoRoles) throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicGridCell cell = row.getCells().newCell(column, getCellAnswerType(configAnswer.getAnswerType()));

	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellTooltip(cell, configAnswer, readOnlyBecauseUserHasNoRoles);//wdev-3709

	return cell;
}
 
Example 27
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, Question_AnswerTypeVo configAnswer, Answer_DetailsVo instAnswer, boolean readOnly, boolean readOnlyBecauseUserHasNoRoles) throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicGridCell cell = row.getCells().newCell(column, getCellAnswerType(configAnswer.getAnswerType()));

	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellTooltip(cell, configAnswer, readOnlyBecauseUserHasNoRoles);//wdev-3709

	return cell;
}
 
Example 28
Project: openMAXIMS   File: MyOrderQuestionsPopulation.java   View source code 5 votes vote down vote up
private boolean addAnswers(DynamicGridRow row, DynamicGridColumn[] columns, GeneralQuestionAnswerVo question)
{
	if(row == null || question == null || question.getIQuestionTypeQuestion() == null ||  question.getIQuestionTypeQuestion().getAnswerTypes() == null  || question.getIQuestionTypeQuestion().getAnswerTypes().size() == 0)
		return false;
		
	for(int x = 0; x < question.getIQuestionTypeQuestion().getAnswerTypes().size(); x++)
	{
		QuestionAnswerTypeVo answer = question.getIQuestionTypeQuestion().getAnswerTypes().get(x);
		if(answer != null)
		{
			QuestionAnswerType type = answer.getAnswerType();
			DynamicCellType cellType = getQuestionAnswerType(type);
			DynamicGridCell answerCell = row.getCells().newCell(columns[x], getQuestionAnswerType(type));
			answerCell.setWidth(getAnswerCellWidth(cellType));
			answerCell.setReadOnly(false);
			
			setAnswerCellValue(answerCell, answer);
			
			if(cellType == DynamicCellType.DYNAMICLABEL || cellType == DynamicCellType.BOOL)
				answerCell.setDecoratorType(DynamicCellDecoratorMode.NEVER);
			else
				answerCell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
			
			answerCell.setTooltip(getAnswerCellTooltip(cellType));
			answerCell.setIdentifier(answer);
			
			addAnswerData(row, question);
		}
	}
	
	return true;		
}
 
Example 29
Project: openMAXIMS   File: Logic.java   View source code 5 votes vote down vote up
private void newNote(DynamicGridRow row, TltSummaryNoteVo note, boolean isEditMode) 
{			
	if (row == null) {
		throw new CodingRuntimeException("DynamicGridRow is null");
	}
	
	if (note == null) {
		row.setIdentifier(NEW_ROW_IDENTIFIER);
	}
	
	DynamicGridColumn 	coll;
	DynamicGridCell 	cell;
			
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_DATE);
	cell = row.getCells().newCell(coll, DynamicCellType.DATETIME);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? note.getAuthoringInformation().getAuthoringDateTime() : new DateTime())  : new DateTime());				
	cell.setBackColor(Color.fromRGB(224, 224, 224));		
	cell.setReadOnly(true);
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_USER);
	cell = row.getCells().newCell(coll, DynamicCellType.STRING);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcpIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcp().getName() != null ? note.getAuthoringInformation().getAuthoringHcp().getName().toString() : null) : null ) : null)  : domain.getHcpLiteUser() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName().toString() : null : null);		
	cell.setBackColor(Color.fromRGB(224, 224, 224));
	cell.setReadOnly(true);
			
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTES);		
	cell = row.getCells().newCell(coll, DynamicCellType.WRAPTEXT);						
	cell.setValue(note != null ? note.getSummaryNote() : null);
	cell.setDecoratorType(DynamicCellDecoratorMode.NEVER);	
	cell.setReadOnly(isEditMode ? false : true);
	cell.setBackColor(isEditMode ? Color.White : Color.fromRGB(224, 224, 224));
	cell.setReadOnly(!isEditMode);		
	cell.setStringMaxLength(3000);
	
	row.setValue(note);		
	
	if (isEditMode) {
		form.getLocalContext().setEditedNote(note);
	}			
}
 
Example 30
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, QuestionAnswerTypeVo configAnswer, AnswerDetailsVo instAnswer, boolean readOnly, boolean readOnlyBecauseUserHasNoRoles) throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicGridCell cell = row.getCells().newCell(column, getCellAnswerType(configAnswer.getAnswerType()));

	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellTooltip(cell, configAnswer, readOnlyBecauseUserHasNoRoles);//wdev-3709

	return cell;
}
 
Example 31
Project: openmaxims-linux   File: Logic.java   View source code 5 votes vote down vote up
private DynamicGridCell addAnswerCell(DynamicGridRow row, DynamicGridColumn column, Question_AnswerTypeVo configAnswer, Answer_DetailsVo instAnswer, boolean readOnly, boolean readOnlyBecauseUserHasNoRoles) throws PresentationLogicException
{
	checkDataIntegrity(configAnswer);

	DynamicGridCell cell = row.getCells().newCell(column, getCellAnswerType(configAnswer.getAnswerType()));

	cell.setWidth(getCellAnswerWidth(configAnswer, instAnswer));
	cell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
	cell.setIdentifier(configAnswer);
	cell.setReadOnly(readOnly);
	setAnswerCellValue(cell, configAnswer, instAnswer);
	setCellTooltip(cell, configAnswer, readOnlyBecauseUserHasNoRoles);//wdev-3709

	return cell;
}
 
Example 32
Project: openmaxims-linux   File: MyOrderQuestionsPopulation.java   View source code 5 votes vote down vote up
private boolean addAnswers(DynamicGridRow row, DynamicGridColumn[] columns, GeneralQuestionAnswerVo question)
{
	if(row == null || question == null || question.getIQuestionTypeQuestion() == null ||  question.getIQuestionTypeQuestion().getAnswerTypes() == null  || question.getIQuestionTypeQuestion().getAnswerTypes().size() == 0)
		return false;
		
	for(int x = 0; x < question.getIQuestionTypeQuestion().getAnswerTypes().size(); x++)
	{
		QuestionAnswerTypeVo answer = question.getIQuestionTypeQuestion().getAnswerTypes().get(x);
		if(answer != null)
		{
			QuestionAnswerType type = answer.getAnswerType();
			DynamicCellType cellType = getQuestionAnswerType(type);
			DynamicGridCell answerCell = row.getCells().newCell(columns[x], getQuestionAnswerType(type));
			answerCell.setWidth(getAnswerCellWidth(cellType));
			answerCell.setReadOnly(false);
			
			setAnswerCellValue(answerCell, answer);
			
			if(cellType == DynamicCellType.DYNAMICLABEL || cellType == DynamicCellType.BOOL)
				answerCell.setDecoratorType(DynamicCellDecoratorMode.NEVER);
			else
				answerCell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
			
			answerCell.setTooltip(getAnswerCellTooltip(cellType));
			answerCell.setIdentifier(answer);
			
			addAnswerData(row, question);
		}
	}
	
	return true;		
}
 
Example 33
Project: AvoinApotti   File: Logic.java   View source code 4 votes vote down vote up
private void createActionsCells(RulesEngineEntityMethodArgument argument, String argumentValue, DynamicGridRow row, int j)
{
	RulesEngineMethodArgumentType typeOfArgument = argument.getType();
	String nameOfArgument = argument.getName();
	String descOfArgument = argument.getDescription();

	DynamicGridRow childRow = row.getRows().newRow();
	childRow.setSelectable(false);
	row.setExpanded(true);
	row.setSelectable(true);

	DynamicGridColumn argNameColl = getColByIndexForActionGrid(0);
	if (argNameColl == null)
	{
		argNameColl = createColumnForActionGrid("", 0);
	}
	DynamicGridCell argNameCell = childRow.getCells().newCell(argNameColl, DynamicCellType.STRING);
	argNameCell.setValue(nameOfArgument);
	argNameCell.setIdentifier(argument);
	argNameCell.setTooltip(descOfArgument);

	DynamicGridColumn argTypeColl = getColByIndexForActionGrid(1);
	DynamicGridCell argTypeCell = null;
	if (argTypeColl == null)
	{
		argTypeColl = createColumnForActionGrid("", 1);
	}
	if (typeOfArgument.equals(RulesEngineMethodArgumentType.STRING))
	{
		argTypeCell = childRow.getCells().newCell(argTypeColl, DynamicCellType.STRING);
		argTypeCell.setIdentifier(typeOfArgument);
		argTypeCell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
		argTypeCell.setValue(argumentValue);
	}
	else if (typeOfArgument.equals(RulesEngineMethodArgumentType.INTEGER))
	{
		argTypeCell = childRow.getCells().newCell(argTypeColl, DynamicCellType.INT);
		argTypeCell.setValue(argumentValue != null ? new Integer(argumentValue) : null);
	}
	else if (typeOfArgument.equals(RulesEngineMethodArgumentType.BOOLEAN))
	{
		argTypeCell = childRow.getCells().newCell(argTypeColl, DynamicCellType.BOOL);
	}
	argTypeCell.setWidth(160);
	argTypeCell.setReadOnly(false);
}
 
Example 34
Project: AvoinApotti   File: Logic.java   View source code 4 votes vote down vote up
private void newNote(DynamicGridRow row, AppointmentClinicalNotesVo note, boolean isEditMode) 
{	
	if (row == null) 
		throw new CodingRuntimeException("DynamicGridRow is null");
	
	if (note == null)
		row.setIdentifier(NEW_ROW_IDENTIFIER);
	
	DynamicGridColumn 	coll;
	DynamicGridCell 	cell;
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_TYPE);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);
	cell.setValue(note != null ? (note.getNoteTypeIsNotNull() ? note.getNoteType().getText() : null)  : null);		
	cell.setReadOnly(false);		
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_USER);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcpIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcp().getName() != null ? note.getAuthoringInformation().getAuthoringHcp().getName().toString() : null) : null ) : null)  : domain.getHcpLiteUser() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName().toString() : null : null);
	cell.setReadOnly(true);			
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_DATETIME);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? note.getAuthoringInformation().getAuthoringDateTime().toString() : (new DateTime()).toString())  : (new DateTime()).toString());		
	cell.setReadOnly(true);			
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTE);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);						
	cell.setValue(note != null ? note.getClinicalNote().replaceAll("\n", "<br>") : null);
	cell.setDecoratorType(DynamicCellDecoratorMode.NEVER);	
	cell.setReadOnly(true);
	cell.setStringMaxLength(3000);
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_STATUS);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);
	cell.setValue(note != null ? (note.getNoteStatusIsNotNull() ? note.getNoteStatus().getText() : null)  : null);		
	cell.setReadOnly(true);
						
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_SELECT);
	cell = row.getCells().newCell(coll, DynamicCellType.BOOL);
	cell.setReadOnly(false);
						
	row.setValue(note);		
}
 
Example 35
Project: AvoinApotti   File: Logic.java   View source code 4 votes vote down vote up
private void newNote(DynamicGridRow row, FollowUpNoteVo note, boolean isEditMode) 
{			
	if (row == null) {
		throw new CodingRuntimeException("DynamicGridRow is null");
	}
	
	if (note == null) {
		row.setIdentifier(NEW_ROW_IDENTIFIER);
	}
	
	DynamicGridColumn 	coll;
	DynamicGridCell 	cell;
			
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_DATE);
	cell = row.getCells().newCell(coll, DynamicCellType.DATETIME);
	
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? note.getAuthoringInformation().getAuthoringDateTime() : null)  : null);		
	cell.setReadOnly(false);
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_USER);
	cell = row.getCells().newCell(coll, DynamicCellType.STRING);
	
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcpIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcp().getName() != null ? note.getAuthoringInformation().getAuthoringHcp().getName().toString() : null) : null ) : null)  : domain.getHcpLiteUser() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName().toString() : null : null);
	cell.setReadOnly(true);
			
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTES_TYPE);
	cell = row.getCells().newCell(coll, DynamicCellType.ENUMERATION);
	cell.getItems().clear();		
	FollowUpTypeCollection voColl = ims.core.vo.lookups.LookupHelper.getFollowUpType(domain.getLookupService());
	for(int i = 0; voColl != null && i < voColl.size(); i++)
	{
		if(voColl.get(i).getParent() == null)
			cell.getItems().newItem(voColl.get(i));
	}		
	
	cell.setValue(note != null ? (note.getFollowUpTypeIsNotNull() ? note.getFollowUpType() : null)  : null);		
	cell.setReadOnly(false);				
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTES);
	cell = row.getCells().newCell(coll, DynamicCellType.WRAPTEXT);				
	
	cell.setValue(note != null ? note.getFollowUpNote() : null);
	cell.setDecoratorType(DynamicCellDecoratorMode.NEVER);	
	cell.setReadOnly(isEditMode ? false : true);		
	cell.setStringMaxLength(3000);
	
	row.setValue(note);			
	row.setReadOnly(!isEditMode);
	
	if (isEditMode) {
		form.getLocalContext().setEditedNote(note);
	}			
}
 
Example 36
Project: AvoinApotti   File: Logic.java   View source code 4 votes vote down vote up
private void newNote(DynamicGridRow row, CorrespondenceNoteVo note, boolean isEditMode) 
{	
	if (row == null) {
		throw new CodingRuntimeException("DynamicGridRow is null");
	}
	
	if (note == null) {
		row.setIdentifier(NEW_ROW_IDENTIFIER);
	}
	
	DynamicGridColumn 	coll;
	DynamicGridCell 	cell;
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_TYPE);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);
	cell.setValue(note != null ? (note.getNoteTypeIsNotNull() ? note.getNoteType().getText() : null)  : null);		
	cell.setReadOnly(false);		
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_USER);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcpIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcp().getName() != null ? note.getAuthoringInformation().getAuthoringHcp().getName().toString() : null) : null ) : null)  : domain.getHcpLiteUser() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName().toString() : null : null);
	cell.setReadOnly(true);			
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_DATETIME);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? note.getAuthoringInformation().getAuthoringDateTime().toString() : (new DateTime()).toString())  : (new DateTime()).toString());		
	cell.setReadOnly(false);			
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTE);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);						
	cell.setValue(note != null ? note.getReportNote().replaceAll("\n", "<br>") : null);
	cell.setDecoratorType(DynamicCellDecoratorMode.NEVER);	
	cell.setReadOnly(isEditMode ? false : true);
	cell.setStringMaxLength(3000);
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_STATUS);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);
	cell.setValue(note != null ? (note.getNoteStatusIsNotNull() ? note.getNoteStatus().getText() : null)  : null);		
	cell.setReadOnly(false);
		
	row.setValue(note);		
	row.setReadOnly(!isEditMode);
	
	if (isEditMode) {
		form.getLocalContext().setEditedNote(note);
	}			
}
 
Example 37
Project: openMAXIMS   File: Logic.java   View source code 4 votes vote down vote up
private void createActionsCells(RulesEngineEntityMethodArgument argument, String argumentValue, DynamicGridRow row, int j)
{
	RulesEngineMethodArgumentType typeOfArgument = argument.getType();
	String nameOfArgument = argument.getName();
	String descOfArgument = argument.getDescription();

	DynamicGridRow childRow = row.getRows().newRow();
	childRow.setSelectable(false);
	row.setExpanded(true);
	row.setSelectable(true);

	DynamicGridColumn argNameColl = getColByIndexForActionGrid(0);
	if (argNameColl == null)
	{
		argNameColl = createColumnForActionGrid("", 0);
	}
	DynamicGridCell argNameCell = childRow.getCells().newCell(argNameColl, DynamicCellType.STRING);
	argNameCell.setValue(nameOfArgument);
	argNameCell.setIdentifier(argument);
	argNameCell.setTooltip(descOfArgument);

	DynamicGridColumn argTypeColl = getColByIndexForActionGrid(1);
	DynamicGridCell argTypeCell = null;
	if (argTypeColl == null)
	{
		argTypeColl = createColumnForActionGrid("", 1);
	}
	if (typeOfArgument.equals(RulesEngineMethodArgumentType.STRING))
	{
		argTypeCell = childRow.getCells().newCell(argTypeColl, DynamicCellType.STRING);
		argTypeCell.setIdentifier(typeOfArgument);
		argTypeCell.setDecoratorType(DynamicCellDecoratorMode.ALWAYS);
		argTypeCell.setValue(argumentValue);
	}
	else if (typeOfArgument.equals(RulesEngineMethodArgumentType.INTEGER))
	{
		argTypeCell = childRow.getCells().newCell(argTypeColl, DynamicCellType.INT);
		argTypeCell.setValue(argumentValue != null ? new Integer(argumentValue) : null);
	}
	else if (typeOfArgument.equals(RulesEngineMethodArgumentType.BOOLEAN))
	{
		argTypeCell = childRow.getCells().newCell(argTypeColl, DynamicCellType.BOOL);
	}
	argTypeCell.setWidth(160);
	argTypeCell.setReadOnly(false);
}
 
Example 38
Project: openMAXIMS   File: Logic.java   View source code 4 votes vote down vote up
private void newNote(DynamicGridRow row, AppointmentClinicalNotesVo note, boolean isEditMode) 
{	
	if (row == null) 
		throw new CodingRuntimeException("DynamicGridRow is null");
	
	if (note == null)
		row.setIdentifier(NEW_ROW_IDENTIFIER);
	
	DynamicGridColumn 	coll;
	DynamicGridCell 	cell;
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_TYPE);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);
	cell.setValue(note != null ? (note.getNoteTypeIsNotNull() ? note.getNoteType().getText() : null)  : null);		
	cell.setReadOnly(false);		
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_USER);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcpIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcp().getName() != null ? note.getAuthoringInformation().getAuthoringHcp().getName().toString() : null) : null ) : null)  : domain.getHcpLiteUser() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName().toString() : null : null);
	cell.setReadOnly(true);			
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_DATETIME);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? note.getAuthoringInformation().getAuthoringDateTime().toString() : (new DateTime()).toString())  : (new DateTime()).toString());		
	cell.setReadOnly(true);			
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTE);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);						
	cell.setValue(note != null ? note.getClinicalNote().replaceAll("\n", "<br>") : null);
	cell.setDecoratorType(DynamicCellDecoratorMode.NEVER);	
	cell.setReadOnly(true);
	cell.setStringMaxLength(3000);
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_STATUS);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);
	cell.setValue(note != null ? (note.getNoteStatusIsNotNull() ? note.getNoteStatus().getText() : null)  : null);		
	cell.setReadOnly(true);
						
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_SELECT);
	cell = row.getCells().newCell(coll, DynamicCellType.BOOL);
	cell.setReadOnly(false);
						
	row.setValue(note);		
}
 
Example 39
Project: openMAXIMS   File: Logic.java   View source code 4 votes vote down vote up
private void newNote(DynamicGridRow row, FollowUpNoteVo note, boolean isEditMode) 
{			
	if (row == null) {
		throw new CodingRuntimeException("DynamicGridRow is null");
	}
	
	if (note == null) {
		row.setIdentifier(NEW_ROW_IDENTIFIER);
	}
	
	DynamicGridColumn 	coll;
	DynamicGridCell 	cell;
			
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_DATE);
	cell = row.getCells().newCell(coll, DynamicCellType.DATETIME);
	
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? note.getAuthoringInformation().getAuthoringDateTime() : null)  : null);		
	cell.setReadOnly(false);
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_USER);
	cell = row.getCells().newCell(coll, DynamicCellType.STRING);
	
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcpIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcp().getName() != null ? note.getAuthoringInformation().getAuthoringHcp().getName().toString() : null) : null ) : null)  : domain.getHcpLiteUser() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName().toString() : null : null);
	cell.setReadOnly(true);
			
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTES_TYPE);
	cell = row.getCells().newCell(coll, DynamicCellType.ENUMERATION);
	cell.getItems().clear();		
	FollowUpTypeCollection voColl = ims.core.vo.lookups.LookupHelper.getFollowUpType(domain.getLookupService());
	for(int i = 0; voColl != null && i < voColl.size(); i++)
	{
		if(voColl.get(i).getParent() == null)
			cell.getItems().newItem(voColl.get(i));
	}		
	
	cell.setValue(note != null ? (note.getFollowUpTypeIsNotNull() ? note.getFollowUpType() : null)  : null);		
	cell.setReadOnly(false);				
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTES);
	cell = row.getCells().newCell(coll, DynamicCellType.WRAPTEXT);				
	
	cell.setValue(note != null ? note.getFollowUpNote() : null);
	cell.setDecoratorType(DynamicCellDecoratorMode.NEVER);	
	cell.setReadOnly(isEditMode ? false : true);		
	cell.setStringMaxLength(3000);
	
	row.setValue(note);			
	row.setReadOnly(!isEditMode);
	
	if (isEditMode) {
		form.getLocalContext().setEditedNote(note);
	}			
}
 
Example 40
Project: openMAXIMS   File: Logic.java   View source code 4 votes vote down vote up
private void newNote(DynamicGridRow row, CorrespondenceNoteVo note, boolean isEditMode) 
{	
	if (row == null) {
		throw new CodingRuntimeException("DynamicGridRow is null");
	}
	
	if (note == null) {
		row.setIdentifier(NEW_ROW_IDENTIFIER);
	}
	
	DynamicGridColumn 	coll;
	DynamicGridCell 	cell;
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_TYPE);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);
	cell.setValue(note != null ? (note.getNoteTypeIsNotNull() ? note.getNoteType().getText() : null)  : null);		
	cell.setReadOnly(false);		
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_USER);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcpIsNotNull() ? (note.getAuthoringInformation().getAuthoringHcp().getName() != null ? note.getAuthoringInformation().getAuthoringHcp().getName().toString() : null) : null ) : null)  : domain.getHcpLiteUser() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName() != null ? ((HcpLiteVo)domain.getHcpLiteUser()).getName().toString() : null : null);
	cell.setReadOnly(true);			
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_DATETIME);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);		
	cell.setValue(note != null ? (note.getAuthoringInformationIsNotNull() ? note.getAuthoringInformation().getAuthoringDateTime().toString() : (new DateTime()).toString())  : (new DateTime()).toString());		
	cell.setReadOnly(false);			
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_NOTE);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);						
	cell.setValue(note != null ? note.getReportNote().replaceAll("\n", "<br>") : null);
	cell.setDecoratorType(DynamicCellDecoratorMode.NEVER);	
	cell.setReadOnly(isEditMode ? false : true);
	cell.setStringMaxLength(3000);
	
	coll = form.dyngrdNotes().getColumns().getByIdentifier(COL_STATUS);
	cell = row.getCells().newCell(coll, DynamicCellType.HTMLVIEW);
	cell.setValue(note != null ? (note.getNoteStatusIsNotNull() ? note.getNoteStatus().getText() : null)  : null);		
	cell.setReadOnly(false);
		
	row.setValue(note);		
	row.setReadOnly(!isEditMode);
	
	if (isEditMode) {
		form.getLocalContext().setEditedNote(note);
	}			
}