Java Code Examples for ims.framework.controls.DynamicGridCellItem

The following are top voted examples for showing how to use ims.framework.controls.DynamicGridCellItem. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateQueryClinics(DynamicGridCell cell, String textTyped) 
{
	cell.getItems().clear();
	ClinicLiteVoCollection clinicsColl = domain.listClinics(textTyped);
	
	if(clinicsColl != null)
	{
		for(int i=0; i<clinicsColl.size(); i++)
		{
			if(clinicNotOnScreen(clinicsColl.get(i), cell.getRow().getParent()))
			{
				DynamicGridCellItem newComboItem = cell.getItems().newItem(clinicsColl.get(i));
			}
		}
		
		if(clinicsColl.size() > 0)
		{
			cell.showOpened();
		}
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateQuerySpecialty(DynamicGridCell cell, String string) 
{
	cell.getItems().clear();
	
	LookupService lookup = domain.getLookupService();
	SpecialtyCollection collection = (SpecialtyCollection) lookup.getLookupCollection(Specialty.TYPE_ID,SpecialtyCollection.class, Specialty.class);
	
	if(collection != null)
	{
		for(int i=0; i<collection.size(); i++)
		{
			if(validTypedText(cell.getTypedText(), collection.get(i).getIItemText()) 
					&& specialtyNotOnScreen(collection.get(i), cell.getRow().getParent()))
			{
				DynamicGridCellItem newComboItem = cell.getItems().newItem(collection.get(i));
			}
		}
		if(collection.size() > 0)
		{
			cell.showOpened();
		}
	}	
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateQueryConsultants(DynamicGridCell cell, String textTyped) 
{
	cell.getItems().clear();
	MedicLiteVoCollection medicColl = domain.listConsultants(textTyped);
	
	if(medicColl != null)
	{
		for(int i=0; i<medicColl.size(); i++)
		{
			if(consultantNotOnScreen(medicColl.get(i), cell.getRow().getParent()))
			{
				DynamicGridCellItem newComboItem = cell.getItems().newItem(medicColl.get(i));
			}
		}
		
		if(medicColl.size() > 0)
		{
			cell.showOpened();
		}
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void updateRowTemplateCategory(DynamicGridRow row, Header header) 
{
	DynamicGridColumn column = null;
	DynamicGridCell cell = null;
	
	column = form.dyngrdHeaders().getColumns().getByIdentifier(COL_HEADING);
	cell = row.getCells().newCell(column,(form.getMode().equals(FormMode.EDIT) ? DynamicCellType.QUERYCOMBOBOX : DynamicCellType.STRING ));
	if(form.getMode().equals(FormMode.EDIT))
	{
		DynamicGridCellItem newComboItem = cell.getItems().newItem(header);
		cell.setValue(header);
	}
	else if(form.getMode().equals(FormMode.VIEW))
	{
		cell.setValue(header.getIItemText());
	}
	cell.setReadOnly(!form.getMode().equals(FormMode.EDIT));
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateQueryComboBox(DynamicGridCell cell, HeaderCollection headerColl) 
{
	cell.getItems().clear();
	
	for(int i=0; i<headerColl.size(); i++)
	{
		if(validTypedText(cell.getTypedText(), headerColl.get(i).getIItemText()))
		{
			DynamicGridCellItem newComboItem = cell.getItems().newItem(headerColl.get(i));	
		}
	}
	
	if(headerColl.size() > 0)
	{
		cell.showOpened();
	}
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onDyngrdCellValueChanged(DynamicGridCell cell)
{
	DynamicGridCellItemCollection items = cell.getItems();
	
	if (items != null && items.size() > 0)
	{
		for (int i = 0; i < items.size(); i++)
		{
			DynamicGridCellItem item = items.get(i);
			
			if (ENABLE_CLOSE.equals(item.getIdentifier()))
			{
				if (item.isChecked())
					form.getLocalContext().setCustomEvent(ChartingEvents.ENABLE_CLOSE);
				else
					form.getLocalContext().setCustomEvent(ChartingEvents.DISABLE_CLOSE);
				
				form.fireCustomControlValueChanged();
			}
		}
	}
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void createCloseCombobox()
{
	// Add two empty rows
	form.dyngrd().getRows().newRow();

	DynamicGridRow row = form.dyngrd().getRows().newRow();
	row.setReadOnly(false);
	row.setSelectable(false);
	
	DynamicGridCell enableCloseCell = row.getCells().newCell(form.dyngrd().getColumns().getByIdentifier(COLUMN_NAME), DynamicCellType.MULTISELECT);
	enableCloseCell.setWidth(100);
	
	enableCloseCell.setAutoPostBack(true);
	enableCloseCell.setReadOnly(false);
	
	DynamicGridCellItem item = enableCloseCell.getItems().newItem("Enable Close", "Enable Close");
	item.setIdentifier(ENABLE_CLOSE);
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onDyngrdActionsCellTextSubmited(DynamicGridCell cell)
{
	cell.getItems().clear();
	AppUserShortVo appUserFilter = new AppUserShortVo();
	appUserFilter.setUsername(cell.getTypedText());
	AppUserShortVoCollection users = domain.listAppUsers(appUserFilter);
	if (users != null && users.size() > 0)
	{
		for (int i = 0; i < users.size(); i++)
		{
			DynamicGridCellItem item = cell.getItems().newItem(users.get(i).getUserRealName() + " (" + users.get(i).getUsername() + ")");
			item.setIdentifier(users.get(i));
		}
		if (users.size() == 1)
		{
			cell.setValue(users.get(0).getUserRealName() + " (" + users.get(0).getUsername() + ")");
			cell.setIdentifier(users.get(0));
		}
		else if (users.size() > 1)
			cell.showOpened();

		cell.getRow().setIdentifier(cell.getIdentifier());
	}
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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 10
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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 11
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
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 12
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateQueryClinics(DynamicGridCell cell, String textTyped) 
{
	cell.getItems().clear();
	ClinicLiteVoCollection clinicsColl = domain.listClinics(textTyped);
	
	if(clinicsColl != null)
	{
		for(int i=0; i<clinicsColl.size(); i++)
		{
			if(clinicNotOnScreen(clinicsColl.get(i), cell.getRow().getParent()))
			{
				DynamicGridCellItem newComboItem = cell.getItems().newItem(clinicsColl.get(i));
			}
		}
		
		if(clinicsColl.size() > 0)
		{
			cell.showOpened();
		}
	}
}
 
Example 13
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateQuerySpecialty(DynamicGridCell cell, String string) 
{
	cell.getItems().clear();
	
	LookupService lookup = domain.getLookupService();
	SpecialtyCollection collection = (SpecialtyCollection) lookup.getLookupCollection(Specialty.TYPE_ID,SpecialtyCollection.class, Specialty.class);
	
	if(collection != null)
	{
		for(int i=0; i<collection.size(); i++)
		{
			if(validTypedText(cell.getTypedText(), collection.get(i).getIItemText()) 
					&& specialtyNotOnScreen(collection.get(i), cell.getRow().getParent()))
			{
				DynamicGridCellItem newComboItem = cell.getItems().newItem(collection.get(i));
			}
		}
		if(collection.size() > 0)
		{
			cell.showOpened();
		}
	}	
}
 
Example 14
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateQueryConsultants(DynamicGridCell cell, String textTyped) 
{
	cell.getItems().clear();
	MedicLiteVoCollection medicColl = domain.listConsultants(textTyped);
	
	if(medicColl != null)
	{
		for(int i=0; i<medicColl.size(); i++)
		{
			if(consultantNotOnScreen(medicColl.get(i), cell.getRow().getParent()))
			{
				DynamicGridCellItem newComboItem = cell.getItems().newItem(medicColl.get(i));
			}
		}
		
		if(medicColl.size() > 0)
		{
			cell.showOpened();
		}
	}
}
 
Example 15
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void updateRowTemplateCategory(DynamicGridRow row, Header header) 
{
	DynamicGridColumn column = null;
	DynamicGridCell cell = null;
	
	column = form.dyngrdHeaders().getColumns().getByIdentifier(COL_HEADING);
	cell = row.getCells().newCell(column,(form.getMode().equals(FormMode.EDIT) ? DynamicCellType.QUERYCOMBOBOX : DynamicCellType.STRING ));
	if(form.getMode().equals(FormMode.EDIT))
	{
		DynamicGridCellItem newComboItem = cell.getItems().newItem(header);
		cell.setValue(header);
	}
	else if(form.getMode().equals(FormMode.VIEW))
	{
		cell.setValue(header.getIItemText());
	}
	cell.setReadOnly(!form.getMode().equals(FormMode.EDIT));
}
 
Example 16
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateQueryComboBox(DynamicGridCell cell, HeaderCollection headerColl) 
{
	cell.getItems().clear();
	
	for(int i=0; i<headerColl.size(); i++)
	{
		if(validTypedText(cell.getTypedText(), headerColl.get(i).getIItemText()))
		{
			DynamicGridCellItem newComboItem = cell.getItems().newItem(headerColl.get(i));	
		}
	}
	
	if(headerColl.size() > 0)
	{
		cell.showOpened();
	}
}
 
Example 17
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onDyngrdCellValueChanged(DynamicGridCell cell)
{
	DynamicGridCellItemCollection items = cell.getItems();
	
	if (items != null && items.size() > 0)
	{
		for (int i = 0; i < items.size(); i++)
		{
			DynamicGridCellItem item = items.get(i);
			
			if (ENABLE_CLOSE.equals(item.getIdentifier()))
			{
				if (item.isChecked())
					form.getLocalContext().setCustomEvent(ChartingEvents.ENABLE_CLOSE);
				else
					form.getLocalContext().setCustomEvent(ChartingEvents.DISABLE_CLOSE);
				
				form.fireCustomControlValueChanged();
			}
		}
	}
}
 
Example 18
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void createCloseCombobox()
{
	// Add two empty rows
	form.dyngrd().getRows().newRow();

	DynamicGridRow row = form.dyngrd().getRows().newRow();
	row.setReadOnly(false);
	row.setSelectable(false);
	
	DynamicGridCell enableCloseCell = row.getCells().newCell(form.dyngrd().getColumns().getByIdentifier(COLUMN_NAME), DynamicCellType.MULTISELECT);
	enableCloseCell.setWidth(100);
	
	enableCloseCell.setAutoPostBack(true);
	enableCloseCell.setReadOnly(false);
	
	DynamicGridCellItem item = enableCloseCell.getItems().newItem("Enable Close", "Enable Close");
	item.setIdentifier(ENABLE_CLOSE);
}
 
Example 19
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateScanLimits(ScanLimitsCollection scanLimits, DynamicGridCell valueCell, ScanLimits defaultScanLimit) 
{
	valueCell.getItems().clear();
	
	if (scanLimits == null)
		return;
			
	for(int i = 0; scanLimits != null && i < scanLimits.size(); i++)
	{
			DynamicGridCellItem item = valueCell.getItems().newItem();
			item.setValue(scanLimits.get(i));
			item.setText(scanLimits.get(i).getText());
	}
	
	if (defaultScanLimit != null)
		valueCell.setValue(defaultScanLimit);
}
 
Example 20
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateIVContrast(IVContrastCollection ivContrastColl, DynamicGridCell valueCell, IVContrast defaultIVContrast) 
{
	valueCell.getItems().clear();
	
	if (ivContrastColl == null)
		return;
			
	for(int i = 0; ivContrastColl != null && i < ivContrastColl.size(); i++)
	{
			DynamicGridCellItem item = valueCell.getItems().newItem();
			item.setValue(ivContrastColl.get(i));
			item.setText(ivContrastColl.get(i).getText());
	}
	
	if (defaultIVContrast != null)
		valueCell.setValue(defaultIVContrast);
}
 
Example 21
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateOralContrast(OralContrastCollection oralContrast, DynamicGridCell valueCell, OralContrast defaultOralContrast) 
{
	valueCell.getItems().clear();
	
	if (oralContrast == null)
		return;
			
	for(int i = 0; oralContrast != null && i < oralContrast.size(); i++)
	{
			DynamicGridCellItem item = valueCell.getItems().newItem();
			item.setValue(oralContrast.get(i));
			item.setText(oralContrast.get(i).getText());
			
			if (defaultOralContrast != null && oralContrast.get(i).equals(defaultOralContrast))
				item.setChecked(true);
	}		
}
 
Example 22
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateGatingOptions(GatingOptionsCollection gatingOptions, DynamicGridCell valueCell, GatingOptions defaultGatingOptions) 
{
	valueCell.getItems().clear();
	
	if (gatingOptions == null)
		return;
			
	for(int i = 0; gatingOptions != null && i < gatingOptions.size(); i++)
	{
			DynamicGridCellItem item = valueCell.getItems().newItem();
			item.setValue(gatingOptions.get(i));
			item.setText(gatingOptions.get(i).getText());
	}
	
	if (defaultGatingOptions != null)
		valueCell.setValue(defaultGatingOptions);
}
 
Example 23
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateIMRT(IMRTCollection imrt, DynamicGridCell valueCell, IMRT defaultIMRT) 
{
	valueCell.getItems().clear();
	
	if (imrt == null)
		return;
			
	for(int i = 0; imrt != null && i < imrt.size(); i++)
	{
			DynamicGridCellItem item = valueCell.getItems().newItem();
			item.setValue(imrt.get(i));
			item.setText(imrt.get(i).getText());
	}
	
	if (defaultIMRT != null)
		valueCell.setValue(defaultIMRT);
}
 
Example 24
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateImmobType(ImmobilisationTypeCollection immobilisationType, DynamicGridCell valueCell, ImmobilisationType defaultImmobilisationType) 
{
	valueCell.getItems().clear();
	
	if (immobilisationType == null)
		return;
			
	for(int i = 0; immobilisationType != null && i < immobilisationType.size(); i++)
	{
			DynamicGridCellItem item = valueCell.getItems().newItem();
			item.setValue(immobilisationType.get(i));
			item.setText(immobilisationType.get(i).getText());
	}
	
	if (defaultImmobilisationType != null)
		valueCell.setValue(defaultImmobilisationType);
}
 
Example 25
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateMouldRoomActivity(MouldRoomActivityCollection mouldRoomActivity, DynamicGridCell valueCell, MouldRoomActivity defaultMouldRoomActivity) 
{
	valueCell.getItems().clear();
	
	if (mouldRoomActivity == null)
		return;
			
	for(int i = 0; mouldRoomActivity != null && i < mouldRoomActivity.size(); i++)
	{
			DynamicGridCellItem item = valueCell.getItems().newItem();
			item.setValue(mouldRoomActivity.get(i));
			item.setText(mouldRoomActivity.get(i).getText());
	}
	
	if (defaultMouldRoomActivity != null)
		valueCell.setValue(defaultMouldRoomActivity);
}
 
Example 26
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onDyngrdActionsCellTextSubmited(DynamicGridCell cell)
{
	cell.getItems().clear();
	AppUserShortVo appUserFilter = new AppUserShortVo();
	appUserFilter.setUsername(cell.getTypedText());
	AppUserShortVoCollection users = domain.listAppUsers(appUserFilter);
	if (users != null && users.size() > 0)
	{
		for (int i = 0; i < users.size(); i++)
		{
			DynamicGridCellItem item = cell.getItems().newItem(users.get(i).getUserRealName() + " (" + users.get(i).getUsername() + ")");
			item.setIdentifier(users.get(i));
		}
		if (users.size() == 1)
		{
			cell.setValue(users.get(0).getUserRealName() + " (" + users.get(0).getUsername() + ")");
			cell.setIdentifier(users.get(0));
		}
		else if (users.size() > 1)
			cell.showOpened();

		cell.getRow().setIdentifier(cell.getIdentifier());
	}
}
 
Example 27
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateStatusCell(DynamicGridCell statusCell)
{
	statusCell.getItems().clear();
	PreActiveActiveInactiveStatusCollection statusColl = LookupHelper.getPreActiveActiveInactiveStatus(domain.getLookupService());

	if (form.cmbStatus().getValue().equals(PreActiveActiveInactiveStatus.PREACTIVE))
	{
		statusColl.remove(PreActiveActiveInactiveStatus.INACTIVE);
	}
	if (form.cmbStatus().getValue().equals(PreActiveActiveInactiveStatus.ACTIVE))
	{
		statusColl.remove(PreActiveActiveInactiveStatus.PREACTIVE);
	}

	for (int i = 0; i < statusColl.size(); i++)
	{
		DynamicGridCellItem item = statusCell.getItems().newItem(statusColl.get(i));
		item.setIdentifier(statusColl.get(i).getIItemText());
		item.setValue(statusColl.get(i));
	}
}
 
Example 28
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
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 29
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
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 30
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
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 31
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateQueryClinics(DynamicGridCell cell, String textTyped) 
{
	cell.getItems().clear();
	ClinicLiteVoCollection clinicsColl = domain.listClinics(textTyped);
	
	if(clinicsColl != null)
	{
		for(int i=0; i<clinicsColl.size(); i++)
		{
			if(clinicNotOnScreen(clinicsColl.get(i), cell.getRow().getParent()))
			{
				DynamicGridCellItem newComboItem = cell.getItems().newItem(clinicsColl.get(i));
			}
		}
		
		if(clinicsColl.size() > 0)
		{
			cell.showOpened();
		}
	}
}
 
Example 32
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateQuerySpecialty(DynamicGridCell cell, String string) 
{
	cell.getItems().clear();
	
	LookupService lookup = domain.getLookupService();
	SpecialtyCollection collection = (SpecialtyCollection) lookup.getLookupCollection(Specialty.TYPE_ID,SpecialtyCollection.class, Specialty.class);
	
	if(collection != null)
	{
		for(int i=0; i<collection.size(); i++)
		{
			if(validTypedText(cell.getTypedText(), collection.get(i).getIItemText()) 
					&& specialtyNotOnScreen(collection.get(i), cell.getRow().getParent()))
			{
				DynamicGridCellItem newComboItem = cell.getItems().newItem(collection.get(i));
			}
		}
		if(collection.size() > 0)
		{
			cell.showOpened();
		}
	}	
}
 
Example 33
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateQueryConsultants(DynamicGridCell cell, String textTyped) 
{
	cell.getItems().clear();
	MedicLiteVoCollection medicColl = domain.listConsultants(textTyped);
	
	if(medicColl != null)
	{
		for(int i=0; i<medicColl.size(); i++)
		{
			if(consultantNotOnScreen(medicColl.get(i), cell.getRow().getParent()))
			{
				DynamicGridCellItem newComboItem = cell.getItems().newItem(medicColl.get(i));
			}
		}
		
		if(medicColl.size() > 0)
		{
			cell.showOpened();
		}
	}
}
 
Example 34
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void updateRowTemplateCategory(DynamicGridRow row, Header header) 
{
	DynamicGridColumn column = null;
	DynamicGridCell cell = null;
	
	column = form.dyngrdHeaders().getColumns().getByIdentifier(COL_HEADING);
	cell = row.getCells().newCell(column,(form.getMode().equals(FormMode.EDIT) ? DynamicCellType.QUERYCOMBOBOX : DynamicCellType.STRING ));
	if(form.getMode().equals(FormMode.EDIT))
	{
		DynamicGridCellItem newComboItem = cell.getItems().newItem(header);
		cell.setValue(header);
	}
	else if(form.getMode().equals(FormMode.VIEW))
	{
		cell.setValue(header.getIItemText());
	}
	cell.setReadOnly(!form.getMode().equals(FormMode.EDIT));
}
 
Example 35
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateQueryComboBox(DynamicGridCell cell, HeaderCollection headerColl) 
{
	cell.getItems().clear();
	
	for(int i=0; i<headerColl.size(); i++)
	{
		if(validTypedText(cell.getTypedText(), headerColl.get(i).getIItemText()))
		{
			DynamicGridCellItem newComboItem = cell.getItems().newItem(headerColl.get(i));	
		}
	}
	
	if(headerColl.size() > 0)
	{
		cell.showOpened();
	}
}
 
Example 36
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onDyngrdCellValueChanged(DynamicGridCell cell)
{
	DynamicGridCellItemCollection items = cell.getItems();
	
	if (items != null && items.size() > 0)
	{
		for (int i = 0; i < items.size(); i++)
		{
			DynamicGridCellItem item = items.get(i);
			
			if (ENABLE_CLOSE.equals(item.getIdentifier()))
			{
				if (item.isChecked())
					form.getLocalContext().setCustomEvent(ChartingEvents.ENABLE_CLOSE);
				else
					form.getLocalContext().setCustomEvent(ChartingEvents.DISABLE_CLOSE);
				
				form.fireCustomControlValueChanged();
			}
		}
	}
}
 
Example 37
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void createCloseCombobox()
{
	// Add two empty rows
	form.dyngrd().getRows().newRow();

	DynamicGridRow row = form.dyngrd().getRows().newRow();
	row.setReadOnly(false);
	row.setSelectable(false);
	
	DynamicGridCell enableCloseCell = row.getCells().newCell(form.dyngrd().getColumns().getByIdentifier(COLUMN_NAME), DynamicCellType.MULTISELECT);
	enableCloseCell.setWidth(100);
	
	enableCloseCell.setAutoPostBack(true);
	enableCloseCell.setReadOnly(false);
	
	DynamicGridCellItem item = enableCloseCell.getItems().newItem("Enable Close", "Enable Close");
	item.setIdentifier(ENABLE_CLOSE);
}
 
Example 38
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onDyngrdActionsCellTextSubmited(DynamicGridCell cell)
{
	cell.getItems().clear();
	AppUserShortVo appUserFilter = new AppUserShortVo();
	appUserFilter.setUsername(cell.getTypedText());
	AppUserShortVoCollection users = domain.listAppUsers(appUserFilter);
	if (users != null && users.size() > 0)
	{
		for (int i = 0; i < users.size(); i++)
		{
			DynamicGridCellItem item = cell.getItems().newItem(users.get(i).getUserRealName() + " (" + users.get(i).getUsername() + ")");
			item.setIdentifier(users.get(i));
		}
		if (users.size() == 1)
		{
			cell.setValue(users.get(0).getUserRealName() + " (" + users.get(0).getUsername() + ")");
			cell.setIdentifier(users.get(0));
		}
		else if (users.size() > 1)
			cell.showOpened();

		cell.getRow().setIdentifier(cell.getIdentifier());
	}
}
 
Example 39
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
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 40
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
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());

}