Java Code Examples for ims.framework.controls.DynamicGridRow

The following are top voted examples for showing how to use ims.framework.controls.DynamicGridRow. 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 addLineSeparator()
{
	DynamicGridRow messageRow = form.lyrRules().tabActions().dyngrdActions().getSelectedRow();
	if (messageRow != null)
	{
		DynamicGridRow lineSeparatorInstanceRow = messageRow.getRows().newRow();
		DynamicGridColumn lineSeparatorInstanceColl = getColByIndexForActionGrid(0);
		if (lineSeparatorInstanceColl == null)
		{
			lineSeparatorInstanceColl = createColumnForActionGrid("", 0);
		}
		DynamicGridCell lineSeparatorInstanceCell = lineSeparatorInstanceRow.getCells().newCell(lineSeparatorInstanceColl, DynamicCellType.HTMLVIEW);
		lineSeparatorInstanceCell.setAutoPostBack(true);
		lineSeparatorInstanceCell.setWidth(250);
		lineSeparatorInstanceCell.setValue("--- Line Separator ---");
		lineSeparatorInstanceRow.setIdentifier(NOTIFICATION_LINE_SEPARATOR_INSTANCE);
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private DynamicGridRow findRow(DynamicGridRow groupRow, Assessment_QuestionVo assessmentQuestion)
{
	if (assessmentQuestion == null)
		return null;

	DynamicGridRowCollection rows = null;
	if (groupRow != null)
		rows = groupRow.getRows();
	else
		rows = this.grid.getRows();

	for (int x = 0; x < rows.size(); x++)
	{
		DynamicGridRow row = rows.get(x);
		if (row.getIdentifier() != null && row.getIdentifier() instanceof Assessment_QuestionVo)
		{
			if (row.getIdentifier().equals(assessmentQuestion))
				return row;
		}
	}

	return null;
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
/**
 * WDEV-16498
 * Function used to set the tool tip for Pathology Specimen Details grids
 */
private void setTooltipsForGrid(DynamicGrid dynGrid)
{
	for (int i = 0; i < dynGrid.getRows().size(); i++)
	{
		DynamicGridRow parentRow = dynGrid.getRows().get(i);
		
		if (!(parentRow.getIdentifier() instanceof OrderInvestigationVoCollection))
			throw new CodingRuntimeException("Logical error - parent row identifier must be an OrderInvestigationVoCollection");
		
		OrderInvestigationVoCollection investigations = (OrderInvestigationVoCollection) parentRow.getIdentifier();
		
		StringBuilder tooltip = new StringBuilder();
		
		for (OrderInvestigationVo investigation : investigations)
		{
			if (tooltip.length() > 0) tooltip.append(", ");
			tooltip.append(investigation.getInvestigation().getInvestigationIndex().getName());
		}
		
		parentRow.getCells().get(dynGrid.getColumns().getByIdentifier(DISCIPLINE_COLUMN)).setTooltip(tooltip.toString());
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void createNewParent()
{
	ReferralApptStatusCollection refStatusColl = getStatusList();
	refStatusColl.sort();
	ReferralApptStatusCollection refColl = form.getLocalContext().getusedParents();
	refColl.sort();
	for (int j = 0; j < refColl.size(); j++)
	{
		if (refStatusColl.contains(refColl.get(j)))
		{
			refStatusColl.remove(refColl.get(j));
		}
	}
	DynamicGridRow row = form.dyngrdStatus().getRows().newRow();
	DynamicGridCell cell = row.getCells().newCell(form.dyngrdStatus().getColumns().get(0), DynamicCellType.ENUMERATION);
	row.setExpanded(true);
	populateCell(refStatusColl, cell, row);
	form.dyngrdStatus().setSelectedRow(row);
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void createVariableCells(DynamicGridRow row, boolean bDefault)
{
	clearVariableCells(row);

	DynamicGridCell cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_LINETYPE), DynamicCellType.ENUMERATION);
	engine.populate(cell, LineType.getNegativeInstancesAsIItemCollection());
	cell.setReadOnly(false);
	if(bDefault)
	{
		cell.setValue(((DataSetTypeVo)row.getValue()).getDefaultLineType());
		cell.setReadOnly(true);
	}
	
	cell = row.getCells().newCell(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_COLOR_ICON), DynamicCellType.ENUMERATION);
	engine.populate(cell, LineColourPointIcon.getNegativeInstancesAsIItemCollection());
	cell.setReadOnly(false);
	if(bDefault)
	{
		cell.setValue(((DataSetTypeVo)row.getValue()).getDefLineColPtIcon());
		cell.setReadOnly(true);
	}
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateDynGrid(CarePlanInterventionsCollection interventions)
{
	
	form.dyngrdActions().getRows().clear();
	form.dyngrdActions().setValue(null);
	if (interventions == null)
		return;
	 for (int i = 0 ; i < interventions.size() ;  i++)
	 {
		 if (shouldAdd(interventions.get(i)))
		 {
			 DynamicGridRow newRow = form.dyngrdActions().getRows().newRow();
			 populateDynGridRowFromData( newRow,interventions.get(i));
		 }
	 }
	
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void createFindingStageRow(DynamicGridColumn colFinding, DynamicGridRow fsqRow, FindingStageQuestionsVo findingStageQuestionsVo)
{
	fsqRow.setValue(findingStageQuestionsVo);
	fsqRow.setReadOnly(true);
	
	DynamicGridCell cellFinding = fsqRow.getCells().get(colFinding);
	if (cellFinding == null)
		cellFinding = fsqRow.getCells().newCell(colFinding, DynamicCellType.STRING);

	cellFinding.setValue(findingStageQuestionsVo.getAssessmentStage().getStageName());
	cellFinding.setReadOnly(true);
	if(findingStageQuestionsVo.getAssessmentStage().getIsAnnotatedIsNotNull() && findingStageQuestionsVo.getAssessmentStage().getIsAnnotated().booleanValue())
	{
		fsqRow.setCollapsedImage(form.getImages().Admin.Brush);
		fsqRow.setExpandedImage(form.getImages().Admin.Brush);
	}
	else
	{
		fsqRow.setCollapsedImage(form.getImages().Admin.Page);
		fsqRow.setExpandedImage(form.getImages().Admin.Page);
	}
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void setColStatus(ClinicalNotesShortVo note, DynamicGridRow row)
{
	DynamicGridColumn col = getCol("Status");
	if (col == null)
		throw new DomainRuntimeException("No column for Identifier");

	DynamicGridCell statusCell = row.getCells().newCell(col, DynamicCellType.STRING);
	statusCell.setValue(note.getCurrentStatus().getStatus().getText());
	
	StringBuffer sb = new StringBuffer();
	sb.append("Status set by : ");
	sb.append(note.getCurrentStatus().getMOSIsNotNull() ? note.getCurrentStatus().getMOS().getName() : "");
	sb.append(" on ");
	sb.append(note.getCurrentStatus().getDateTimeIsNotNull() ? note.getCurrentStatus().getDateTime().toString() : "");
	statusCell.setTooltip(sb.toString());
}
 
Example 9
Project: AvoinApotti   File: MyOrderQuestionsPopulation.java   View source code 6 votes vote down vote up
private void addAnswerData(DynamicGridRow row,  GeneralQuestionAnswerVo voQuestionAnswer)
{
	if(voQuestionAnswer.getPatientAnswers() == null)
		return;
	
	for(int x = 0; x < voQuestionAnswer.getPatientAnswers().get(0).getAnswerDetails().size(); x++)
	{
		AnswerDetailsVo answer = voQuestionAnswer.getPatientAnswers().get(0).getAnswerDetails().get(x);
		DynamicGridCell cell = findCell(row, answer.getAnswerType());
		
		if(cell != null)
		{
			setCellAnswer(cell, answer);
		}
	}
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
@Override
protected void onDyngrdICPRowSelectionChanged(DynamicGridRow row) throws PresentationLogicException
{
	form.getLocalContext().setSelection(form.dyngrdICP().getValue());
	
	// Update controls state
	updateControlsState();

	// Get selected action (if any) into local context
	boolean isActionSelected = form.dyngrdICP().getSelectedRow() != null && form.dyngrdICP().getSelectedRow().getValue() instanceof PatientICPAction_PresentationVo;
	
	if (isActionSelected)
		notifySelectedActionChanged((PatientICPAction_PresentationVo) form.dyngrdICP().getSelectedRow().getValue());
	else
		notifySelectedActionChanged(null);
}
 
Example 11
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private DynamicGridRow createReportRow(TemplateForPatientDocumentVo template) 
{
	if(template == null || template.getReport() == null)
		throw new CodingRuntimeException("Cannot add a row with null template or null report.");
		
	DynamicGridRow reportRow = form.dyngrdReports().getRows().newRow();
	
	reportRow.setValue(template.getReport());
	reportRow.setSelectable(false);
	reportRow.setCollapsedImage(form.getImages().Core.ReportDesigner);
	reportRow.setExpandedImage(form.getImages().Core.ReportDesigner);

	DynamicGridCell cellName = createCell(reportRow, getColumn(COLUMN_NAME));
	
	if(cellName != null)
		cellName.setValue(template.getReport().getReportName());

	if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
	{
		reportRow.setTextColor(Color.Blue);
	}
	
	return reportRow;
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void selectDynamicRow(DynamicGridRow row)
{
	if (row == null)
		return;

	form.getGlobalContext().Core.setClinicalNotesShort((ClinicalNotesShortVo) form.dyngrdNotes().getValue());

	form.getGlobalContext().Clinical.setCurrentClinicalNote(domain.getClinicalNote((ClinicalNotesShortVo) form.dyngrdNotes().getValue()));

	// WDEV-2511
	/*if (domain.getMosUser() == null)  //commented for WDEV-14624
		{
	clearContextMenu();
		form.getContextMenus().Clinical.getExtendedClinicalNotesVIEWItem().setVisible(true);//WDEV-14624
		return;
	}
	*/ 
	updateContextMenu();
	
}
 
Example 13
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
/**
 * WDEV-12569
 * Function used to check for stages not yet configured for the tumour site 
 */
private boolean hasUnconfiguredStages()
{
	// Check for overall value (other values should be populated)
	for (int i = 0; i < form.dyngrdOverall().getRows().size(); i++)
	{
		DynamicGridColumn column = form.dyngrdOverall().getColumns().getByIdentifier(COL_OVERALL);
		DynamicGridRow row = form.dyngrdOverall().getRows().get(i);

		// If the row has an active overall value
		// Use the LiteVo version for value as this is the smallest type of VO
		if (row.getValue() instanceof TumourGroupSiteOverallStagingLiteVo && ((TumourGroupSiteOverallStagingLiteVo)row.getValue()).getIsActive())
		{
			DynamicGridCell cell = row.getCells().get(column);

			// If the value is null or TOBECONFIGURED (-2151) then return as having stages not configured
			if (cell.getValue() == null || TumourOverallStage.TOBECONFIGURED.equals(cell.getValue()))
				return true;
		}
	}

	// All stages are configured
	return false;
}
 
Example 14
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void addEntityUser()
{
	form.getLocalContext().setUsersEntityAdded(true);
	DynamicGridRow messageRow = form.lyrRules().tabActions().dyngrdActions().getSelectedRow();
	if (messageRow != null)
	{
		DynamicGridRow userEntityInstanceRow = messageRow.getRows().newRow();
		DynamicGridColumn userEntityInstanceColl = getColByIndexForActionGrid(0);
		if (userEntityInstanceColl == null)
		{
			userEntityInstanceColl = createColumnForActionGrid("", 0);
		}
		DynamicGridCell userEntityInstanceCell = userEntityInstanceRow.getCells().newCell(userEntityInstanceColl, DynamicCellType.HTMLVIEW);
		userEntityInstanceCell.setAutoPostBack(true);
		userEntityInstanceCell.setWidth(250);
		userEntityInstanceCell.setValue("--- User(s) Entity ---");
		userEntityInstanceRow.setIdentifier(NOTIFICATION_USER_ENTITY_INSTANCE);
	}
}
 
Example 15
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private DynamicGridRow getAppointmentRow(Booking_AppointmentRefVo appointment)
{
	if(appointment == null || appointment.getID_Booking_Appointment() == null)
		return null;
	
	for(int i=0; i<form.dyngrdNotes().getRows().size(); i++)
	{
		if(form.dyngrdNotes().getRows().get(i).getValue() instanceof BookingAppointmentForClinicalNotesVo
			&& ((BookingAppointmentForClinicalNotesVo) form.dyngrdNotes().getRows().get(i).getValue()).getID_Booking_Appointment() .equals(appointment.getID_Booking_Appointment()))
		{
			return form.dyngrdNotes().getRows().get(i);
		}
	}
	
	return null;
}
 
Example 16
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void addTemplates(TemplateForPatientDocumentVo template, DynamicGridRow reportRow)
{
	if(template == null || template.getReport() == null)
		throw new CodingRuntimeException("Cannot add a row with null template or null report.");
	
	if(reportRow == null)
		return;

	DynamicGridRow templateRow = reportRow.getRows().newRow();
	templateRow.setValue(template);
	templateRow.setCollapsedImage(form.getImages().Core.TemplateReport);
	templateRow.setExpandedImage(form.getImages().Core.TemplateReport);

	DynamicGridCell cellTemplateName = createCell(templateRow, getColumn(COLUMN_NAME));
	if(cellTemplateName != null)
		cellTemplateName.setValue(template.getName());

	if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
	{
		templateRow.setTextColor(Color.Blue);
	}
}
 
Example 17
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private DynamicGridRow createReportRow(TemplateForPatientDocumentVo template) 
{
	if(template == null || template.getReport() == null)
		throw new CodingRuntimeException("Cannot add a row with null template or null report.");
		
	DynamicGridRow reportRow = form.lyrLetterCreate().tabTemplate().dyngrdReports().getRows().newRow();
	
	reportRow.setValue(template.getReport());
	reportRow.setSelectable(false);
	reportRow.setCollapsedImage(form.getImages().Core.ReportDesigner);
	reportRow.setExpandedImage(form.getImages().Core.ReportDesigner);
	reportRow.setExpanded(true);//WDEV-13991

	DynamicGridCell cellName = createCell(reportRow, getColumn(COLUMN_NAME));
	
	if(cellName != null)
		cellName.setValue(template.getReport().getReportName());

	if(template.getReport().getImsIdIsNotNull() && template.getReport().getImsId().intValue() > 0)
	{
		reportRow.setTextColor(Color.Blue);
	}
	
	return reportRow;
}
 
Example 18
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
public PatientAssessmentVo updateNotApplicableQuestionStatus(PatientAssessmentVo voPatientAssessment)
{
	for (int x = 0; x < this.grid.getRows().size(); x++)
	{
		DynamicGridRow row = this.grid.getRows().get(x);

		AssessmentQuestionVo question = (AssessmentQuestionVo) row.getIdentifier();
		PatientAssessmentQuestionVo answer = findAnswer(voPatientAssessment.getAssessmentData().getAnswerGroups(), question);
		if (answer == null)
			throw new CodingRuntimeException("Unable to find an answer for '" + question.getQuestion().getText() + "' question.");
		// Change the status from Non Applicable to Answered
		if (isAnswerStatus(answer, AnswerStatus.NOTAPPLICABLE))
		{
			DynamicGridColumn columnNASelect = this.grid.getColumns().getByIdentifier(SELECT_NA_COLUMN);
			if (columnNASelect != null)
			{
				DynamicGridCell cellNASelect = row.getCells().get(columnNASelect);
				if (cellNASelect.getValue() instanceof Boolean && ((Boolean) cellNASelect.getValue()).booleanValue())
					answer.setIsAnswered(AnswerStatus.ANSWERED);
			}
		}
	}

	return voPatientAssessment;
}
 
Example 19
Project: AvoinApotti   File: UserAssessmentInstHelper.java   View source code 6 votes vote down vote up
private DynamicGridRow findRow(DynamicGridRow groupRow, Assessment_QuestionVo assessmentQuestion)
{
	if(assessmentQuestion == null)
		return null;
	
	DynamicGridRowCollection rows = null;
	if(groupRow != null)
		rows = groupRow.getRows();
	else
		rows = this.grid.getRows();
	
	for(int x = 0; x < rows.size(); x++)
	{
		DynamicGridRow row = rows.get(x);
		if(row.getIdentifier() != null && row.getIdentifier() instanceof Assessment_QuestionVo)
		{
			if(row.getIdentifier().equals(assessmentQuestion))
				return row;
		}
	}
	
	return null;
}
 
Example 20
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void addSpecialitiesRow(DynamicGridRow pRow, SpecialtyCollection specialty)
{
	if (specialty == null)
		return;

	for (int i = 0; i < specialty.size(); i++)
	{
		Specialty spe = specialty.get(i);
		DynamicGridRow nRow = pRow.getRows().newRow();

		nRow.setIdentifier(SPECIALTY_ROW_IDENTIFIER);
		nRow.setCollapsedImage(form.getImages().Admin.Specialty01);
		nRow.setExpandedImage(form.getImages().Admin.Specialty01);

		DynamicGridCell nCell = nRow.getCells().newCell(getColumn(form.lyrMain().tabByCategory().dyngrdMapps(), COLUMN_NAME), DynamicCellType.ENUMERATION);
		nCell.setReadOnly(false);
		nCell.setAutoPostBack(true);
		nCell.getItems().newItem(spe);
		nCell.setValue(spe);
	}
}
 
Example 21
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void addNewPrescriptionRecord()
{
	if (form.getLocalContext().getPrescriptionRecordAddedIsNotNull() && !form.getLocalContext().getPrescriptionRecordAdded())
	{
		form.getLocalContext().setPrescriptionRecordAdded(true);
		form.setMode(FormMode.EDIT);
		DynamicGridRow row = null;
		if (form.dyngrdPrescription().getRows().size() == 0)
		{
			row = form.dyngrdPrescription().getRows().newRow(true);
		}
		else
		{
			row = form.dyngrdPrescription().getRows().newRowBefore(form.dyngrdPrescription().getRows().get(0), true);
		}
		
		addNewPrescriptionRecord(row, null, true);
	}
}
 
Example 22
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
/**
 *	WDEV-13184
 *	Function used to retrieve Referral records from grid
 */
private CatsReferralListManualAssemblyVoCollection populateReferralsFromGrid()
{
	// Records collection
	CatsReferralListManualAssemblyVoCollection records = new CatsReferralListManualAssemblyVoCollection();
	
	// Iterate grid rows and add their values to collection
	for (int i = 0; i < form.dyngrdReferrals().getRows().size(); i++)
	{
		DynamicGridRow row = form.dyngrdReferrals().getRows().get(i);
		
		if (row.getValue() instanceof CatsReferralListManualAssemblyVo)
			records.add((CatsReferralListManualAssemblyVo) row.getValue());
	}
	
	// Return records collection
	return records;
}
 
Example 23
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private boolean checkDatasets()
{
	if(form.dyngrdLinkedDataSets().getRows().size() == 0)
	{
		engine.showMessage("Please add at least a dataset !");
		return false;
	}

	for (int i = 0; i < form.dyngrdLinkedDataSets().getRows().size(); i++)
	{
		DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().get(i);
		
		if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)).getValue().equals(LineTypeStatus.CUSTOM))
		{
			if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_LINETYPE)).getValue() == null)
			{
				engine.showMessage("Please set a line type for dataset " + ((DataSetTypeVo)row.getValue()).getName() + " !");
				return false;
			}
			if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_COLOR_ICON)).getValue() == null)
			{
				engine.showMessage("Please set a Colour / Icon for dataset " + ((DataSetTypeVo)row.getValue()).getName() + " !");
				return false;
			}
		}
	}
	
	return true;
}
 
Example 24
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
/**
 * function used to populate dynamic grid row with root finding (backward
 * compatibility)
 */
private void setDynamicGridRootFindingRow(DynamicGridRow row, NeuroMotorRootValueVo finding)
{
	if (finding == null)
		return;

	if (row == null)
		throw new CodingRuntimeException("Major Logical Error - Can not add a finding to a null row");

	// Set the row
	DynamicGridColumn column;
	DynamicGridCell cell;

	column = form.dyngrdMotor().getColumns().getByIdentifier(COL_MOTOR_AREA);
	cell = row.getCells().newCell(column, DynamicCellType.HTMLVIEW);
	cell.setValue(finding.getRootValue() != null ? finding.getRootValue().getDescription() : "");
	cell.setIdentifier(finding.getRootValue());
	cell.setReadOnly(true);

	column = form.dyngrdMotor().getColumns().getByIdentifier(COL_RIGHT);
	cell = row.getCells().newCell(column, DynamicCellType.STRING);
	cell.setValue(finding.getRightFinding() == null ? "" : (finding.getRightFinding() < 0 ? "N" : finding.getRightFinding().toString()));
	cell.setWidth(STANDARD_COLUMN_WIDTH);
	cell.setReadOnly(false);
	cell.setAutoPostBack(true);

	column = form.dyngrdMotor().getColumns().getByIdentifier(COL_LEFT);
	cell = row.getCells().newCell(column, DynamicCellType.STRING);
	cell.setValue(finding.getLeftFinding() == null ? "" : (finding.getLeftFinding() < 0 ? "N" : finding.getLeftFinding().toString()));
	cell.setReadOnly(false);
	cell.setAutoPostBack(true);

	row.setValue(finding);
}
 
Example 25
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private DynamicGridRow getGroupRow(IChartValueGroup group)
{
	for(int x = 0; x < getGrid().getRows().size(); x++)
	{
		if(group.equals(getGrid().getRows().get(x).getIdentifier()))
			return getGrid().getRows().get(x);
	}
	
	return null;
}
 
Example 26
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void setCareContextIfApplicable(DynamicGridRow row)
{
	if(row.getIdentifier() instanceof PASEventRefVo)
		form.getGlobalContext().Core.setCurrentCareContext( domain.getCareContextForPasEvent((PASEventRefVo) row.getIdentifier()));	
	else
		form.getGlobalContext().Core.setCurrentCareContext(null);
}
 
Example 27
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void updateDose()
{
	DynamicGridRow doseRow = form.dyngrdDoses().getSelectedRow();
	
	if (doseRow == null)
		return;
	
	DynamicGridCell cellDose = doseRow.getCells().get(form.dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_DOSENAME));
	cellDose.setReadOnly(false);
	
	DynamicGridCell cellRoute = doseRow.getCells().get(form.dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_ROUTE));
	cellRoute.setReadOnly(false);
	
	doseRow.setIdentifier(ROW_STATE_EDITABLE);
}
 
Example 28
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void List15MinLOSBreached(ILocation currentLocation,TrackingAreaVoCollection areas)
{
	DynamicGridRow row = form.dyngrdAreas().getRows().newRow();
	DynamicGridCell cell = row.getCells().newCell(form.dyngrdAreas().getColumns().getByIdentifier(COL_STATUS), DynamicCellType.STRING);
	cell.setWidth(150);
	cell.setValue("<15mins to LOS Breach");
	cell.setBackColor(Color.fromRGB(198, 223, 242));

	int overall_sum=0;
	for(int i=0;i< areas.size();i++)
	{			
		cell = row.getCells().newCell(form.dyngrdAreas().getColumns().getByIdentifier(COL_AREA+areas.get(i).getID_TrackingArea()), DynamicCellType.STRING);
		cell.setWidth(150);		
		String val=domain.get15MinLOS(currentLocation, areas.get(i));
		if(val!=null)
		{
			if(!val.equals("0")&& !val.equals(""))
			{
				cell.setValue(val);
				overall_sum=overall_sum+Integer.valueOf(val).intValue();					
			}	
			else
			{
				cell.setValue("-");
			}
		}
		else
		{
			cell.setValue("-");
		}		
	}
	cell = row.getCells().newCell(form.dyngrdAreas().getColumns().getByIdentifier(COL_OVERALL), DynamicCellType.HTMLVIEW);
	cell.setWidth(90);
	cell.setValue("<b>"+(overall_sum>0?String.valueOf(overall_sum):"-")+"<b>");
	cell.setBackColor(Color.Bisque);
}
 
Example 29
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void refreshQuestionsInGroupCollectionFromScreenMultipleGroupNoFlat(ims.core.vo.QuestionInformationVoCollection editedQuestions)
{
	if(editedQuestions == null || editedQuestions.size() == 0)
		return;
	
	for(int i = 0; i < form.lyrTabs().tabAssessments().dyngrdDetails().getRows().size(); i++)
	{
		DynamicGridRow row = form.lyrTabs().tabAssessments().dyngrdDetails().getRows().get(i);
		
		for (int j = 0; j < row.getRows().size(); j++)
		{
			refreshQuestionInGrid(editedQuestions, row.getRows().get(j));
		}
	}		
}
 
Example 30
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void removeQuestion()
{
	DynamicGridRow row = form.lyrTabs().tabAssessments().dyngrdDetails().getSelectedRow();
	if(row != null)
	{
		form.lyrTabs().tabAssessments().dyngrdDetails().getRows().remove(row);
		refreshContextMenu();	
	}
	else
	{
		engine.showMessage("Please select a Question");
	}
}
 
Example 31
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void populateProfileType(DynamicGridRow parentRow) 
{
	parentRow.getRows().clear();
	
	DynamicGridRow childConsultantRow = parentRow.getRows().newRow();
	DynamicGridColumn column = null;
	DynamicGridCell cell = null;
	
	column = form.dyngrdGlossary().getColumns().getByIdentifier(COL_IMAGE);
	cell = childConsultantRow.getCells().newCell(column, DynamicCellType.IMAGE);
	cell.setValue(form.getImages().Core.Users);
	column = form.dyngrdGlossary().getColumns().getByIdentifier(COL_HEADING);
	cell = childConsultantRow.getCells().newCell(column, DynamicCellType.STRING);
	cell.setValue(ProfileType.CONSULTANT.toString());
	cell.setReadOnly(true);
	childConsultantRow.setValue(ProfileType.CONSULTANT);
	childConsultantRow.isReadOnly();
	populateGlossaryProfile(parentRow, childConsultantRow, form.getImages().Core.User);
	
	DynamicGridRow childSpecialtyRow = parentRow.getRows().newRow();
	
	column = form.dyngrdGlossary().getColumns().getByIdentifier(COL_IMAGE);
	cell = childSpecialtyRow.getCells().newCell(column, DynamicCellType.IMAGE);
	cell.setValue(form.getImages().Admin.Specialty);
	column = form.dyngrdGlossary().getColumns().getByIdentifier(COL_HEADING);
	cell = childSpecialtyRow.getCells().newCell(column, DynamicCellType.STRING);
	cell.setValue(ProfileType.SPECIALTY.toString());
	cell.setReadOnly(true);
	childSpecialtyRow.setValue(ProfileType.SPECIALTY);
	childSpecialtyRow.isReadOnly();
	populateGlossaryProfile(parentRow, childSpecialtyRow, form.getImages().Admin.Specialty2);
}
 
Example 32
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private ChartTypeVo populateDataFromScreenLocal()
{
	ChartTypeVo record = populateDataFromScreen(form.getLocalContext().getCurrentRecord());

	record.setNormalBandColour(form.cmbNormalColour().getValue());
	
	if(record.getDatasetTypes() == null)
		record.setDatasetTypes(new ChartTypeDatasetVoCollection());
	else
		record.getDatasetTypes().clear();
	
	int order = 1;	//WDEV-12548
	
	for (int i = 0; i < form.dyngrdLinkedDataSets().getRows().size(); i++)
	{
		DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().get(i);
		
		ChartTypeDatasetVo item = new ChartTypeDatasetVo();
		item.setDatasetType((DataSetTypeVo)row.getValue());
		
		if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)).getValue().equals(LineTypeStatus.CUSTOM))
		{
			item.setLineType((LineType) row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_LINETYPE)).getValue());
			item.setLineColourPointIcon((LineColourPointIcon) row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_COLOR_ICON)).getValue());
		}
		
		item.setSortOrder(Integer.valueOf(order++)); //WDEV-12548
		
		record.getDatasetTypes().add(item);
	}
	
	return record;
}
 
Example 33
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void checkIfThereAreSameIdentifier(PatientIdCollection identifiers,	DynamicGridRow parentRow, DynamicGridColumn column) 
{
	if(identifiers == null || identifiers.size() == 0 || parentRow == null)
		return;
	
	for(int j = identifiers.size() - 1; j>=0; j--)
	{
		if(identifiers.get(j) == null)
			continue;
		
		for(int i=0; i<parentRow.getRows().size(); i++)
		{
			if(parentRow.getRows().get(i).getValue().equals(identifiers.get(j).getType()))
			{
				DynamicGridCell sourceIdentifierValueCell = parentRow.getRows().get(i).getCells().get(getColumn(COL_SOURCE_PATIENT));
				
				if(sourceIdentifierValueCell != null && sourceIdentifierValueCell.getValue() != null)
				{
					String destinationIdentifierValue = formatIdentifierValue(identifiers.get(j).getValue());
					
					if(sourceIdentifierValueCell.getValue().equals(destinationIdentifierValue))
					{
						DynamicGridCell cellNew = parentRow.getRows().get(i).getCells().newCell(column, DynamicCellType.STRING);
						cellNew.setValue(getColumn(COL_RESULT_DATA).equals(column) ? destinationIdentifierValue : identifiers.get(j).getValue());
						cellNew.setReadOnly(true);
					
						identifiers.remove(j);
						break;
					}
				}
			}
		}
	}
}
 
Example 34
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onDyngrdWhiteBoardRowSelectionChanged(DynamicGridRow row) throws PresentationLogicException
{
	System.out.println("Row Selection");
	setGlobalContexts((TrackingForClinicianWorklistAndTriageVo)form.dyngrdWhiteBoard().getValue());
	engine.open(form.getForms().Emergency.EDWhiteBoardEditDialog, new Object[] {form.cmbArea().getValue(),form.cmbStatus().getValue()});
}
 
Example 35
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void refreshRecord(SpecimenWorkListItemListVo specimenWorkListItemList)
{
	if(specimenWorkListItemList != null && specimenWorkListItemList.getCollectionStatus().equals(SpecimenCollectionStatus.MOVEDTOPHLEBOTOMY))
	{
		DynamicGridRow row = form.dyngrdCollect().getSelectedRow();
		if(row != null)
		{
			//WDEV-2990 - clear existing cell and then set the value to the selected row 
			clearVariableCells(row);
			removeCommonCells(row);
			displayCommonCells(specimenWorkListItemList, row);
			row.setValue(specimenWorkListItemList);
		}
	}
}
 
Example 36
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private DynamicGridCell getStatusCell(DynamicGridRow row)
{
	DynamicGridCell cycleNumberCell = row.getCells().get(getColumnByIdentifier(CYCLE_ACTIVE));
	if (cycleNumberCell == null)
		cycleNumberCell = row.getCells().newCell(getColumnByIdentifier(CYCLE_ACTIVE), DynamicCellType.STRING);
	return cycleNumberCell;
}
 
Example 37
Project: AvoinApotti   File: UserAssessmentInstHelper.java   View source code 5 votes vote down vote up
private DynamicGridRow getRowByIdentifier(Patient_GraphicAssessmentFindingQuestionAnswerVo graphicFindingQuestionAnswer)
{
	if(graphicFindingQuestionAnswer == null)
		return null;

	for(int x = 0; x < this.grid.getRows().size(); x++)
	{	
		Patient_GraphicAssessmentFindingQuestionAnswerVo findingAnswer = (Patient_GraphicAssessmentFindingQuestionAnswerVo)(this.grid.getRows().get(x).getCells().get(this.grid.getColumns().getByIdentifier(QUESTION_COLUMN)).getIdentifier());
		if(graphicFindingQuestionAnswer.equals(findingAnswer))
			return this.grid.getRows().get(x);
	}
	
	return null;
}
 
Example 38
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
@Override
protected void onDyngrdCCOCyclesDaysRowSelectionChanged(DynamicGridRow row) throws PresentationLogicException
{
	populateCCOCycleControls(row.getValue());
	form.getLocalContext().setSelectedCCOChemoCycleDetails((ChemoCycleDetailsCCOVo) row.getValue());
	updateContextMenuState();
}
 
Example 39
Project: AvoinApotti   File: Logic.java   View source code 5 votes vote down vote up
private void ListPrioritiesCounts(ILocation currentLocation,TrackingAreaVoCollection areas, String priority, TriagePriority lookup_inst_id)
{
	DynamicGridRow row = form.dyngrdAreas().getRows().newRow();
	DynamicGridCell cell = row.getCells().newCell(form.dyngrdAreas().getColumns().getByIdentifier(COL_STATUS), DynamicCellType.STRING);
	cell.setWidth(150);
	cell.setValue(priority);
	cell.setBackColor(Color.fromRGB(198, 223, 242));
	
	int overall_sum=0;
	for(int i=0;i< areas.size();i++)
	{
		cell = row.getCells().newCell(form.dyngrdAreas().getColumns().getByIdentifier(COL_AREA+areas.get(i).getID_TrackingArea()), DynamicCellType.STRING);
		cell.setWidth(150);
		String val=domain.getPriorityXCounts(currentLocation, areas.get(i),lookup_inst_id);
		if(val!=null)
		{
			if(!val.equals("0")&& !val.equals(""))
			{
				cell.setValue(val);
				overall_sum=overall_sum+Integer.valueOf(val).intValue();					
			}	
			else
			{
				cell.setValue("-");
			}
		}
		else
		{
			cell.setValue("-");
		}
	}
			
	cell = row.getCells().newCell(form.dyngrdAreas().getColumns().getByIdentifier(COL_OVERALL), DynamicCellType.HTMLVIEW);
	cell.setWidth(90);
	cell.setValue("<b>"+(overall_sum>0?String.valueOf(overall_sum):"-")+"<b>");
	cell.setBackColor(Color.Bisque);
}
 
Example 40
Project: AvoinApotti   File: UserAssessmentInstHelper.java   View source code 5 votes vote down vote up
private DynamicGridRow getRowsByIdentifier(Patient_GraphicAssessmentQuestionAnswerVo voPatientGAQAnswer)
{
	for(int x = 0; x < this.grid.getRows().size(); x++)
	{	
		Patient_GraphicAssessmentQuestionAnswerVo questionAnswer = (Patient_GraphicAssessmentQuestionAnswerVo)(this.grid.getRows().get(x).getCells().get(this.grid.getColumns().getByIdentifier(QUESTION_COLUMN)).getIdentifier());
		if(voPatientGAQAnswer.equals(questionAnswer))
			return this.grid.getRows().get(x);
	}
	
	return null;
}