Java Code Examples for ims.ocrr.vo.SpecimenWorkListItemListVo.getSpecimenIsNotNull()

The following are Jave code examples for showing how to use getSpecimenIsNotNull() of the ims.ocrr.vo.SpecimenWorkListItemListVo 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 void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.RIGHT);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, item !=null?DynamicGridCellOptions.READ_ONLY_DATA_CELL:DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private Object getIdentifier(SpecimenWorkListItemListVo item)
{
	String patIdValue = "";
	String patIdentifier = ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue();
	PatIdType patIdType = PatIdType.getNegativeInstance(patIdentifier);
	if (patIdType != null)
	{
		PatientIdCollection patIdsColl = null;
		//WDEV-16232
		if (item.getSpecimenIsNotNull() && item.getSpecimen().getOrderIsNotNull() && item.getSpecimen().getOrder().getPatientIsNotNull())
			patIdsColl = item.getSpecimen().getOrder().getPatient().getIdentifiers();
		else if (item.getDFTOrderInvestigationIsNotNull() && item.getDFTOrderInvestigation().getOrderDetailsIsNotNull() && item.getDFTOrderInvestigation().getOrderDetails().getPatientIsNotNull())
			patIdsColl = item.getDFTOrderInvestigation().getOrderDetails().getPatient().getIdentifiers();
			
		for (int i = 0; patIdsColl != null && i < patIdsColl.size(); i++)
		{
			if (patIdsColl.get(i).getTypeIsNotNull() && patIdsColl.get(i).getType().equals(patIdType))
			{
				patIdValue = patIdsColl.get(i).getValue();
				break;
			}
		}
	}

	return patIdType.toString() + " " + patIdValue;
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.RIGHT);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, item != null ? DynamicGridCellOptions.READ_ONLY_DATA_CELL : DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if (item != null)
	{
		if (item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
private String getHeaderTitle(SpecimenWorkListItemListVo item)
{
	StringBuffer sb = new StringBuffer();
	sb.append("Date Required: ");
	sb.append(item.getDateToCollectIsNotNull() ? item.getDateToCollect().toString() : "");
	sb.append(" - Responsible Clinician: ");
	
	if(item.getSpecimenIsNotNull() && item.getSpecimen().getOrderIsNotNull() && item.getSpecimen().getOrder().getResponsibleClinicianIsNotNull() &&
	   item.getSpecimen().getOrder().getResponsibleClinician().getMosIsNotNull() && item.getSpecimen().getOrder().getResponsibleClinician().getMos().getName() != null)
	{
		sb.append(item.getSpecimen().getOrder().getResponsibleClinician().getMos().getName().toString());
	}
	else if(item.getSpecimen() == null && item.getDFTOrderInvestigation() != null && item.getDFTOrderInvestigation().getOrderDetails() != null && item.getDFTOrderInvestigation().getOrderDetails().getResponsibleClinician() != null
			&& item.getDFTOrderInvestigation().getOrderDetails().getResponsibleClinician().getMos() != null	 && item.getDFTOrderInvestigation().getOrderDetails().getResponsibleClinician().getMos().getName() != null)
	{
		sb.append(item.getDFTOrderInvestigation().getOrderDetails().getResponsibleClinician().getMos().getName().toString());
	}
	
	return sb.toString();
}
 
Example 7
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 8
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 9
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 10
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 6 votes
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 11
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 6 votes
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if(item != null)
	{
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{	
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 12
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 6 votes
private String getHeaderTitle(SpecimenWorkListItemListVo item)
{
	StringBuffer sb = new StringBuffer();
	sb.append("Date Required: ");
	sb.append(item.getDateToCollectIsNotNull() ? item.getDateToCollect().toString() : "");
	sb.append(" - Responsible Clinician: ");
	
	if(item.getSpecimenIsNotNull() && item.getSpecimen().getOrderIsNotNull() && item.getSpecimen().getOrder().getResponsibleClinicianIsNotNull() &&
	   item.getSpecimen().getOrder().getResponsibleClinician().getMosIsNotNull() && item.getSpecimen().getOrder().getResponsibleClinician().getMos().getName() != null)
	{
		sb.append(item.getSpecimen().getOrder().getResponsibleClinician().getMos().getName().toString());
	}
	else if(item.getSpecimen() == null && item.getDFTOrderInvestigation() != null && item.getDFTOrderInvestigation().getOrderDetails() != null && item.getDFTOrderInvestigation().getOrderDetails().getResponsibleClinician() != null
			&& item.getDFTOrderInvestigation().getOrderDetails().getResponsibleClinician().getMos() != null	 && item.getDFTOrderInvestigation().getOrderDetails().getResponsibleClinician().getMos().getName() != null)
	{
		sb.append(item.getDFTOrderInvestigation().getOrderDetails().getResponsibleClinician().getMos().getName().toString());
	}
	
	return sb.toString();
}
 
Example 13
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 6 votes
private String getHeaderTitle(SpecimenWorkListItemListVo item)
{
	StringBuffer sb = new StringBuffer();
	sb.append("Date Required: ");
	sb.append(item.getDateToCollectIsNotNull() ? item.getDateToCollect().toString() : "");
	sb.append(" - Responsible Clinician: ");
	
	if(item.getSpecimenIsNotNull() && item.getSpecimen().getOrderIsNotNull() && item.getSpecimen().getOrder().getResponsibleClinicianIsNotNull() &&
	   item.getSpecimen().getOrder().getResponsibleClinician().getMosIsNotNull() && item.getSpecimen().getOrder().getResponsibleClinician().getMos().getName() != null)
	{
		sb.append(item.getSpecimen().getOrder().getResponsibleClinician().getMos().getName().toString());
	}
	else if(item.getSpecimen() == null && item.getDFTOrderInvestigation() != null && item.getDFTOrderInvestigation().getOrderDetails() != null && item.getDFTOrderInvestigation().getOrderDetails().getResponsibleClinician() != null
			&& item.getDFTOrderInvestigation().getOrderDetails().getResponsibleClinician().getMos() != null	 && item.getDFTOrderInvestigation().getOrderDetails().getResponsibleClinician().getMos().getName() != null)
	{
		sb.append(item.getDFTOrderInvestigation().getOrderDetails().getResponsibleClinician().getMos().getName().toString());
	}
	
	return sb.toString();
}
 
Example 14
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 6 votes
private void createControlsForNotCollection(DynamicGridRow row, SpecimenWorkListItemListVo item)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.LABEL, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	cell = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.LABEL, DynamicGridCellOptions.LABEL_CELL);
	getColumn(QUERY_COL).setAlignment(Alignment.RIGHT);
	cell.setValue("Reason:");
	cell = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, item != null ? DynamicGridCellOptions.READ_ONLY_DATA_CELL : DynamicGridCellOptions.EDITABLE_DATA_CELL);
	setCellMaxLength(item, cell);
	if (item != null)
	{
		if (item.getSpecimenIsNotNull() && item.getSpecimen().getCollectorCommentIsNotNull())
		{
			cell.setValue(item.getSpecimen().getCollectorComment());
			cell.setTooltip(item.getSpecimen().getCollectorComment());
		}
	}
}
 
Example 15
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private String getHeaderTitle(SpecimenWorkListItemListVo item)
{
	StringBuffer sb = new StringBuffer();
	sb.append("Date Required: ");
	sb.append(item.getDateToCollectIsNotNull() ? item.getDateToCollect().toString() : "");
	sb.append(" Responsible Clinician: ");
	if(item.getSpecimenIsNotNull() && 
	   item.getSpecimen().getOrderIsNotNull() && 
	   item.getSpecimen().getOrder().getResponsibleClinicianIsNotNull() &&
	   item.getSpecimen().getOrder().getResponsibleClinician().getMosIsNotNull() &&
	   item.getSpecimen().getOrder().getResponsibleClinician().getMos().getName() != null)
	sb.append(item.getSpecimen().getOrder().getResponsibleClinician().getMos().getName().toString());
	return sb.toString();
}
 
Example 16
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private String gePatientTitle(SpecimenWorkListItemListVo item)
{
	StringBuffer sb = new StringBuffer();
	String patient = "(No patient)";
	//WDEV-16232
	if (item.getSpecimenIsNotNull() && item.getSpecimen().getOrderIsNotNull() && item.getSpecimen().getOrder().getPatientIsNotNull() && item.getSpecimen().getOrder().getPatient().getNameIsNotNull())
		patient = item.getSpecimen().getOrder().getPatient().getName().toString();
	else if (item.getDFTOrderInvestigationIsNotNull() && item.getDFTOrderInvestigation().getOrderDetailsIsNotNull() && item.getDFTOrderInvestigation().getOrderDetails().getPatientIsNotNull() && item.getDFTOrderInvestigation().getOrderDetails().getPatient().getNameIsNotNull())
		patient=item.getDFTOrderInvestigation().getOrderDetails().getPatient().getName().toString();
	
	sb.append(patient);
	sb.append(" - ");
	sb.append(getIdentifier(item));
	return sb.toString();
}
 
Example 17
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private PatientRefVo getPatientIdentifier(SpecimenWorkListItemListVo item)
{
	//WDEV-16232
	if (item.getSpecimenIsNotNull() && item.getSpecimen().getOrderIsNotNull() && item.getSpecimen().getOrder().getPatientIsNotNull())
		return item.getSpecimen().getOrder().getPatient();
	else if (item.getDFTOrderInvestigationIsNotNull() && item.getDFTOrderInvestigation().getOrderDetailsIsNotNull() && item.getDFTOrderInvestigation().getOrderDetails().getPatientIsNotNull())
		item.getDFTOrderInvestigation().getOrderDetails().getPatient();
	return null;
}
 
Example 18
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void refreshCommentCell(SpecimenWorkListItemListVo voWorkListItemSaved, DynamicGridRow row)
{
	if(voWorkListItemSaved == null || row == null)
		return;
	DynamicGridCell commentCell = row.getCells().get(form.dyngrdCollect().getColumns().getByIdentifier(COMMENTS_COLUMN));
	if(voWorkListItemSaved.getSpecimenIsNotNull() && voWorkListItemSaved.getSpecimen().getCollectorCommentIsNotNull())
	{
		commentCell.setValue(voWorkListItemSaved.getSpecimen().getCollectorComment());
		commentCell.setTooltip(voWorkListItemSaved.getSpecimen().getCollectorComment());
	}
}
 
Example 19
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private String getClosedRoundsMessage(SpecimenWorkListItemListVo voItem)
{
	LocationRefVo ward = null;
	if(voItem != null && voItem.getSpecimenIsNotNull() && voItem.getSpecimen().getOrderIsNotNull() && voItem.getSpecimen().getOrder().getPatientIsNotNull())
		ward = voItem.getSpecimen().getOrder().getPatient().getWard();
	//build up a list of closed rounds
	if(ward != null)
	{
		PhlebotomyRoundShortVoCollection voCollClosedRounds = domain.listClosedRounds(form.dteDate().getValue(), form.cmbRound().getValue(), ward );
		StringBuffer message = new StringBuffer();
		if (voCollClosedRounds != null && voCollClosedRounds.size() > 0)
		{
			message.append("You cannot place this order as the following inpatient phlebotomy rounds are closed: ");
			for (int i = 0; i < voCollClosedRounds.size(); i++)
			{
				message.append(voCollClosedRounds.get(i).getDate().toString());
				message.append("  ");
				message.append(voCollClosedRounds.get(i).getRoundToCollect().getText());
				if (voCollClosedRounds.size() - i == 2)
				{
					message.append("\n");
				}
			}
		}
		return message.length() > 0 ? message.toString() : null;
	}
	
	return null;
}
 
Example 20
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
private String getClosedRoundsMessage(SpecimenWorkListItemListVo voItem)
{
	LocationRefVo ward = null;
	if(voItem != null && voItem.getSpecimenIsNotNull() && voItem.getSpecimen().getOrderIsNotNull() && voItem.getSpecimen().getOrder().getPatientIsNotNull())
		ward = voItem.getSpecimen().getOrder().getPatient().getWard();
	//build up a list of closed rounds
	if(ward != null)
	{
		PhlebotomyRoundShortVoCollection voCollClosedRounds = domain.listClosedRounds(form.dteDate().getValue(), form.cmbRound().getValue(), ward );
		StringBuffer message = new StringBuffer();
		if (voCollClosedRounds != null && voCollClosedRounds.size() > 0)
		{
			message.append("You cannot place this order as the following inpatient phlebotomy rounds are closed: ");
			for (int i = 0; i < voCollClosedRounds.size(); i++)
			{
				message.append(voCollClosedRounds.get(i).getDate().toString());
				message.append("  ");
				message.append(voCollClosedRounds.get(i).getRoundToCollect().getText());
				if (voCollClosedRounds.size() - i == 2)
				{
					message.append("\n");
				}
			}
		}
		return message.length() > 0 ? message.toString() : null;
	}
	
	return null;
}
 
Example 21
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
private PatientRefVo getPatientIdentifier(SpecimenWorkListItemListVo item)
{
	//WDEV-16232
	if (item.getSpecimenIsNotNull() && item.getSpecimen().getOrderIsNotNull() && item.getSpecimen().getOrder().getPatientIsNotNull())
		return item.getSpecimen().getOrder().getPatient();
	else if (item.getDFTOrderInvestigationIsNotNull() && item.getDFTOrderInvestigation().getOrderDetailsIsNotNull() && item.getDFTOrderInvestigation().getOrderDetails().getPatientIsNotNull())
		item.getDFTOrderInvestigation().getOrderDetails().getPatient();
	return null;
}
 
Example 22
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
private String gePatientTitle(SpecimenWorkListItemListVo item)
{
	StringBuffer sb = new StringBuffer();
	String patient = "(No patient)";
	//WDEV-16232
	if (item.getSpecimenIsNotNull() && item.getSpecimen().getOrderIsNotNull() && item.getSpecimen().getOrder().getPatientIsNotNull() && item.getSpecimen().getOrder().getPatient().getNameIsNotNull())
		patient = item.getSpecimen().getOrder().getPatient().getName().toString();
	else if (item.getDFTOrderInvestigationIsNotNull() && item.getDFTOrderInvestigation().getOrderDetailsIsNotNull() && item.getDFTOrderInvestigation().getOrderDetails().getPatientIsNotNull() && item.getDFTOrderInvestigation().getOrderDetails().getPatient().getNameIsNotNull())
		patient=item.getDFTOrderInvestigation().getOrderDetails().getPatient().getName().toString();
	
	sb.append(patient);
	sb.append(" - ");
	sb.append(getIdentifier(item));
	return sb.toString();
}
 
Example 23
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 5 votes
private String getClosedRoundsMessage(SpecimenWorkListItemListVo voItem)
{
	LocationRefVo ward = null;
	if(voItem != null && voItem.getSpecimenIsNotNull() && voItem.getSpecimen().getOrderIsNotNull() && voItem.getSpecimen().getOrder().getPatientIsNotNull())
		ward = voItem.getSpecimen().getOrder().getPatient().getWard();
	//build up a list of closed rounds
	if(ward != null)
	{
		PhlebotomyRoundShortVoCollection voCollClosedRounds = domain.listClosedRounds(form.dteDate().getValue(), form.cmbRound().getValue(), ward );
		StringBuffer message = new StringBuffer();
		if (voCollClosedRounds != null && voCollClosedRounds.size() > 0)
		{
			message.append("You cannot place this order as the following inpatient phlebotomy rounds are closed: ");
			for (int i = 0; i < voCollClosedRounds.size(); i++)
			{
				message.append(voCollClosedRounds.get(i).getDate().toString());
				message.append("  ");
				message.append(voCollClosedRounds.get(i).getRoundToCollect().getText());
				if (voCollClosedRounds.size() - i == 2)
				{
					message.append("\n");
				}
			}
		}
		return message.length() > 0 ? message.toString() : null;
	}
	
	return null;
}
 
Example 24
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 5 votes
private void refreshCommentCell(SpecimenWorkListItemListVo voWorkListItemSaved, DynamicGridRow row)
{
	if(voWorkListItemSaved == null || row == null)
		return;
	DynamicGridCell commentCell = row.getCells().get(form.dyngrdCollect().getColumns().getByIdentifier(COMMENTS_COLUMN));
	if(voWorkListItemSaved.getSpecimenIsNotNull() && voWorkListItemSaved.getSpecimen().getCollectorCommentIsNotNull())
	{
		commentCell.setValue(voWorkListItemSaved.getSpecimen().getCollectorComment());
		commentCell.setTooltip(voWorkListItemSaved.getSpecimen().getCollectorComment());
	}
}
 
Example 25
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 5 votes
private String getHeaderTitle(SpecimenWorkListItemListVo item)
{
	StringBuffer sb = new StringBuffer();
	sb.append("Date Required: ");
	sb.append(item.getDateToCollectIsNotNull() ? item.getDateToCollect().toString() : "");
	sb.append(" Responsible Clinician: ");
	if(item.getSpecimenIsNotNull() && 
	   item.getSpecimen().getOrderIsNotNull() && 
	   item.getSpecimen().getOrder().getResponsibleClinicianIsNotNull() &&
	   item.getSpecimen().getOrder().getResponsibleClinician().getMosIsNotNull() &&
	   item.getSpecimen().getOrder().getResponsibleClinician().getMos().getName() != null)
	sb.append(item.getSpecimen().getOrder().getResponsibleClinician().getMos().getName().toString());
	return sb.toString();
}
 
Example 26
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 5 votes
private PatientRefVo getPatientIdentifier(SpecimenWorkListItemListVo item)
{
	//WDEV-16232
	if (item.getSpecimenIsNotNull() && item.getSpecimen().getOrderIsNotNull() && item.getSpecimen().getOrder().getPatientIsNotNull())
		return item.getSpecimen().getOrder().getPatient();
	else if (item.getDFTOrderInvestigationIsNotNull() && item.getDFTOrderInvestigation().getOrderDetailsIsNotNull() && item.getDFTOrderInvestigation().getOrderDetails().getPatientIsNotNull())
		item.getDFTOrderInvestigation().getOrderDetails().getPatient();
	return null;
}
 
Example 27
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
/**
 * @param item
 * @param row
 */
private void displayCommonCells(SpecimenWorkListItemListVo item, DynamicGridRow row)
{
	if(item == null || row == null)
		return;
	
	DynamicGridCell statusCell = row.getCells().get(getColumn(COLLECTED_COL));
	if(statusCell != null)
		row.getCells().remove(statusCell);
	statusCell = row.getCells().newCell(getColumn(COLLECTED_COL), DynamicCellType.IMAGE);
	if(item.getCollectionStatusIsNotNull())
	{
		statusCell.setValue(item.getCollectionStatus().getImage());
		statusCell.setTooltip(item.getCollectionStatus().toString());
	}
	
	if(item.getCollectionStatusIsNotNull() && (item.getCollectionStatus().equals(SpecimenCollectionStatus.CANCELLED) ||item.getCollectionStatus().equals(SpecimenCollectionStatus.COULDNOTCOLLECT)))
	{
		createControlsForNotCollection(row, item);
	}
	else
	{
		Date date = null;
		Time time = null;
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollDateTimePlacerIsNotNull())
		{
			date = item.getSpecimen().getCollDateTimePlacer().getDate();
			time = item.getSpecimen().getCollDateTimePlacer().getTime();
		}
		
		DynamicGridCell cellDate = row.getCells().get(getColumn(DATE_COL));
		if(cellDate != null)
			row.getCells().remove(cellDate);
		cellDate = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellDate.setValue(date != null?date.toString():"");
		cellDate.setReadOnly(true);
		
		DynamicGridCell cellTime = row.getCells().get(getColumn(TIME_COL));
		if(cellTime != null)
			row.getCells().remove(cellTime);
		cellTime = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellTime.setValue(time != null?time.toString():"");
		cellTime.setReadOnly(true);
		
		DynamicGridCell cellQuery = row.getCells().get(getColumn(QUERY_COL));
		if(cellQuery != null)
			row.getCells().remove(cellQuery);
		cellQuery = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellQuery.setValue(item.getSpecimen().getCollectingMosIsNotNull() && item.getSpecimen().getCollectingMos().getNameIsNotNull()?item.getSpecimen().getCollectingMos().getName().toString():"");
		cellQuery.setReadOnly(true);
		
		DynamicGridCell cellText = row.getCells().get(getColumn(TEXT_COL));
		if(cellText != null)
			row.getCells().remove(cellText);
		cellText = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellText.setValue(item.getSpecimen().getCollectorComment());
		cellText.setTooltip(item.getSpecimen().getCollectorComment());
		cellText.setReadOnly(true);
		setCellMaxLength(item, cellText);
	}
	
	//row.setReadOnly(true);
	row.setBackColor(Color.LightGray);
}
 
Example 28
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
/**
 * @param item
 * @param disciplineRow
 */
private void displayCommonCells(SpecimenWorkListItemListVo item, DynamicGridRow disciplineRow)
{
	if(item == null || disciplineRow == null)
		return;
	
	removeCellByColumn(disciplineRow, COLLECTED_COL);
	DynamicGridCell collectedCell = disciplineRow.getCells().newCell(getColumn(COLLECTED_COL), DynamicCellType.IMAGE, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	if(item.getCollectionStatusIsNotNull())
	{
		collectedCell.setValue(item.getCollectionStatus().getImage());
		collectedCell.setTooltip(item.getCollectionStatus().toString());
	}
	
	Date date = null;
	Time time = null;
	if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollDateTimePlacerIsNotNull())
	{
		date = item.getSpecimen().getCollDateTimePlacer().getDate();
		time = item.getSpecimen().getCollDateTimePlacer().getTime();
	}
	
	if(item.getCollectionStatusIsNotNull() && (item.getCollectionStatus().equals(SpecimenCollectionStatus.CANCELLED) ||item.getCollectionStatus().equals(SpecimenCollectionStatus.COULDNOTCOLLECT)))
	{
		createControlsForNotCollection(disciplineRow, item);
	}
	else
	{
		removeCellByColumn(disciplineRow, DATE_COL);
		DynamicGridCell dateCell = disciplineRow.getCells().newCell(getColumn(DATE_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		dateCell.setValue(date != null?date.toString():"");
		dateCell.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, TIME_COL);
		DynamicGridCell timeCell = disciplineRow.getCells().newCell(getColumn(TIME_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		timeCell.setValue(time != null?time.toString():"");
		timeCell.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, QUERY_COL);
		DynamicGridCell cellQuery = disciplineRow.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellQuery.setValue(item.getSpecimen().getCollectingMosIsNotNull() && item.getSpecimen().getCollectingMos().getNameIsNotNull()?item.getSpecimen().getCollectingMos().getName().toString():"");
		cellQuery.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, TEXT_COL);
		DynamicGridCell cellText = disciplineRow.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellText.setValue(item.getSpecimen().getCollectorComment());
		cellText.setTooltip(item.getSpecimen().getCollectorComment());
		cellText.setReadOnly(true);
		setCellMaxLength(item, cellText);
	}
	
	disciplineRow.setReadOnly(true);
	disciplineRow.setBackColor(Color.LightGray);
}
 
Example 29
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
/**
 * @param item
 * @param row
 */
private void displayCommonCells(SpecimenWorkListItemListVo item, DynamicGridRow row)
{
	if (item == null || row == null)
		return;

	DynamicGridCell statusCell = row.getCells().get(getColumn(COLLECTED_COL));
	if (statusCell != null)
		row.getCells().remove(statusCell);
	statusCell = row.getCells().newCell(getColumn(COLLECTED_COL), DynamicCellType.IMAGE);
	if (item.getCollectionStatusIsNotNull())
	{
		statusCell.setValue(item.getCollectionStatus().getImage());
		statusCell.setTooltip(item.getCollectionStatus().toString());
	}

	if (item.getCollectionStatusIsNotNull() && (item.getCollectionStatus().equals(SpecimenCollectionStatus.CANCELLED) || item.getCollectionStatus().equals(SpecimenCollectionStatus.COULDNOTCOLLECT)))
	{
		createControlsForNotCollection(row, item);
	}
	else
	{
		Date date = null;
		Time time = null;
		if (item.getSpecimenIsNotNull() && item.getSpecimen().getCollDateTimePlacerIsNotNull())
		{
			date = item.getSpecimen().getCollDateTimePlacer().getDate();
			time = item.getSpecimen().getCollDateTimePlacer().getTime();
		}

		DynamicGridCell cellDate = row.getCells().get(getColumn(DATE_COL));
		if (cellDate != null)
			row.getCells().remove(cellDate);
		cellDate = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellDate.setValue(date != null ? date.toString() : "");
		cellDate.setReadOnly(true);

		DynamicGridCell cellTime = row.getCells().get(getColumn(TIME_COL));
		if (cellTime != null)
			row.getCells().remove(cellTime);
		cellTime = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellTime.setValue(time != null ? time.toString() : "");
		cellTime.setReadOnly(true);

		DynamicGridCell cellQuery = row.getCells().get(getColumn(QUERY_COL));
		if (cellQuery != null)
			row.getCells().remove(cellQuery);
		cellQuery = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellQuery.setValue(item.getSpecimen().getCollectingMosIsNotNull() && item.getSpecimen().getCollectingMos().getNameIsNotNull() ? item.getSpecimen().getCollectingMos().getName().toString() : "");
		cellQuery.setReadOnly(true);

		DynamicGridCell cellText = row.getCells().get(getColumn(TEXT_COL));
		if (cellText != null)
			row.getCells().remove(cellText);
		cellText = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellText.setValue(item.getSpecimen().getCollectorComment());
		cellText.setTooltip(item.getSpecimen().getCollectorComment());
		cellText.setReadOnly(true);
		setCellMaxLength(item, cellText);
	}

	// row.setReadOnly(true);
	row.setBackColor(Color.LightGray);
}
 
Example 30
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
/**
 * @param item
 * @param disciplineRow
 */
private void displayCommonCells(SpecimenWorkListItemListVo item, DynamicGridRow disciplineRow)
{
	if(item == null || disciplineRow == null)
		return;
	
	removeCellByColumn(disciplineRow, COLLECTED_COL);
	DynamicGridCell collectedCell = disciplineRow.getCells().newCell(getColumn(COLLECTED_COL), DynamicCellType.IMAGE, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	if(item.getCollectionStatusIsNotNull())
	{
		collectedCell.setValue(item.getCollectionStatus().getImage());
		collectedCell.setTooltip(item.getCollectionStatus().toString());
	}
	
	Date date = null;
	Time time = null;
	if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollDateTimePlacerIsNotNull())
	{
		date = item.getSpecimen().getCollDateTimePlacer().getDate();
		time = item.getSpecimen().getCollDateTimePlacer().getTime();
	}
	
	if(item.getCollectionStatusIsNotNull() && (item.getCollectionStatus().equals(SpecimenCollectionStatus.CANCELLED) ||item.getCollectionStatus().equals(SpecimenCollectionStatus.COULDNOTCOLLECT)))
	{
		createControlsForNotCollection(disciplineRow, item);
	}
	else if (item.getSpecimen() != null) 
	{
		removeCellByColumn(disciplineRow, DATE_COL);
		DynamicGridCell dateCell = disciplineRow.getCells().newCell(getColumn(DATE_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		dateCell.setValue(date != null?date.toString():"");
		dateCell.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, TIME_COL);
		DynamicGridCell timeCell = disciplineRow.getCells().newCell(getColumn(TIME_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		timeCell.setValue(time != null?time.toString():"");
		timeCell.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, QUERY_COL);
		DynamicGridCell cellQuery = disciplineRow.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellQuery.setValue(item.getSpecimen().getCollectingMosIsNotNull() && item.getSpecimen().getCollectingMos().getNameIsNotNull()?item.getSpecimen().getCollectingMos().getName().toString():"");
		cellQuery.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, TEXT_COL);
		DynamicGridCell cellText = disciplineRow.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellText.setValue(item.getSpecimen().getCollectorComment());
		cellText.setTooltip(item.getSpecimen().getCollectorComment());
		cellText.setReadOnly(true);
		setCellMaxLength(item, cellText);
	}
	
	disciplineRow.setReadOnly(true);
	disciplineRow.setBackColor(Color.LightGray);
}
 
Example 31
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
/**
 * @param item
 * @param row
 */
private void displayCommonCells(SpecimenWorkListItemListVo item, DynamicGridRow row)
{
	if(item == null || row == null)
		return;
	
	DynamicGridCell statusCell = row.getCells().get(getColumn(COLLECTED_COL));
	if(statusCell != null)
		row.getCells().remove(statusCell);
	statusCell = row.getCells().newCell(getColumn(COLLECTED_COL), DynamicCellType.IMAGE);
	if(item.getCollectionStatusIsNotNull())
	{
		statusCell.setValue(item.getCollectionStatus().getImage());
		statusCell.setTooltip(item.getCollectionStatus().toString());
	}
	
	if(item.getCollectionStatusIsNotNull() && (item.getCollectionStatus().equals(SpecimenCollectionStatus.CANCELLED) ||item.getCollectionStatus().equals(SpecimenCollectionStatus.COULDNOTCOLLECT)))
	{
		createControlsForNotCollection(row, item);
	}
	else
	{
		Date date = null;
		Time time = null;
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollDateTimePlacerIsNotNull())
		{
			date = item.getSpecimen().getCollDateTimePlacer().getDate();
			time = item.getSpecimen().getCollDateTimePlacer().getTime();
		}
		
		DynamicGridCell cellDate = row.getCells().get(getColumn(DATE_COL));
		if(cellDate != null)
			row.getCells().remove(cellDate);
		cellDate = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellDate.setValue(date != null?date.toString():"");
		cellDate.setReadOnly(true);
		
		DynamicGridCell cellTime = row.getCells().get(getColumn(TIME_COL));
		if(cellTime != null)
			row.getCells().remove(cellTime);
		cellTime = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellTime.setValue(time != null?time.toString():"");
		cellTime.setReadOnly(true);
		
		DynamicGridCell cellQuery = row.getCells().get(getColumn(QUERY_COL));
		if(cellQuery != null)
			row.getCells().remove(cellQuery);
		cellQuery = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellQuery.setValue(item.getSpecimen().getCollectingMosIsNotNull() && item.getSpecimen().getCollectingMos().getNameIsNotNull()?item.getSpecimen().getCollectingMos().getName().toString():"");
		cellQuery.setReadOnly(true);
		
		DynamicGridCell cellText = row.getCells().get(getColumn(TEXT_COL));
		if(cellText != null)
			row.getCells().remove(cellText);
		cellText = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellText.setValue(item.getSpecimen().getCollectorComment());
		cellText.setTooltip(item.getSpecimen().getCollectorComment());
		cellText.setReadOnly(true);
		setCellMaxLength(item, cellText);
	}
	
	//row.setReadOnly(true);
	row.setBackColor(Color.LightGray);
}
 
Example 32
Project: openmaxims-linux   File: Logic.java   View Source Code Vote up 4 votes
/**
 * @param item
 * @param disciplineRow
 */
private void displayCommonCells(SpecimenWorkListItemListVo item, DynamicGridRow disciplineRow)
{
	if(item == null || disciplineRow == null)
		return;
	
	removeCellByColumn(disciplineRow, COLLECTED_COL);
	DynamicGridCell collectedCell = disciplineRow.getCells().newCell(getColumn(COLLECTED_COL), DynamicCellType.IMAGE, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	if(item.getCollectionStatusIsNotNull())
	{
		collectedCell.setValue(item.getCollectionStatus().getImage());
		collectedCell.setTooltip(item.getCollectionStatus().toString());
	}
	
	Date date = null;
	Time time = null;
	if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollDateTimePlacerIsNotNull())
	{
		date = item.getSpecimen().getCollDateTimePlacer().getDate();
		time = item.getSpecimen().getCollDateTimePlacer().getTime();
	}
	
	if(item.getCollectionStatusIsNotNull() && (item.getCollectionStatus().equals(SpecimenCollectionStatus.CANCELLED) ||item.getCollectionStatus().equals(SpecimenCollectionStatus.COULDNOTCOLLECT)))
	{
		createControlsForNotCollection(disciplineRow, item);
	}
	else
	{
		removeCellByColumn(disciplineRow, DATE_COL);
		DynamicGridCell dateCell = disciplineRow.getCells().newCell(getColumn(DATE_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		dateCell.setValue(date != null?date.toString():"");
		dateCell.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, TIME_COL);
		DynamicGridCell timeCell = disciplineRow.getCells().newCell(getColumn(TIME_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		timeCell.setValue(time != null?time.toString():"");
		timeCell.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, QUERY_COL);
		DynamicGridCell cellQuery = disciplineRow.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellQuery.setValue(item.getSpecimen().getCollectingMosIsNotNull() && item.getSpecimen().getCollectingMos().getNameIsNotNull()?item.getSpecimen().getCollectingMos().getName().toString():"");
		cellQuery.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, TEXT_COL);
		DynamicGridCell cellText = disciplineRow.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellText.setValue(item.getSpecimen().getCollectorComment());
		cellText.setTooltip(item.getSpecimen().getCollectorComment());
		cellText.setReadOnly(true);
		setCellMaxLength(item, cellText);
	}
	
	disciplineRow.setReadOnly(true);
	disciplineRow.setBackColor(Color.LightGray);
}
 
Example 33
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
/**
 * @param item
 * @param row
 */
private void displayCommonCells(SpecimenWorkListItemListVo item, DynamicGridRow row)
{
	if (item == null || row == null)
		return;

	DynamicGridCell statusCell = row.getCells().get(getColumn(COLLECTED_COL));
	if (statusCell != null)
		row.getCells().remove(statusCell);
	statusCell = row.getCells().newCell(getColumn(COLLECTED_COL), DynamicCellType.IMAGE);
	if (item.getCollectionStatusIsNotNull())
	{
		statusCell.setValue(item.getCollectionStatus().getImage());
		statusCell.setTooltip(item.getCollectionStatus().toString());
	}

	if (item.getCollectionStatusIsNotNull() && (item.getCollectionStatus().equals(SpecimenCollectionStatus.CANCELLED) || item.getCollectionStatus().equals(SpecimenCollectionStatus.COULDNOTCOLLECT)))
	{
		createControlsForNotCollection(row, item);
	}
	else
	{
		Date date = null;
		Time time = null;
		if (item.getSpecimenIsNotNull() && item.getSpecimen().getCollDateTimePlacerIsNotNull())
		{
			date = item.getSpecimen().getCollDateTimePlacer().getDate();
			time = item.getSpecimen().getCollDateTimePlacer().getTime();
		}

		DynamicGridCell cellDate = row.getCells().get(getColumn(DATE_COL));
		if (cellDate != null)
			row.getCells().remove(cellDate);
		cellDate = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellDate.setValue(date != null ? date.toString() : "");
		cellDate.setReadOnly(true);

		DynamicGridCell cellTime = row.getCells().get(getColumn(TIME_COL));
		if (cellTime != null)
			row.getCells().remove(cellTime);
		cellTime = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellTime.setValue(time != null ? time.toString() : "");
		cellTime.setReadOnly(true);

		DynamicGridCell cellQuery = row.getCells().get(getColumn(QUERY_COL));
		if (cellQuery != null)
			row.getCells().remove(cellQuery);
		cellQuery = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellQuery.setValue(item.getSpecimen().getCollectingMosIsNotNull() && item.getSpecimen().getCollectingMos().getNameIsNotNull() ? item.getSpecimen().getCollectingMos().getName().toString() : "");
		cellQuery.setReadOnly(true);

		DynamicGridCell cellText = row.getCells().get(getColumn(TEXT_COL));
		if (cellText != null)
			row.getCells().remove(cellText);
		cellText = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellText.setValue(item.getSpecimen().getCollectorComment());
		cellText.setTooltip(item.getSpecimen().getCollectorComment());
		cellText.setReadOnly(true);
		setCellMaxLength(item, cellText);
	}

	// row.setReadOnly(true);
	row.setBackColor(Color.LightGray);
}
 
Example 34
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
/**
 * @param item
 * @param disciplineRow
 */
private void displayCommonCells(SpecimenWorkListItemListVo item, DynamicGridRow disciplineRow)
{
	if(item == null || disciplineRow == null)
		return;
	
	removeCellByColumn(disciplineRow, COLLECTED_COL);
	DynamicGridCell collectedCell = disciplineRow.getCells().newCell(getColumn(COLLECTED_COL), DynamicCellType.IMAGE, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	if(item.getCollectionStatusIsNotNull())
	{
		collectedCell.setValue(item.getCollectionStatus().getImage());
		collectedCell.setTooltip(item.getCollectionStatus().toString());
	}
	
	Date date = null;
	Time time = null;
	if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollDateTimePlacerIsNotNull())
	{
		date = item.getSpecimen().getCollDateTimePlacer().getDate();
		time = item.getSpecimen().getCollDateTimePlacer().getTime();
	}
	
	if(item.getCollectionStatusIsNotNull() && (item.getCollectionStatus().equals(SpecimenCollectionStatus.CANCELLED) ||item.getCollectionStatus().equals(SpecimenCollectionStatus.COULDNOTCOLLECT)))
	{
		createControlsForNotCollection(disciplineRow, item);
	}
	else
	{
		removeCellByColumn(disciplineRow, DATE_COL);
		DynamicGridCell dateCell = disciplineRow.getCells().newCell(getColumn(DATE_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		dateCell.setValue(date != null?date.toString():"");
		dateCell.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, TIME_COL);
		DynamicGridCell timeCell = disciplineRow.getCells().newCell(getColumn(TIME_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		timeCell.setValue(time != null?time.toString():"");
		timeCell.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, QUERY_COL);
		DynamicGridCell cellQuery = disciplineRow.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellQuery.setValue(item.getSpecimen().getCollectingMosIsNotNull() && item.getSpecimen().getCollectingMos().getNameIsNotNull()?item.getSpecimen().getCollectingMos().getName().toString():"");
		cellQuery.setReadOnly(true);
		
		removeCellByColumn(disciplineRow, TEXT_COL);
		DynamicGridCell cellText = disciplineRow.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellText.setValue(item.getSpecimen().getCollectorComment());
		cellText.setTooltip(item.getSpecimen().getCollectorComment());
		cellText.setReadOnly(true);
		setCellMaxLength(item, cellText);
	}
	
	disciplineRow.setReadOnly(true);
	disciplineRow.setBackColor(Color.LightGray);
}
 
Example 35
Project: openMAXIMS   File: Logic.java   View Source Code Vote up 4 votes
/**
 * @param item
 * @param row
 */
private void displayCommonCells(SpecimenWorkListItemListVo item, DynamicGridRow row)
{
	if(item == null || row == null)
		return;
	
	DynamicGridCell statusCell = row.getCells().get(getColumn(COLLECTED_COL));
	if(statusCell != null)
		row.getCells().remove(statusCell);
	statusCell = row.getCells().newCell(getColumn(COLLECTED_COL), DynamicCellType.IMAGE);
	if(item.getCollectionStatusIsNotNull())
	{
		statusCell.setValue(item.getCollectionStatus().getImage());
		statusCell.setTooltip(item.getCollectionStatus().toString());
	}
	
	if(item.getCollectionStatusIsNotNull() && (item.getCollectionStatus().equals(SpecimenCollectionStatus.CANCELLED) ||item.getCollectionStatus().equals(SpecimenCollectionStatus.COULDNOTCOLLECT)))
	{
		createControlsForNotCollection(row, item);
	}
	else
	{
		Date date = null;
		Time time = null;
		if(item.getSpecimenIsNotNull() && item.getSpecimen().getCollDateTimePlacerIsNotNull())
		{
			date = item.getSpecimen().getCollDateTimePlacer().getDate();
			time = item.getSpecimen().getCollDateTimePlacer().getTime();
		}
		
		DynamicGridCell cellDate = row.getCells().get(getColumn(DATE_COL));
		if(cellDate != null)
			row.getCells().remove(cellDate);
		cellDate = row.getCells().newCell(getColumn(DATE_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellDate.setValue(date != null?date.toString():"");
		cellDate.setReadOnly(true);
		
		DynamicGridCell cellTime = row.getCells().get(getColumn(TIME_COL));
		if(cellTime != null)
			row.getCells().remove(cellTime);
		cellTime = row.getCells().newCell(getColumn(TIME_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellTime.setValue(time != null?time.toString():"");
		cellTime.setReadOnly(true);
		
		DynamicGridCell cellQuery = row.getCells().get(getColumn(QUERY_COL));
		if(cellQuery != null)
			row.getCells().remove(cellQuery);
		cellQuery = row.getCells().newCell(getColumn(QUERY_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellQuery.setValue(item.getSpecimen().getCollectingMosIsNotNull() && item.getSpecimen().getCollectingMos().getNameIsNotNull()?item.getSpecimen().getCollectingMos().getName().toString():"");
		cellQuery.setReadOnly(true);
		
		DynamicGridCell cellText = row.getCells().get(getColumn(TEXT_COL));
		if(cellText != null)
			row.getCells().remove(cellText);
		cellText = row.getCells().newCell(getColumn(TEXT_COL), DynamicCellType.STRING, DynamicGridCellOptions.READ_ONLY_DATA_CELL);
		cellText.setValue(item.getSpecimen().getCollectorComment());
		cellText.setTooltip(item.getSpecimen().getCollectorComment());
		cellText.setReadOnly(true);
		setCellMaxLength(item, cellText);
	}
	
	//row.setReadOnly(true);
	row.setBackColor(Color.LightGray);
}