Java Code Examples for ims.core.vo.PatientMedicationLiteVo.getMedicationIsNotNull()

The following are Jave code examples for showing how to use getMedicationIsNotNull() of the ims.core.vo.PatientMedicationLiteVo class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License 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 2
Project: openMAXIMS   File: Logic.java   Source Code and License 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 3
Project: openMAXIMS   File: Logic.java   Source Code and License 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: openmaxims-linux   File: Logic.java   Source Code and License 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());
}