Java Code Examples for ims.framework.controls.DynamicGridCell.setStringMaxLength()

The following are Jave code examples for showing how to use setStringMaxLength() of the ims.framework.controls.DynamicGridCell class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private DynamicGridRow addOtherRowTodyngrdReportTo()
{
	if (maxNoOfReportToRowsEqualsFlagValue())
		return null;

	DynamicGridRow row = form.lyrDetails().tabGenDetails().dyngrdReportTo().getRows().newRow();
	DynamicGridCell cellReportTo = row.getCells().newCell(form.lyrDetails().tabGenDetails().dyngrdReportTo().getColumns().getByIdentifier(REPORTTO_COLUMN), DynamicCellType.STRING);
	cellReportTo.setTooltip("Please enter a Name");
	cellReportTo.setStringMaxLength(149); //WDEV-14450
	cellReportTo.setReadOnly(false);
	DynamicGridCell cellAddress = row.getCells().newCell(form.lyrDetails().tabGenDetails().dyngrdReportTo().getColumns().getByIdentifier(ADDRESS_COLUMN), DynamicCellType.STRING);
	cellAddress.setTooltip("Please enter an Address");
	cellAddress.setStringMaxLength(150); //WDEV-14450
	cellAddress.setReadOnly(false);

	row.setIdentifier(ReportToType.FREE);
	return row;
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void adStatusAndNoteCells(DynamicGridRow row)
{
	DynamicGridCell cellStatus = row.getCells().newCell(getColByIdentifier(STATUS_COLUMN), DynamicCellType.ENUMERATION);
	cellStatus.setReadOnly(false);
	cellStatus.setWidth(100);
	cellStatus.setTooltip("Please select a status");

	AttendanceStatusCollection collAttendStatus = ims.clinical.vo.lookups.LookupHelper.getAttendanceStatus(domain.getLookupService());
	for (int k = 0; k < collAttendStatus.size(); k++)
		cellStatus.getItems().newItem(collAttendStatus.get(k));

	DynamicGridCell cellNote = row.getCells().newCell(form.ctnDetails().dyngrdInvitees().getColumns().getByIdentifier(NOTE_COLUMN), DynamicCellType.STRING);
	cellNote.setWidth(-1);
	cellNote.setReadOnly(false);
	cellNote.setTooltip("Please add a note");
	cellNote.setStringMaxLength(255);

}
 
Example 3
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void addRowToMedication(PatientMedicationLiteVo patientMedic)
{
	if (patientMedic == null)
		return;
	DynamicGridColumnCollection columns = form.lyrMain().tabDetails().dyngrdMedication().getColumns();
	DynamicGridRow nRow = form.lyrMain().tabDetails().dyngrdMedication().getRows().newRow();
	DynamicGridCell cell = nRow.getCells().newCell(columns.getByIdentifier(COLUMN_MEDICATION), DynamicCellType.ENUMERATION);
	if (patientMedic != null && patientMedic.getMedicationIsNotNull())
		nRow.setValue(patientMedic);

	DynamicGridCellItem item = cell.getItems().newItem(patientMedic.getMedication().getMedicationName());
	item.setValue(patientMedic.getMedication());

	cell.setValue(patientMedic.getMedication());
	cell.setAutoPostBack(true);
	cell = nRow.getCells().newCell(columns.getByIdentifier(COLUMN_BATCHNO), DynamicCellType.STRING);

	cell.setValue(patientMedic.getBatchNo());
	cell.setStringMaxLength(20);
	cell = nRow.getCells().newCell(columns.getByIdentifier(COLUMN_EXPIRYDATE), DynamicCellType.DATE);
	cell.setValue(patientMedic.getExpiryDate());
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void newRowToSkinPreparation(SkinPreperationVo skinprep)
{
	DynamicGridColumnCollection columns = form.lyrMain().tabDetails().dyngrdSkinPreperation().getColumns();
	DynamicGridRow nRow = form.lyrMain().tabDetails().dyngrdSkinPreperation().getRows().newRow();
	DynamicGridCell cell = nRow.getCells().newCell(columns.getByIdentifier(COLUMN_SKINPREPARATION), DynamicCellType.ENUMERATION);
	nRow.setValue(skinprep);
	if (skinprep != null && skinprep.getSkinPreparationUsedIsNotNull())
	{
		DynamicGridCellItem item = cell.getItems().newItem(skinprep.getSkinPreparationUsed().getText());
		item.setValue(skinprep.getSkinPreparationUsed());
		cell.setValue(skinprep.getSkinPreparationUsed());
	}
	cell.setAutoPostBack(true);
	cell = nRow.getCells().newCell(columns.getByIdentifier(COLUMN_BATCHNO), DynamicCellType.STRING);
	cell.setValue(skinprep == null ? null : skinprep.getBatchNo());
	cell.setStringMaxLength(20);

	cell = nRow.getCells().newCell(columns.getByIdentifier(COLUMN_EXPIRYDATE), DynamicCellType.DATE);
	cell.setValue(skinprep == null ? null : skinprep.getExpiryDate());

}
 
Example 5
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void newRowToAnaesthetic(LocalAnaestheticAdministeredVo anaesthetic)
{
	DynamicGridColumnCollection columns = form.lyrMain().tabDetails().dyngrdAnaesthetic().getColumns();
	DynamicGridRow nRow = form.lyrMain().tabDetails().dyngrdAnaesthetic().getRows().newRow();
	DynamicGridCell cell = nRow.getCells().newCell(columns.getByIdentifier(COLUMN_ANAESTHETIC), DynamicCellType.ENUMERATION);
	nRow.setValue(anaesthetic);
	if (anaesthetic != null && anaesthetic.getLocalAnaestheticIsNotNull())
	{
		DynamicGridCellItem item = cell.getItems().newItem(anaesthetic.getLocalAnaesthetic().getText());
		item.setValue(anaesthetic.getLocalAnaesthetic());
		cell.setValue(anaesthetic.getLocalAnaesthetic());
	}
	cell.setAutoPostBack(true);
	cell = nRow.getCells().newCell(columns.getByIdentifier(COLUMN_BATCHNO), DynamicCellType.STRING);
	cell.setValue(anaesthetic == null ? null : anaesthetic.getBatchNo());
	cell.setStringMaxLength(20);
	cell = nRow.getCells().newCell(columns.getByIdentifier(COLUMN_EXPIRYDATE), DynamicCellType.DATE);
	cell.setValue(anaesthetic == null ? null : anaesthetic.getExpiryDate());
}
 
Example 6
Project: AvoinApotti   File: PhlebotomyHelper.java   View Source Code Vote up 5 votes
public void setCellMaxLength(String collectorComment, DynamicGridCell cell)
{
	if (cell == null)
		return;

	int maxLength = getMaxLength(collectorComment);
	cell.setStringMaxLength(maxLength < 0 ? 0 : maxLength);
	if (maxLength <= 0)
		cell.setReadOnly(true);
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
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 8
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void setDiagnosisRow(DynamicGridRow row, PatientDiagnosisLiteVo diagnosis)
{
	if (row == null)
		throw new CodingRuntimeException("Major Logical Error - Can not set a dose to null row");
	
	row.setValue(diagnosis);
	
	if (diagnosis == null)
		return;
	
	DynamicGridCell cell = row.getCells().newCell(form.lyrContent().tabConsultant().dyngrDiagnosis().getColumns().getByIdentifier(COL_DIAG_DESCRIPTION), DynamicCellType.STRING);
	cell.setReadOnly(true);
	cell.setStringMaxLength(diagnosis.getDiagnosisDescriptionMaxLength());
	cell.setValidationMessage("Dose length is restricted to " + diagnosis.getDiagnosisDescriptionMaxLength() + " characters.");
	cell.setValue(diagnosis.getDiagnosisDescription());
	cell.setWidth(300);
	
	cell = row.getCells().newCell(form.lyrContent().tabConsultant().dyngrDiagnosis().getColumns().getByIdentifier(COL_DIAG_DATE), DynamicCellType.STRING); //wdev-9098
	cell.setReadOnly(true);
	cell.setValue(diagnosis.getDiagnosedDateIsNotNull() ? diagnosis.getDiagnosedDate().toString() : null);	//wdev-9098
	cell.setWidth(120);
	
	cell = row.getCells().newCell(form.lyrContent().tabConsultant().dyngrDiagnosis().getColumns().getByIdentifier(COL_DIAG_DIAGNOSE), DynamicCellType.STRING);
	cell.setReadOnly(true);
	cell.setIdentifier(diagnosis.getDiagnosis());
	cell.setValue(diagnosis.getDiagnosis() != null ? diagnosis.getDiagnosis().getDiagnosisName() : "No diagnosis name provided");
	cell.setWidth(-1);
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void addFamilyMemberRowTodyngrdInvitee()
{
	DynamicGridRow row = form.ctnDetails().dyngrdInvitees().getRows().newRow();
	DynamicGridCell cellInvitee = row.getCells().newCell(form.ctnDetails().dyngrdInvitees().getColumns().getByIdentifier(INVITEE_COLUMN), DynamicCellType.STRING);
	cellInvitee.setWidth(100);
	cellInvitee.setTooltip("Please enter a Family Member Name");
	cellInvitee.setReadOnly(false);
	cellInvitee.setStringMaxLength(55);

	DynamicGridCell cellNote = row.getCells().newCell(form.ctnDetails().dyngrdInvitees().getColumns().getByIdentifier(NOTE_COLUMN), DynamicCellType.STRING);
	cellNote.setStringMaxLength(255);

	adStatusAndNoteCells(row);
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void addHcpQueryComboRowTodyngrdInvitees()
{
	DynamicGridRow row = form.ctnDetails().dyngrdInvitees().getRows().newRow();
	DynamicGridCell cellInvitee = row.getCells().newCell(form.ctnDetails().dyngrdInvitees().getColumns().getByIdentifier(INVITEE_COLUMN), DynamicCellType.QUERYCOMBOBOX);
	cellInvitee.setWidth(100);
	cellInvitee.setAutoPostBack(true);
	cellInvitee.setReadOnly(false);
	cellInvitee.setTooltip("Please search for a Hcp");
	cellInvitee.setStringMaxLength(55);

	DynamicGridCell cellNote = row.getCells().newCell(form.ctnDetails().dyngrdInvitees().getColumns().getByIdentifier(NOTE_COLUMN), DynamicCellType.STRING);
	cellNote.setStringMaxLength(255);

	adStatusAndNoteCells(row);
}
 
Example 11
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void addOtherRowTodyngrdReportTo()
{
	DynamicGridRow row = form.ctnDetails().dyngrdInvitees().getRows().newRow();
	DynamicGridCell cellInvitee = row.getCells().newCell(form.ctnDetails().dyngrdInvitees().getColumns().getByIdentifier(INVITEE_COLUMN), DynamicCellType.STRING);
	cellInvitee.setWidth(100);
	cellInvitee.setTooltip("Please enter a Family Member Name");
	cellInvitee.setReadOnly(false);
	cellInvitee.setIdentifier(DynamicCellType.STRING);
	cellInvitee.setStringMaxLength(55);
	
	//Show a Label cell
	DynamicGridCell cellStatus = row.getCells().newCell(getColByIdentifier(STATUS_COLUMN), DynamicCellType.ENUMERATION);
	cellStatus.setReadOnly(false);
	cellStatus.setWidth(100);
	cellStatus.setTooltip("Please select a status");
	cellInvitee.setIdentifier(DynamicCellType.ENUMERATION);

	AttendanceStatusCollection collAttendStatus = ims.clinical.vo.lookups.LookupHelper.getAttendanceStatus(domain.getLookupService());
	for(int k = 0 ; k < collAttendStatus.size() ; k++) 
		cellStatus.getItems().newItem(collAttendStatus.get(k));
	
	DynamicGridCell cellNote = row.getCells().newCell(form.ctnDetails().dyngrdInvitees().getColumns().getByIdentifier(NOTE_COLUMN), DynamicCellType.STRING);
	cellNote.setWidth(-1);
	cellNote.setTooltip("Please enter a Note here");
	cellNote.setReadOnly(false);
	cellNote.setStringMaxLength(255);
	cellInvitee.setIdentifier(DynamicCellType.STRING);
	
	row.setValue(DynamicCellType.STRING);
	row.setIdentifier(DynamicCellType.STRING);
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void addQueryComboRowTodyngrdInvitees(Class classType)
{
	DynamicGridRow row = form.ctnDetails().dyngrdInvitees().getRows().newRow();
	DynamicGridCell cellReportTo = row.getCells().newCell(form.ctnDetails().dyngrdInvitees().getColumns().getByIdentifier(INVITEE_COLUMN), DynamicCellType.QUERYCOMBOBOX);
	cellReportTo.setWidth(100);
	cellReportTo.setAutoPostBack(true);
	cellReportTo.setReadOnly(false);
	cellReportTo.setIdentifier(classType);
	if (classType.equals(HcpLiteVo.class))
		cellReportTo.setTooltip("Please search for a Member Of Staff");
	else
		cellReportTo.setTooltip("Please search for a GP");

	//Show a Label cell
	DynamicGridCell cellStatus = row.getCells().newCell(getColByIdentifier(STATUS_COLUMN), DynamicCellType.ENUMERATION);
	cellStatus.setReadOnly(false);
	cellStatus.setWidth(100);
	cellStatus.setTooltip("Please select a status");

	AttendanceStatusCollection collAttendStatus = ims.clinical.vo.lookups.LookupHelper.getAttendanceStatus(domain.getLookupService());
	for(int k = 0 ; k < collAttendStatus.size() ; k++) 
		cellStatus.getItems().newItem(collAttendStatus.get(k));

	DynamicGridCell cellNote = row.getCells().newCell(form.ctnDetails().dyngrdInvitees().getColumns().getByIdentifier(NOTE_COLUMN), DynamicCellType.STRING);
	cellNote.setWidth(-1);
	cellNote.setStringMaxLength(255);
	cellNote.setReadOnly(false);
	cellNote.setTooltip("Please add a note");
}
 
Example 13
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void populateDynGridRowFromData(DynamicGridRow newRow, CarePlanInterventions inter)
{
	boolean isCcoSpecific = ConfigFlag.GEN.CARE_PLAN_FUNCTIONALITY_TYPE.getValue().equals("CCO");
	boolean activeOnly = form.cbFilter().getValue().equals("0");
	DynamicGridColumn column = null;
	DynamicGridCell newCell = null;
	if (!isCcoSpecific)
	{
		column = form.dyngrdActions().getColumns().getByIdentifier(SELECTED_COLUMN_INDENTIFIER);
		newCell = newRow.getCells().newCell(column, DynamicCellType.BOOL);
		newCell.setValue(inter.getActive());
		newCell.setReadOnly(CarePlanInterventionManOpt.MANDATORY.equals(inter.getInterventionType()));
	}
	column = form.dyngrdActions().getColumns().getByIdentifier(ACTION_COLUMN_INDENTIFIER);
	newCell = newRow.getCells().newCell(column, DynamicCellType.STRING);
	newCell.setValue(inter.getDescription());
	newCell.setTooltip(inter.getDescription());
	newCell.setReadOnly(true);
	
	column = form.dyngrdActions().getColumns().getByIdentifier(STARTD_COLUMN_INDENTIFIER);
	newCell = newRow.getCells().newCell(column, DynamicCellType.DATE);
	newCell.setValue(inter.getStartDate());
	newCell.setReadOnly(true);
	
	column = form.dyngrdActions().getColumns().getByIdentifier(STARTB_COLUMN_INDENTIFIER);
	newCell = newRow.getCells().newCell(column, DynamicCellType.STRING);
	newCell.setValue(inter.getStartByIsNotNull()?inter.getStartBy().toString():null);
	newCell.setTooltip(inter.getStartByIsNotNull()?inter.getStartBy().toString():null); //wdev-13285
	newCell.setReadOnly(true);
	
	if (!activeOnly)
	{
		column = form.dyngrdActions().getColumns().getByIdentifier(STOPD_COLUMN_INDENTIFIER);
		newCell = newRow.getCells().newCell(column, DynamicCellType.DATE);
		newCell.setValue(inter.getStopDate());
		newCell.setReadOnly(true);
		
		column = form.dyngrdActions().getColumns().getByIdentifier(STOPB_COLUMN_INDENTIFIER);
		newCell = newRow.getCells().newCell(column, DynamicCellType.STRING);
		newCell.setValue(inter.getStopByIsNotNull()?inter.getStopBy().toString():null);
		newCell.setTooltip(inter.getStopByIsNotNull()?inter.getStopBy().toString():null); //wdev-13285
		newCell.setReadOnly(true);
	}
	
	if (isCcoSpecific)
	{
		column = form.dyngrdActions().getColumns().getByIdentifier(NOTES_COLUMN_INDENTIFIER);
		newCell = newRow.getCells().newCell(column, DynamicCellType.STRING);
		newCell.setStringMaxLength(100);
		newCell.setValue(inter.getAdditionalInfo());
		newCell.setTooltip(inter.getAdditionalInfo());	//wdev-13285
		newCell.setReadOnly(false);
	}
	
	if (isCcoSpecific && Boolean.TRUE.equals(inter.getIsRemoved()))
	{
		newRow.setTextColor(Color.Gray);
	}
	
	newRow.setValue(inter);
}
 
Example 14
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void addDynGridRow(TumourGroupSiteTNMValueVo voTNM, boolean isActive)
{
	if (voTNM == null)
		return;

	DynamicGridRow dynRow = form.lyrConfig().tabTNM().lyrTNM().tabTNMValues().dynTNM().getRows().newRow();

	DynamicGridCell typeCell = dynRow.getCells().newCell(getColumn(COLTYPE), DynamicCellType.ANSWER);
	bindTNMTypeLookup(typeCell);
	if (voTNM.getTNMTypeIsNotNull())
	{
		typeCell.setValue(voTNM.getTNMType());
		typeCell.setReadOnly(true);
		if (isEditMode())
			typeCell.setBackColor(Color.LightGray);
	}

	DynamicGridCell tnmCell = dynRow.getCells().newCell(getColumn(COLTNM), DynamicCellType.STRING);
	if (voTNM.getTNMValueIsNotNull())
	{
		tnmCell.setValue(voTNM.getTNMValue());
		tnmCell.setReadOnly(true);
		if (isEditMode())
			tnmCell.setBackColor(Color.LightGray);
	}

	DynamicGridCell cpbCell = dynRow.getCells().newCell(getColumn(COLCPB), DynamicCellType.ENUMERATION);
	bindTNMClinicalpathologicalLookup(cpbCell);
	if (voTNM.getClinicalPathologicalIsNotNull())
	{
		cpbCell.setValue(voTNM.getClinicalPathological());
		cpbCell.setReadOnly(true);
		if (isEditMode())
			cpbCell.setBackColor(Color.LightGray);
	}

	DynamicGridCell descCell = dynRow.getCells().newCell(getColumn(COLTNMDESCRIPTION), DynamicCellType.STRING);
	if (voTNM.getTNMDescriptionIsNotNull())
	{
		descCell.setValue(voTNM.getTNMDescription());
	}
	// WDEV-7804 - Set cell maximum string limit to 500
	descCell.setStringMaxLength(500);

	if (!isActive)
	{
		DynamicGridCell activeCell = dynRow.getCells().newCell(getColumn(COLACTIVE), DynamicCellType.ANSWER);
		bindYesNoLookup(activeCell);
		if (voTNM.getIsActiveIsNotNull())
		{
			if (voTNM.getIsActive())
				activeCell.setValue(YesNo.YES);
			else
				activeCell.setValue(YesNo.NO);
		}
	}

	dynRow.setValue(voTNM);
}
 
Example 15
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException 
{
	if (formName.equals(form.getForms().Clinical.TeamMemberSelection) && (result.equals(DialogResult.OK) ||result.equals(DialogResult.YES) ))
	{
		ClinicalTeamMemberVoCollection voClinicalTeamMemberColl = form.getGlobalContext().Clinical.getTeamMemberSelection(); 
		if(voClinicalTeamMemberColl == null || voClinicalTeamMemberColl.size() == 0)
			return;
		
		for(int x = 0; x < voClinicalTeamMemberColl.size(); x++)
		{
			if(voClinicalTeamMemberColl.get(x) != null)
			{
				DynamicGridRow row = form.ctnDetails().dyngrdInvitees().getRows().newRow();

				row.setValue(voClinicalTeamMemberColl.get(x).getHCP());
				
				if(voClinicalTeamMemberColl.get(x).getHCPIsNotNull())
				{
					DynamicGridCell cellInvitee = row.getCells().newCell(getColByIdentifier(INVITEE_COLUMN), DynamicCellType.QUERYCOMBOBOX);
					cellInvitee.setWidth(100);
					cellInvitee.getItems().newItem(voClinicalTeamMemberColl.get(x).getHCP());
					cellInvitee.setTypedText(voClinicalTeamMemberColl.get(x).getHCP().toString());
					cellInvitee.setValue(voClinicalTeamMemberColl.get(x).getHCP());
					cellInvitee.setReadOnly(true);
					cellInvitee.setIdentifier(HcpLiteVo.class);
				}
				
				//Show a Label cell
				DynamicGridCell cellStatus = row.getCells().newCell(getColByIdentifier(STATUS_COLUMN), DynamicCellType.ENUMERATION);
				cellStatus.setReadOnly(false);
				cellStatus.setWidth(100);
				cellStatus.setTooltip("Please select a status");
				
				AttendanceStatusCollection collAttendStatus = ims.clinical.vo.lookups.LookupHelper.getAttendanceStatus(domain.getLookupService());
				for(int k = 0 ; k < collAttendStatus.size() ; k++) 
					cellStatus.getItems().newItem(collAttendStatus.get(k));

				DynamicGridCell cellNote = row.getCells().newCell(form.ctnDetails().dyngrdInvitees().getColumns().getByIdentifier(NOTE_COLUMN), DynamicCellType.STRING);
				cellNote.setWidth(-1);
				cellNote.setStringMaxLength(255);
				cellNote.setReadOnly(false);
				cellNote.setTooltip("Please add a note");
				
				row.setValue(voClinicalTeamMemberColl.get(x).getHCP());
			}
		}
		form.ctnDetails().dyngrdInvitees().setValue(null);
		form.getContextMenus().getGoalPlanningMeetingInviteesREMOVEItem().setVisible(false);
	}
}
 
Example 16
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
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 17
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
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 18
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
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 19
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void newMedicationDoseInstance() 
{
	DynamicGridRow doseRow = form.ctnDetails().dyngrdDoses().getRows().newRow();
	
	
	DynamicGridCell cell1 = doseRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_DOSE), DynamicCellType.STRING);
	
	cell1.setStringMaxLength(255);
	cell1.setValidationMessage("This text is restricted to 255 characters");
	cell1.setReadOnly(false);
	cell1.setTooltip("Please select a Dose");
	cell1.setWidth(120);

	DynamicGridCell cell2= doseRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_ROUTE), DynamicCellType.ENUMERATION);
	cell2.setReadOnly(false);
	bindCellToLookup(cell2, MedicationRoute.class);
	cell2.setTooltip("Please select a Route");
	cell2.setWidth(120);

	DynamicGridCell cell3 = doseRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_TIMES), DynamicCellType.MULTISELECT);
	cell3.setReadOnly(false);
	bindCellToLookup(cell3, MedicationTimesOfAdministration.class);
	cell3.setTooltip("Please select Times");
	cell3.setWidth(140);

	DynamicGridCell cell6= doseRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_BY_TYPE), DynamicCellType.ENUMERATION);
	cell6.setReadOnly(false);
	bindCellToLookup(cell6, MedciationCommencedDiscontinuedType.class);
	cell6.setValue(MedciationCommencedDiscontinuedType.MOS);
	cell6.setTooltip("Please select a Commenced by Type");
	cell6.setAutoPostBack(true);
	cell6.setWidth(140);

	
	DynamicGridCell cell4 = doseRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_BY), DynamicCellType.QUERYCOMBOBOX);
	Hcp hcp = (Hcp) domain.getHcpUser();
	if(hcp != null)
	{
		cell4.getItems().newItem(hcp);
		cell4.setValue(hcp);
	}
	cell4.setReadOnly(false);
	cell4.setAutoPostBack(true);
	cell4.setTooltip("Please select a HCP");
	cell4.setWidth(160);

	
	DynamicGridCell cell5 = doseRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_DATE), DynamicCellType.DATE);
	cell5.setValue(new Date());
	cell5.setReadOnly(false);
	cell5.setTooltip("Please select a Date");
	cell5.setWidth(-1);

	doseRow.setExpanded(true);
	
	MedicationDose voNewDose = new MedicationDose();
	voNewDose.setIsCopied(new Boolean(false));
	doseRow.setValue(voNewDose);
	
	//wdev-1873 form.ctnDetails().dyngrdDoses().setSelectedRow(doseRow);
	//added for WDEV-7307
	if  (!engine.isDialog()){
		form.ctnDetails().dyngrdDoses().resetScrollPosition();
		form.ctnDetails().dyngrdDoses().setSelectedRow(doseRow);
	}
	updateControlsState();
}
 
Example 20
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
	if (formName.equals(form.getForms().Clinical.TeamMemberSelection) && (result.equals(DialogResult.OK) || result.equals(DialogResult.YES)))
	{
		ClinicalTeamMemberVoCollection voClinicalTeamMemberColl = form.getGlobalContext().Clinical.getTeamMemberSelection();
		if (voClinicalTeamMemberColl == null || voClinicalTeamMemberColl.size() == 0)
			return;

		for (int x = 0; x < voClinicalTeamMemberColl.size(); x++)
		{
			if (voClinicalTeamMemberColl.get(x) != null)
			{
				DynamicGridRow row = form.ctnDetails().dyngrdInvitees().getRows().newRow();

				row.setValue(voClinicalTeamMemberColl.get(x).getHCP());

				if (voClinicalTeamMemberColl.get(x).getHCPIsNotNull())
				{
					DynamicGridCell cellInvitee = row.getCells().newCell(getColByIdentifier(INVITEE_COLUMN), DynamicCellType.QUERYCOMBOBOX);
					cellInvitee.setWidth(100);
					cellInvitee.getItems().newItem(voClinicalTeamMemberColl.get(x).getHCP());
					cellInvitee.setTypedText(voClinicalTeamMemberColl.get(x).getHCP().toString());
					cellInvitee.setValue(voClinicalTeamMemberColl.get(x).getHCP());
					cellInvitee.setReadOnly(true);
					cellInvitee.setIdentifier(HcpLiteVo.class);
					cellInvitee.setStringMaxLength(55);
				}

				// Show a Label cell
				DynamicGridCell cellStatus = row.getCells().newCell(getColByIdentifier(STATUS_COLUMN), DynamicCellType.ENUMERATION);
				cellStatus.setReadOnly(false);
				cellStatus.setWidth(100);
				cellStatus.setTooltip("Please select a status");

				AttendanceStatusCollection collAttendStatus = ims.clinical.vo.lookups.LookupHelper.getAttendanceStatus(domain.getLookupService());
				for (int k = 0; k < collAttendStatus.size(); k++)
					cellStatus.getItems().newItem(collAttendStatus.get(k));

				DynamicGridCell cellNote = row.getCells().newCell(form.ctnDetails().dyngrdInvitees().getColumns().getByIdentifier(NOTE_COLUMN), DynamicCellType.STRING);
				cellNote.setWidth(-1);
				cellNote.setReadOnly(false);
				cellNote.setTooltip("Please add a note");
				cellNote.setStringMaxLength(255);

				row.setValue(voClinicalTeamMemberColl.get(x).getHCP());
			}
		}
	}
}