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

The following are Jave code examples for showing how to use getRow() 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
@Override // wdev-13896
protected void onDyngrdListCellButtonClicked(DynamicGridCell cell)
{
	DynamicGridRow row = cell.getRow();
	
	if (row.getValue() instanceof EpisodeofCareVo)
	{
		form.getGlobalContext().Clinical.setEpisodeOfCareWithHistory(domain.getEpisodeOfCareWithHistory((EpisodeofCareVo) row.getValue()));
		engine.open(form.getForms().Core.EpisodeOfCareHistoryDialog);
	}
	else if (row.getValue() instanceof CareContextVo)
	{
		form.getGlobalContext().Clinical.setCareContextWithHistory(domain.getCareContextWithHistory((CareContextVo) row.getValue()));
		engine.open(form.getForms().Core.CareContextHistoryDialog);
	}
	
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
protected void onDyngrdAssessmentsCellValueChanged(DynamicGridCell cell)
{
	// Refresh Reason Column
	DynamicGridColumn col = cell.getColumn();
	if (col != null && col.getIdentifier().equals(STATUS_COLUMN))
	{
		DynamicGridRow row = cell.getRow();
		if (row != null)
		{
			DynamicGridCell reasonCell = row.getCells().get(getDynGridColumn(REASON_COLUMN));
			Object statusValue = cell.getValue();
			if (reasonCell != null)
			{
				if (statusValue instanceof PatientAssessmentStatusReason)
					populateReasonCell(reasonCell, (PatientAssessmentStatusReason) statusValue);
			}
			else
			{
				reasonCell.getItems().clear();
			}
		}
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void updateCell(DynamicGridCell cell)
{
	DynamicGridRow updatedRow = cell.getRow();
	DynamicGridColumn column = form.lyr1().tabDetails().ctn1().dyngrdAnaesthetis().getColumns().getByIdentifier(COL_DRUG);

	// updatedRow.setValue((Specialty) cell.getValue());

	for (int i = 0; i < form.lyr1().tabDetails().ctn1().dyngrdAnaesthetis().getRows().size(); i++)
	{
		DynamicGridRow currentRow = form.lyr1().tabDetails().ctn1().dyngrdAnaesthetis().getRows().get(i);

		if (!currentRow.equals(updatedRow))
		{
			populateLocalAnaesthetic(ims.clinical.vo.lookups.LookupHelper.getLocalAnaesthetic(domain.getLookupService()), currentRow.getCells().get(column));
		}
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
@Override
protected void onDyngrdGlossaryCellTextSubmited(DynamicGridCell cell) 
{
	if(cell.getRow() != null && cell.getRow().getParent() != null)
	{
		if(cell.getRow().getParent().getValue() instanceof ProfileType)
		{
			if (cell.getTypedText() == null || cell.getTypedText().length() < 3)
			{
				engine.showMessage("Please enter at least 3 characters for search criteria");
				return;
			}
			populateQueryComboBox(cell, domain.listMedicAndSpec((ProfileType) cell.getRow().getParent().getValue(), cell.getTypedText()));
		}
	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
@Override
protected void onDyngrdGlossaryCellValueChanged(DynamicGridCell cell) 
{
	if(cell.getValue() != null && cell.getRow() != null && cell.getRow().getParent() != null && cell.getRow().getParent().getParent() != null)
	{
		if(getSelectedItemFromCell(cell) != null)
		{
			GlossaryProfileVo newGLP = populateGlossaryProfile(getSelectedItemFromCell(cell), cell.getRow().getParent());
			form.getLocalContext().getGlossaryProfileForSave().add(newGLP);
			form.getLocalContext().setCanAddNewProfile(true);
		}
		else
		{
			engine.showErrors(new String[] {"Invalid value."});
		}
	}
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
protected void onDyngrdQuestionsCellValueChanged(DynamicGridCell cell)
{
	if (cell.getColumn().getIdentifier().equals(COLUMN_SELECT))
	{
		Integer roleId = form.getLocalContext().getSelectedRoleId();
		DynamicGridRow row = cell.getRow();
		AssessmentQuestionVo voAssessmentQuestion = (AssessmentQuestionVo) row.getValue();
		if (roleId != null)
		{
			Boolean value = (Boolean) cell.getValue();
			if (value != null)
			{
				if (value.booleanValue())
					addQuestionIntoMap(roleId, voAssessmentQuestion);
				else
					removeQuestionFromMap(roleId, voAssessmentQuestion);
			}
		}
	}
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
protected void onDyngrdAssessmentsCellValueChanged(DynamicGridCell cell)
{
	//Refresh Reason Column
	DynamicGridColumn col = cell.getColumn();
	if(col != null && col.getIdentifier().equals(STATUS_COLUMN))
	{
		DynamicGridRow row = cell.getRow();
		if(row != null)
		{
			DynamicGridCell reasonCell = row.getCells().get(getDynGridColumn(REASON_COLUMN));
			Object statusValue = cell.getValue();
			if(reasonCell != null )
			{
				if(statusValue instanceof PatientAssessmentStatusReason)
				{
					populateReasonCell(reasonCell, (PatientAssessmentStatusReason)statusValue);
				}
				else
				{
					reasonCell.getItems().clear();
				}
			}
		}
	}
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
protected void onDyngrdAssessmentsCellValueChanged(DynamicGridCell cell)
{
	//Refresh Reason Column
	DynamicGridColumn col = cell.getColumn();
	if(col != null && col.getIdentifier().equals(STATUS_COLUMN))
	{
		DynamicGridRow row = cell.getRow();
		if(row != null)
		{
			DynamicGridCell reasonCell = row.getCells().get(getDynGridColumn(REASON_COLUMN));
			Object statusValue = cell.getValue();
			if(reasonCell != null )
			{
				if(statusValue instanceof PatientAssessmentStatusReason)
				{
					populateReasonCell(reasonCell, (PatientAssessmentStatusReason)statusValue);
				}
				else
				{
					reasonCell.getItems().clear();
				}
			}
		}
	}
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
@Override
protected void onDyngrdTrackCellButtonClicked(DynamicGridCell cell) 
{
	if(cell == null || cell.getRow() == null || cell.getColumn() == null)
		return;
	
	form.dyngrdTrack().setValue(cell.getRow().getValue());
	
	trackingSelectionChanged();
	updateControlsState();
	
	if(TrackingAreaColumn.CUBICLE.equals(cell.getColumn().getIdentifier()))
	{
		engine.open(form.getForms().Emergency.AllocateCubicle);
	}
	else if(TrackingAreaColumn.REFERRAL_SPECIALTY.equals(cell.getColumn().getIdentifier()))
	{
		engine.open(form.getForms().Emergency.EDReferralToSpecialtyDialog);//WDEV-16777
	}
	else if(TrackingAreaColumn.SEEN_BY_HCP.equals(cell.getColumn().getIdentifier()))//WDEV-16816
	{
		engine.open(form.getForms().Emergency.EDSeenByAndCompleteDialog);//WDEV-16816
	}
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
@Override
protected void onDyngrdLetterCellValueChanged(DynamicGridCell cell) 
{
	if(cell.getValue() != null && cell.getRow() != null && cell.getRow().getParent() != null && cell.getRow().getParent().getValue() instanceof Correspondence)
	{
		if(!(cell.getValue() instanceof Yes))
		{
			cell.getRow().setValue(cell.getValue());
		}
	}
}
 
Example 11
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
@Override
protected void onDyngrdHeadersCellTextSubmited(DynamicGridCell cell) 
{
	if(cell.getRow() != null && cell.getRow().getParent() != null && (cell.getRow().getParent().getValue() instanceof TemplateCategoryVo || cell.getRow().getParent().getValue() instanceof ReportTemplateVo))
	{
		if (cell.getTypedText() == null || cell.getTypedText().length() < 3)
		{
			engine.showMessage("Please enter at least 3 characters for search criteria");
			return;
		}
		populateQueryComboBox(cell, ims.correspondence.vo.lookups.LookupHelper.getHeader(domain.getLookupService()));
	}
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
protected void onDyngrdInviteesCellValueChanged(DynamicGridCell cell) 
{
	if (cell.getIdentifier() != null)
	{
		DynamicGridRow row = cell.getRow();

		if (cell.getIdentifier().equals(HcpLiteVo.class))
		{
			row.setValue(((HcpLiteVo) cell.getValue()));
		}
	}
}
 
Example 13
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
@Override
protected void onDyngrdPrintCellButtonClicked(DynamicGridCell cell) 
{
	if(cell != null && cell.getRow() != null && cell.getColumn().equals(getColumn(COL_PREVIEW)))
	{
		previewReport(cell.getRow());
	}
}
 
Example 14
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
protected void viewAssociations()
{
	DynamicGridRow row = form.dyngrdProcedure().getSelectedRow();
	if (row == null)
		throw new CodingRuntimeException("No row selected");

	DynamicGridCell cell = row.getCells().get(getColByIdentifier(COL_ASSOCS));

	if ((cell != null) && (cell.getColumn().equals(getColumn(COL_ASSOCS))) && (cell.getRow() != null) && (cell.getRow().getValue() != null))
	{
		form.getGlobalContext().Clinical.setClinicalDIassociationsFormMode(FormMode.VIEW);
		form.getGlobalContext().Clinical.PatientSummary.setPrimaryAssociation((PatientProcedureShortListVo) cell.getRow().getValue());
		engine.open(form.getForms().Clinical.ClinicalDiAssociations);
	}
}
 
Example 15
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void populateQueryComboboxClinics(DynamicGridCell cell, ClinicLiteVoCollection clinicList)
{
	if (cell == null)
		throw new CodingRuntimeException("Major Logical Error - Can not populate a null cell");
	
	// Clear the query combobox
	cell.getItems().clear();
	
	if (clinicList == null || clinicList.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 clinics that are 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 ClinicLiteVo))
			throw new CodingRuntimeException("Non clinical association added to CLINICS category");
		
		clinicList.remove((ClinicLiteVo) row.getValue());
	}
	
	
	if (clinicList.size() == 0)
		return;
	
	
	// Add clinics to the query combobox item collection
	DynamicGridCellItem newClinicEntry;
	
	for (int i = 0; i < clinicList.size(); i++)
	{
		// Create a new row for each entry
		newClinicEntry = cell.getItems().newItem();
		newClinicEntry.setValue(clinicList.get(i));
	}
	
	// Expand the cell
	cell.setMaxDropDownItems(MAX_DROPDOWN_ITEMS);
	cell.showOpened();
}
 
Example 16
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void populateQueryComboboxConsultants(DynamicGridCell cell, MedicLiteVoCollection consultantList)
{
	if (cell == null)
		throw new CodingRuntimeException("Major Logical Error - Can not populate a null cell");
	
	// Clear the query combobox
	cell.getItems().clear();
	
	if (consultantList == null || consultantList.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 that are 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 MedicLiteVo))
			throw new CodingRuntimeException("Non consultant association added to CONSULTANTS category");
		
		consultantList.remove((MedicLiteVo) row.getValue());
	}
	
	
	if (consultantList.size() == 0)
		return;
	
	
	// Add consultants to the query combobox item collection
	DynamicGridCellItem newConsultantEntry;
	
	for (int i = 0; i < consultantList.size(); i++)
	{
		// Create a new row for each entry
		newConsultantEntry = cell.getItems().newItem();
		newConsultantEntry.setValue(consultantList.get(i));
	}
	
	// Expand the cell
	cell.setMaxDropDownItems(MAX_DROPDOWN_ITEMS);
	cell.showOpened();
}
 
Example 17
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void populateQueryComboboxSpecialties(DynamicGridCell cell, ArrayList<Specialty> specialtyList)
{
	if (cell == null)
		throw new CodingRuntimeException("Major Logical Error - Can not populate a null cell");
	
	// Clear the combobox
	cell.getItems().clear();
	
	if (specialtyList == null || specialtyList.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 specialties 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 Specialty))
			throw new CodingRuntimeException("Non specialty association added to SPECIALTY category");

		specialtyList.remove(null);
		specialtyList.remove(row.getValue());
	}
	
	if (specialtyList.size() == 0)
		return;
	
	// Add specialties to the query combobox item collection
	DynamicGridCellItem newSpecialtyEntry;
	
	for (int i = 0; i < specialtyList.size(); i++)
	{
		// Create a new row for each entry
		newSpecialtyEntry = cell.getItems().newItem();
		newSpecialtyEntry.setValue(specialtyList.get(i));
	}
	
	// Expand the cell
	cell.setMaxDropDownItems(MAX_DROPDOWN_ITEMS);
	cell.showOpened();
}
 
Example 18
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void populateQueryComboboxClinics(DynamicGridCell cell, ClinicLiteVoCollection clinicList)
{
	if (cell == null)
		throw new CodingRuntimeException("Major Logical Error - Can not populate a null cell");
	
	// Clear the query combobox
	cell.getItems().clear();

	if (clinicList == null || clinicList.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 clinics 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 ClinicAccessVo))
			throw new CodingRuntimeException("Non clinical correspondence added to clinical category");

		clinicList.remove(((ClinicAccessVo) row.getValue()).getClinic());
	}
	
	
	if (clinicList.size() == 0)
		return;

	// Add clinics to the query combobox item collection
	DynamicGridCellItem newClinicEntry;
	
	for (int i = 0; i < clinicList.size(); i++)
	{
		// Create a new row for each entry
		newClinicEntry = cell.getItems().newItem();
		newClinicEntry.setValue(clinicList.get(i));
	}

	// Expand the cell
	cell.setMaxDropDownItems(MAXDROPDOWNITEMS);
	cell.showOpened();
}
 
Example 19
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
protected void onDyngrdOrganisationLocationCellValueChanged(DynamicGridCell cell)
{
	if (cell.getType().equals(DynamicCellType.ENUMERATION))
	{
		DynamicGridRow row = cell.getRow();
		if ( (row != null) && (row.getValue() != null) )
		{
			form.dyngrdOrganisationLocation().setSelectedRow(row);

			if (cell.getValue() != null)
				row.setChecked(true);
			else
				row.setChecked(false);
			
			//Find the previous accreditation for this Row....if it was ACCREDITED stop and insist on an end date being saved first
			
			if (ConfigFlag.UI.MANDATORY_MOS_ACCREDITATION_STATUS.getValue())
			{
				if (getColByIdentifier(COL_ACCREDITATION) != null && getColByIdentifier(COL_ACCREDITATION_CASETYPES) != null)
				{
					DynamicGridCell cellAccreditation = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));

					if (cellAccreditation.getValue() != null && (((AccreditationLocationStatus) cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTICT_ACCRED) || ((AccreditationLocationStatus) cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING)))
					{
						row.getCells().newCell(getColByIdentifier(COL_ACCREDITATION_CASETYPES), DynamicCellType.BUTTON);
					}
					else
					{
						DynamicGridCell caseTypeCell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_CASETYPES));
						
						if (caseTypeCell != null)
							caseTypeCell.clear();
					}

					DynamicGridCell cellCases = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_CASETYPES));

					if (form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo)
		           	{
		           		((HcpLocationVo)form.dyngrdOrganisationLocation().getSelectedRow().getValue()).setCaseTypes(null);
		           	}
					else
					if (cellCases != null)
						cellCases.setIdentifier(null);

				}
			}
		}
	}
	
}
 
Example 20
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void createCellsByType(RulesEngineField identifier, DynamicGridCell cell)
{
	int nextCollAvaible = clearRightCells((Integer) cell.getColumn().getIdentifier(), cell.getRow());
	RulesEngineFieldType type = identifier.getType();

	DynamicGridRow row = cell.getRow();
	RuleConditionRowVo vo = (RuleConditionRowVo) row.getIdentifier();
	int count = vo.getNumberOfColumns();

	DynamicGridColumn coll = null;
	if (nextCollAvaible != 0)
	{
		coll = getColByIndex(nextCollAvaible);
		if (coll == null)
		{
			coll = createColumn("", nextCollAvaible);
		}
	}
	else
	{
		count++;
		coll = getColByIndex(count);
		if (coll == null)
		{
			coll = createColumn("", count);
		}
	}

	setRowIdentifier(row, count, RuleConditionType.VALUE);

	count++;

	DynamicGridCell conditionValueCell = cell.getRow().getCells().newCell(coll, DynamicCellType.ENUMERATION);
	for (int j = 0; j < type.getComparators().length; j++)
	{
		if (checkRowForAnyCollection(cell))
		{
			if (type.getComparators()[j].equals(RuleValueComparator.NOTEQUALS))
				continue;
		}

		DynamicGridCellItem item = conditionValueCell.getItems().newItem(type.getComparators()[j]);
		item.setIdentifier(type.getComparators()[j]);
		conditionValueCell.setValue(type.getComparators()[j]);
		conditionValueCell.setIdentifier(type.getComparators()[j]);
	}

	setRowIdentifier(row, count, RuleConditionType.VALUE);

	conditionValueCell.setAutoPostBack(true);
	count++;

	DynamicGridColumn colll = getColByIndex(count);
	DynamicGridCell cellValue = null;

	if (colll == null)
	{
		colll = createColumn("", count);
	}

	setRowIdentifier(row, count, RuleConditionType.VALUE);

	createCellByType(identifier, cell, type, colll, cellValue);
}