Java Code Examples for ims.oncology.vo.ChemoCycleDetailsCCOVo

The following are top voted examples for showing how to use ims.oncology.vo.ChemoCycleDetailsCCOVo. 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   Source Code and License 5 votes vote down vote up
private void editCCOCycle() 
{
	form.getLocalContext().setSelectedCCOChemoCycleDetails((ChemoCycleDetailsCCOVo) form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue());
	clearCCOControls();
	populateCCOCycleControls((ChemoCycleDetailsCCOVo) form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue());
	enableDisableCCOControls(FormMode.EDIT);
	showHideSaveAndCancelButtons(FormMode.VIEW);//This will hide the controls while the Cycle details are entered.
	form.getLocalContext().setAddEditMode(Boolean.TRUE);			//wdev-12416
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addCCOCycle() 
{
	form.getLocalContext().setSelectedCCOChemoCycleDetails(new ChemoCycleDetailsCCOVo());
	clearCCOControls();
	enableDisableCCOControls(FormMode.EDIT);
	showHideSaveAndCancelButtons(FormMode.VIEW);//This will hide the controls while the Cycle details are entered.

	if (form.grdChemotherapy().getSelectedRow() == null 
		&& form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().size() == 0
		&& form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null)
		initializeCCODynamicGrid(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue());
	
	/*ChemoRegimensConfigVo voConfig = domain.getChemoRegimeConfig(form.lyrDetails().tabDetails().cmbRegimeAcronym().getValue());
	if (voConfig != null)
	{
		DynamicGridRow row = form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().newRow();
		form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().setSelectedRow(row);
		
		DynamicGridCell treatPCODECell = row.getCells().newCell(getCol(TREAT_PCODE), DynamicCellType.STRING);	
		treatPCODECell.setValue(voConfig.getProcurementCodeIsNotNull() ? voConfig.getProcurementCode().getText() : "");								

		DynamicGridCell treatDCODECell = row.getCells().newCell(getCol(TREAT_DCODE), DynamicCellType.STRING);	
		treatDCODECell.setValue(voConfig.getDayOneDeliveryCodeIsNotNull() ? voConfig.getDayOneDeliveryCode().getText() : "");
		
		if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
			treatDCODECell.setValue(voConfig.getDeliveryCodeAllOtherDaysIsNotNull() ? voConfig.getDeliveryCodeAllOtherDays().getText() : "");
	}*/
		
	form.lyrDetails().tabCycleAndDrugCCO().Group1().setValue(Group1Enumeration.rdoActive);
	form.getLocalContext().setAddEditMode(Boolean.FALSE);			//wdev-12416
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 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 4
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private ChemoCycleDetailsCCOVo populateCCOChemotherapyVo(ChemoCycleDetailsCCOVo voCCOCycle)				//wdev-12416
{
	//ChemoCycleDetailsCCOVo voCCOCycle = (ChemoCycleDetailsCCOVo) form.getLocalContext().getSelectedCCOChemoCycleDetails().clone();
	if(voCCOCycle == null)		//wdev-12416
		return null;

	voCCOCycle.setTreatmentType(form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().getValue());
	voCCOCycle.setCycleStartDate(form.lyrDetails().tabCycleAndDrugCCO().dteTreatmentDate().getValue());
	if (form.getGlobalContext().Oncology.getChosenCCOOPAppointmentIsNotNull())
		voCCOCycle.setDiaryEntry(form.getGlobalContext().Oncology.getChosenCCOOPAppointment());
	
	voCCOCycle.setCycleNumber(form.lyrDetails().tabCycleAndDrugCCO().intCycle().getValue());
	voCCOCycle.setDayNumber(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue());
	voCCOCycle.setCycleDuration(form.lyrDetails().tabCycleAndDrugCCO().intDuration().getValue());
	voCCOCycle.setIsActive(form.lyrDetails().tabCycleAndDrugCCO().Group1().getValue().equals(Group1Enumeration.rdoActive) ? true : false);
	voCCOCycle.setWeight(form.lyrDetails().tabCycleAndDrugCCO().intWeightStartCycle().getValue()); //wdev-12819
	voCCOCycle.setPerformanceStatus(form.lyrDetails().tabCycleAndDrugCCO().cmbPerformanceStatusAtSTartCycle().getValue()); //wdev-12819

	if (form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().getValue() != null
		&& form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().getValue().equals(ChemoCycleTreatmentType.OUTPATIENT)
		&& form.getGlobalContext().Oncology.getChosenCCOOPAppointmentIsNotNull())
		voCCOCycle.setDiaryEntry(form.getGlobalContext().Oncology.getChosenCCOOPAppointment());
	
	if (form.lyrDetails().tabDetails().cmbRegimeAcronym() != null)
	{
		ChemoRegimensConfigVo voConfig = domain.getChemoRegimeConfig(form.lyrDetails().tabDetails().cmbRegimeAcronym().getValue());
		if (voConfig != null)
		{
			voCCOCycle.setRegimen(voConfig.getRegimen());
			voCCOCycle.setProcurementCode(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != null &&  form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() == 1 ?voConfig.getProcurementCode() : null);
			voCCOCycle.setDayOneDeliveryCode(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != null &&  form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() == 1 ? voConfig.getDayOneDeliveryCode() : null);
			voCCOCycle.setDeliveryCodeAllOtherDays(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != null && form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != 1 ? voConfig.getDeliveryCodeAllOtherDays() : null);
			
			//if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
			if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null && form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue().equals(DrugTherapyType.HIGHCOSTDRUG))  //wdev-13106	
			{
				voCCOCycle.setDayOneDeliveryCode(null);
				voCCOCycle.setDeliveryCodeAllOtherDays(voConfig.getDeliveryCodeAllOtherDays());
				voCCOCycle.setProcurementCode(voConfig.getProcurementCode());
			}
		}
	}
	
	return voCCOCycle;
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void upDateRegimenCodes()
{
	ChemoCycleDetailsCCOVoCollection voCycleCollectionVo = form.getLocalContext().getCurrentValueCollectionCycleDetailsTabGrid();
	if( voCycleCollectionVo == null)
		return;
	if (form.lyrDetails().tabDetails().cmbRegimeAcronym() != null)
	{
		for(int i = 0;i < voCycleCollectionVo.size();i++ )
		{
			ChemoRegimensConfigVo voConfig = domain.getChemoRegimeConfig(form.lyrDetails().tabDetails().cmbRegimeAcronym().getValue());
			ChemoCycleDetailsCCOVo voCCOCycle = voCycleCollectionVo.get(i);
			if(voCCOCycle == null)
				continue;
			if (voConfig != null)
			{
				
				voCCOCycle.setProcurementCode(null);
				voCCOCycle.setDayOneDeliveryCode(null);
				voCCOCycle.setDeliveryCodeAllOtherDays(null);
				
				
				voCCOCycle.setRegimen(voConfig.getRegimen());
				voCCOCycle.setProcurementCode(voCCOCycle.getDayNumber() != null &&  voCCOCycle.getDayNumber() == 1 ? voConfig.getProcurementCode() : null);
				voCCOCycle.setDayOneDeliveryCode(voCCOCycle.getDayNumber() != null &&  voCCOCycle.getDayNumber() == 1 ? voConfig.getDayOneDeliveryCode() : null);
				voCCOCycle.setDeliveryCodeAllOtherDays(voCCOCycle.getDayNumber() != null && voCCOCycle.getDayNumber() != 1 ? voConfig.getDeliveryCodeAllOtherDays() : null);
				
				//if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
				if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null && form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue().equals(DrugTherapyType.HIGHCOSTDRUG))  	
				{
					voCCOCycle.setDayOneDeliveryCode(null);
					voCCOCycle.setDeliveryCodeAllOtherDays(voConfig.getDeliveryCodeAllOtherDays());
					voCCOCycle.setProcurementCode(voConfig.getProcurementCode());
				}
			}
		}
	}

}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onlyrDetailsTabChanged(LayerBridge tab) 
{
	if(form.lyrDetails().tabCycleAndDrugCCO().isVisible())
	{
		//if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null)
	//	{
			initializeCCODynamicGrid(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue());
			showHideDayDurationControls(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue());
			if(form.lyrDetails().tabCycleAndDrugCCO().btnSaveCycle().isVisible())		//wdev-13106
				enableDisableCCOControls(FormMode.EDIT);
			else
				enableDisableCCOControls(FormMode.VIEW);
			//wdev-12393
			ChemoCycleDetailsCCOVo voCycle = (ChemoCycleDetailsCCOVo) form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue(); //wdev-12819
			form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().clear();
			
			ChemoCycleDetailsCCOVoCollection voCycleCollectionVo = form.getLocalContext().getCurrentValueCollectionCycleDetailsTabGrid();
			if(voCycleCollectionVo !=  null)
				voCycleCollectionVo.sort(SortOrder.ASCENDING);
			for (int j = 0; voCycleCollectionVo != null && j < voCycleCollectionVo.size(); j++)
			{
				addCCOChemotherapyCyleDetailsRow(voCycleCollectionVo.get(j), form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue(), form.lyrDetails().tabCycleAndDrugCCO().GroupStatus().getValue().equals(GroupStatusEnumeration.rdoActiveFilter));
			}
			if(voCycle != null && voCycleCollectionVo.contains(voCycle))	//wdev-12819
				form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().setValue(voCycle);
			
			updateContextMenuState();
			//---------------
	//	}
		if(!form.lyrDetails().tabCycleAndDrugCCO().btnSaveCycle().isVisible() && form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue() == null)		//wdev-12819
			clearCCOControls();
	}
	
}
 
Example 7
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void editCCOCycle() 
{
	form.getLocalContext().setSelectedCCOChemoCycleDetails((ChemoCycleDetailsCCOVo) form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue());
	clearCCOControls();
	populateCCOCycleControls((ChemoCycleDetailsCCOVo) form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue());
	enableDisableCCOControls(FormMode.EDIT);
	showHideSaveAndCancelButtons(FormMode.VIEW);//This will hide the controls while the Cycle details are entered.
	form.getLocalContext().setAddEditMode(Boolean.TRUE);			//wdev-12416
}
 
Example 8
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addCCOCycle() 
{
	form.getLocalContext().setSelectedCCOChemoCycleDetails(new ChemoCycleDetailsCCOVo());
	clearCCOControls();
	enableDisableCCOControls(FormMode.EDIT);
	showHideSaveAndCancelButtons(FormMode.VIEW);//This will hide the controls while the Cycle details are entered.

	if (form.grdChemotherapy().getSelectedRow() == null 
		&& form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().size() == 0
		&& form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null)
		initializeCCODynamicGrid(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue());
	
	/*ChemoRegimensConfigVo voConfig = domain.getChemoRegimeConfig(form.lyrDetails().tabDetails().cmbRegimeAcronym().getValue());
	if (voConfig != null)
	{
		DynamicGridRow row = form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().newRow();
		form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().setSelectedRow(row);
		
		DynamicGridCell treatPCODECell = row.getCells().newCell(getCol(TREAT_PCODE), DynamicCellType.STRING);	
		treatPCODECell.setValue(voConfig.getProcurementCodeIsNotNull() ? voConfig.getProcurementCode().getText() : "");								

		DynamicGridCell treatDCODECell = row.getCells().newCell(getCol(TREAT_DCODE), DynamicCellType.STRING);	
		treatDCODECell.setValue(voConfig.getDayOneDeliveryCodeIsNotNull() ? voConfig.getDayOneDeliveryCode().getText() : "");
		
		if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
			treatDCODECell.setValue(voConfig.getDeliveryCodeAllOtherDaysIsNotNull() ? voConfig.getDeliveryCodeAllOtherDays().getText() : "");
	}*/
		
	form.lyrDetails().tabCycleAndDrugCCO().Group1().setValue(Group1Enumeration.rdoActive);
	form.getLocalContext().setAddEditMode(Boolean.FALSE);			//wdev-12416
}
 
Example 9
Project: openMAXIMS   File: Logic.java   Source Code and License 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 10
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void upDateRegimenCodes()
{
	ChemoCycleDetailsCCOVoCollection voCycleCollectionVo = form.getLocalContext().getCurrentValueCollectionCycleDetailsTabGrid();
	if( voCycleCollectionVo == null)
		return;
	if (form.lyrDetails().tabDetails().cmbRegimeAcronym() != null)
	{
		for(int i = 0;i < voCycleCollectionVo.size();i++ )
		{
			ChemoRegimensConfigVo voConfig = domain.getChemoRegimeConfig(form.lyrDetails().tabDetails().cmbRegimeAcronym().getValue());
			ChemoCycleDetailsCCOVo voCCOCycle = voCycleCollectionVo.get(i);
			if(voCCOCycle == null)
				continue;
			if (voConfig != null)
			{
				
				voCCOCycle.setProcurementCode(null);
				voCCOCycle.setDayOneDeliveryCode(null);
				voCCOCycle.setDeliveryCodeAllOtherDays(null);
				
				
				voCCOCycle.setRegimen(voConfig.getRegimen());
				voCCOCycle.setProcurementCode(voCCOCycle.getDayNumber() != null &&  voCCOCycle.getDayNumber() == 1 ? voConfig.getProcurementCode() : null);
				voCCOCycle.setDayOneDeliveryCode(voCCOCycle.getDayNumber() != null &&  voCCOCycle.getDayNumber() == 1 ? voConfig.getDayOneDeliveryCode() : null);
				voCCOCycle.setDeliveryCodeAllOtherDays(voCCOCycle.getDayNumber() != null && voCCOCycle.getDayNumber() != 1 ? voConfig.getDeliveryCodeAllOtherDays() : null);
				
				//if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
				if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null && form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue().equals(DrugTherapyType.HIGHCOSTDRUG))  	
				{
					voCCOCycle.setDayOneDeliveryCode(null);
					voCCOCycle.setDeliveryCodeAllOtherDays(voConfig.getDeliveryCodeAllOtherDays());
					voCCOCycle.setProcurementCode(voConfig.getProcurementCode());
				}
			}
		}
	}

}
 
Example 11
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onlyrDetailsTabChanged(LayerBridge tab) 
{
	if(form.lyrDetails().tabCycleAndDrugCCO().isVisible())
	{
		//if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null)
	//	{
			initializeCCODynamicGrid(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue());
			showHideDayDurationControls(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue());
			if(form.lyrDetails().tabCycleAndDrugCCO().btnSaveCycle().isVisible())		//wdev-13106
				enableDisableCCOControls(FormMode.EDIT);
			else
				enableDisableCCOControls(FormMode.VIEW);
			//wdev-12393
			ChemoCycleDetailsCCOVo voCycle = (ChemoCycleDetailsCCOVo) form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue(); //wdev-12819
			form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().clear();
			
			ChemoCycleDetailsCCOVoCollection voCycleCollectionVo = form.getLocalContext().getCurrentValueCollectionCycleDetailsTabGrid();
			if(voCycleCollectionVo !=  null)
				voCycleCollectionVo.sort(SortOrder.ASCENDING);
			for (int j = 0; voCycleCollectionVo != null && j < voCycleCollectionVo.size(); j++)
			{
				addCCOChemotherapyCyleDetailsRow(voCycleCollectionVo.get(j), form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue(), form.lyrDetails().tabCycleAndDrugCCO().GroupStatus().getValue().equals(GroupStatusEnumeration.rdoActiveFilter));
			}
			if(voCycle != null && voCycleCollectionVo.contains(voCycle))	//wdev-12819
				form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().setValue(voCycle);
			
			updateContextMenuState();
			//---------------
	//	}
		if(!form.lyrDetails().tabCycleAndDrugCCO().btnSaveCycle().isVisible() && form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue() == null)		//wdev-12819
			clearCCOControls();
	}
	
}
 
Example 12
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void editCCOCycle() 
{
	form.getLocalContext().setSelectedCCOChemoCycleDetails((ChemoCycleDetailsCCOVo) form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue());
	clearCCOControls();
	populateCCOCycleControls((ChemoCycleDetailsCCOVo) form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue());
	enableDisableCCOControls(FormMode.EDIT);
	showHideSaveAndCancelButtons(FormMode.VIEW);//This will hide the controls while the Cycle details are entered.
	form.getLocalContext().setAddEditMode(Boolean.TRUE);			//wdev-12416
}
 
Example 13
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addCCOCycle() 
{
	form.getLocalContext().setSelectedCCOChemoCycleDetails(new ChemoCycleDetailsCCOVo());
	clearCCOControls();
	enableDisableCCOControls(FormMode.EDIT);
	showHideSaveAndCancelButtons(FormMode.VIEW);//This will hide the controls while the Cycle details are entered.

	if (form.grdChemotherapy().getSelectedRow() == null 
		&& form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().size() == 0
		&& form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null)
		initializeCCODynamicGrid(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue());
	
	/*ChemoRegimensConfigVo voConfig = domain.getChemoRegimeConfig(form.lyrDetails().tabDetails().cmbRegimeAcronym().getValue());
	if (voConfig != null)
	{
		DynamicGridRow row = form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().newRow();
		form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().setSelectedRow(row);
		
		DynamicGridCell treatPCODECell = row.getCells().newCell(getCol(TREAT_PCODE), DynamicCellType.STRING);	
		treatPCODECell.setValue(voConfig.getProcurementCodeIsNotNull() ? voConfig.getProcurementCode().getText() : "");								

		DynamicGridCell treatDCODECell = row.getCells().newCell(getCol(TREAT_DCODE), DynamicCellType.STRING);	
		treatDCODECell.setValue(voConfig.getDayOneDeliveryCodeIsNotNull() ? voConfig.getDayOneDeliveryCode().getText() : "");
		
		if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
			treatDCODECell.setValue(voConfig.getDeliveryCodeAllOtherDaysIsNotNull() ? voConfig.getDeliveryCodeAllOtherDays().getText() : "");
	}*/
		
	form.lyrDetails().tabCycleAndDrugCCO().Group1().setValue(Group1Enumeration.rdoActive);
	form.getLocalContext().setAddEditMode(Boolean.FALSE);			//wdev-12416
}
 
Example 14
Project: openMAXIMS   File: Logic.java   Source Code and License 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 15
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void upDateRegimenCodes()
{
	ChemoCycleDetailsCCOVoCollection voCycleCollectionVo = form.getLocalContext().getCurrentValueCollectionCycleDetailsTabGrid();
	if( voCycleCollectionVo == null)
		return;
	if (form.lyrDetails().tabDetails().cmbRegimeAcronym() != null)
	{
		for(int i = 0;i < voCycleCollectionVo.size();i++ )
		{
			ChemoRegimensConfigVo voConfig = domain.getChemoRegimeConfig(form.lyrDetails().tabDetails().cmbRegimeAcronym().getValue());
			ChemoCycleDetailsCCOVo voCCOCycle = voCycleCollectionVo.get(i);
			if(voCCOCycle == null)
				continue;
			if (voConfig != null)
			{
				
				voCCOCycle.setProcurementCode(null);
				voCCOCycle.setDayOneDeliveryCode(null);
				voCCOCycle.setDeliveryCodeAllOtherDays(null);
				
				
				voCCOCycle.setRegimen(voConfig.getRegimen());
				voCCOCycle.setProcurementCode(voCCOCycle.getDayNumber() != null &&  voCCOCycle.getDayNumber() == 1 ? voConfig.getProcurementCode() : null);
				voCCOCycle.setDayOneDeliveryCode(voCCOCycle.getDayNumber() != null &&  voCCOCycle.getDayNumber() == 1 ? voConfig.getDayOneDeliveryCode() : null);
				voCCOCycle.setDeliveryCodeAllOtherDays(voCCOCycle.getDayNumber() != null && voCCOCycle.getDayNumber() != 1 ? voConfig.getDeliveryCodeAllOtherDays() : null);
				
				//if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
				if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null && form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue().equals(DrugTherapyType.HIGHCOSTDRUG))  	
				{
					voCCOCycle.setDayOneDeliveryCode(null);
					voCCOCycle.setDeliveryCodeAllOtherDays(voConfig.getDeliveryCodeAllOtherDays());
					voCCOCycle.setProcurementCode(voConfig.getProcurementCode());
				}
			}
		}
	}

}
 
Example 16
Project: openMAXIMS   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onlyrDetailsTabChanged(LayerBridge tab) 
{
	if(form.lyrDetails().tabCycleAndDrugCCO().isVisible())
	{
		//if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null)
	//	{
			initializeCCODynamicGrid(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue());
			showHideDayDurationControls(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue());
			if(form.lyrDetails().tabCycleAndDrugCCO().btnSaveCycle().isVisible())		//wdev-13106
				enableDisableCCOControls(FormMode.EDIT);
			else
				enableDisableCCOControls(FormMode.VIEW);
			//wdev-12393
			ChemoCycleDetailsCCOVo voCycle = (ChemoCycleDetailsCCOVo) form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue(); //wdev-12819
			form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().clear();
			
			ChemoCycleDetailsCCOVoCollection voCycleCollectionVo = form.getLocalContext().getCurrentValueCollectionCycleDetailsTabGrid();
			if(voCycleCollectionVo !=  null)
				voCycleCollectionVo.sort(SortOrder.ASCENDING);
			for (int j = 0; voCycleCollectionVo != null && j < voCycleCollectionVo.size(); j++)
			{
				addCCOChemotherapyCyleDetailsRow(voCycleCollectionVo.get(j), form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue(), form.lyrDetails().tabCycleAndDrugCCO().GroupStatus().getValue().equals(GroupStatusEnumeration.rdoActiveFilter));
			}
			if(voCycle != null && voCycleCollectionVo.contains(voCycle))	//wdev-12819
				form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().setValue(voCycle);
			
			updateContextMenuState();
			//---------------
	//	}
		if(!form.lyrDetails().tabCycleAndDrugCCO().btnSaveCycle().isVisible() && form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue() == null)		//wdev-12819
			clearCCOControls();
	}
	
}
 
Example 17
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void editCCOCycle() 
{
	form.getLocalContext().setSelectedCCOChemoCycleDetails((ChemoCycleDetailsCCOVo) form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue());
	clearCCOControls();
	populateCCOCycleControls((ChemoCycleDetailsCCOVo) form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue());
	enableDisableCCOControls(FormMode.EDIT);
	showHideSaveAndCancelButtons(FormMode.VIEW);//This will hide the controls while the Cycle details are entered.
	form.getLocalContext().setAddEditMode(Boolean.TRUE);			//wdev-12416
}
 
Example 18
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addCCOCycle() 
{
	form.getLocalContext().setSelectedCCOChemoCycleDetails(new ChemoCycleDetailsCCOVo());
	clearCCOControls();
	enableDisableCCOControls(FormMode.EDIT);
	showHideSaveAndCancelButtons(FormMode.VIEW);//This will hide the controls while the Cycle details are entered.

	if (form.grdChemotherapy().getSelectedRow() == null 
		&& form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().size() == 0
		&& form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null)
		initializeCCODynamicGrid(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue());
	
	/*ChemoRegimensConfigVo voConfig = domain.getChemoRegimeConfig(form.lyrDetails().tabDetails().cmbRegimeAcronym().getValue());
	if (voConfig != null)
	{
		DynamicGridRow row = form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().newRow();
		form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().setSelectedRow(row);
		
		DynamicGridCell treatPCODECell = row.getCells().newCell(getCol(TREAT_PCODE), DynamicCellType.STRING);	
		treatPCODECell.setValue(voConfig.getProcurementCodeIsNotNull() ? voConfig.getProcurementCode().getText() : "");								

		DynamicGridCell treatDCODECell = row.getCells().newCell(getCol(TREAT_DCODE), DynamicCellType.STRING);	
		treatDCODECell.setValue(voConfig.getDayOneDeliveryCodeIsNotNull() ? voConfig.getDayOneDeliveryCode().getText() : "");
		
		if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
			treatDCODECell.setValue(voConfig.getDeliveryCodeAllOtherDaysIsNotNull() ? voConfig.getDeliveryCodeAllOtherDays().getText() : "");
	}*/
		
	form.lyrDetails().tabCycleAndDrugCCO().Group1().setValue(Group1Enumeration.rdoActive);
	form.getLocalContext().setAddEditMode(Boolean.FALSE);			//wdev-12416
}
 
Example 19
Project: openmaxims-linux   File: Logic.java   Source Code and License 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 20
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void upDateRegimenCodes()
{
	ChemoCycleDetailsCCOVoCollection voCycleCollectionVo = form.getLocalContext().getCurrentValueCollectionCycleDetailsTabGrid();
	if( voCycleCollectionVo == null)
		return;
	if (form.lyrDetails().tabDetails().cmbRegimeAcronym() != null)
	{
		for(int i = 0;i < voCycleCollectionVo.size();i++ )
		{
			ChemoRegimensConfigVo voConfig = domain.getChemoRegimeConfig(form.lyrDetails().tabDetails().cmbRegimeAcronym().getValue());
			ChemoCycleDetailsCCOVo voCCOCycle = voCycleCollectionVo.get(i);
			if(voCCOCycle == null)
				continue;
			if (voConfig != null)
			{
				
				voCCOCycle.setProcurementCode(null);
				voCCOCycle.setDayOneDeliveryCode(null);
				voCCOCycle.setDeliveryCodeAllOtherDays(null);
				
				
				voCCOCycle.setRegimen(voConfig.getRegimen());
				voCCOCycle.setProcurementCode(voCCOCycle.getDayNumber() != null &&  voCCOCycle.getDayNumber() == 1 ? voConfig.getProcurementCode() : null);
				voCCOCycle.setDayOneDeliveryCode(voCCOCycle.getDayNumber() != null &&  voCCOCycle.getDayNumber() == 1 ? voConfig.getDayOneDeliveryCode() : null);
				voCCOCycle.setDeliveryCodeAllOtherDays(voCCOCycle.getDayNumber() != null && voCCOCycle.getDayNumber() != 1 ? voConfig.getDeliveryCodeAllOtherDays() : null);
				
				//if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
				if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null && form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue().equals(DrugTherapyType.HIGHCOSTDRUG))  	
				{
					voCCOCycle.setDayOneDeliveryCode(null);
					voCCOCycle.setDeliveryCodeAllOtherDays(voConfig.getDeliveryCodeAllOtherDays());
					voCCOCycle.setProcurementCode(voConfig.getProcurementCode());
				}
			}
		}
	}

}
 
Example 21
Project: openmaxims-linux   File: Logic.java   Source Code and License 5 votes vote down vote up
protected void onlyrDetailsTabChanged(LayerBridge tab) 
{
	if(form.lyrDetails().tabCycleAndDrugCCO().isVisible())
	{
		//if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null)
	//	{
			initializeCCODynamicGrid(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue());
			showHideDayDurationControls(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue());
			if(form.lyrDetails().tabCycleAndDrugCCO().btnSaveCycle().isVisible())		//wdev-13106
				enableDisableCCOControls(FormMode.EDIT);
			else
				enableDisableCCOControls(FormMode.VIEW);
			//wdev-12393
			ChemoCycleDetailsCCOVo voCycle = (ChemoCycleDetailsCCOVo) form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue(); //wdev-12819
			form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().clear();
			
			ChemoCycleDetailsCCOVoCollection voCycleCollectionVo = form.getLocalContext().getCurrentValueCollectionCycleDetailsTabGrid();
			if(voCycleCollectionVo !=  null)
				voCycleCollectionVo.sort(SortOrder.ASCENDING);
			for (int j = 0; voCycleCollectionVo != null && j < voCycleCollectionVo.size(); j++)
			{
				addCCOChemotherapyCyleDetailsRow(voCycleCollectionVo.get(j), form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue(), form.lyrDetails().tabCycleAndDrugCCO().GroupStatus().getValue().equals(GroupStatusEnumeration.rdoActiveFilter));
			}
			if(voCycle != null && voCycleCollectionVo.contains(voCycle))	//wdev-12819
				form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().setValue(voCycle);
			
			updateContextMenuState();
			//---------------
	//	}
		if(!form.lyrDetails().tabCycleAndDrugCCO().btnSaveCycle().isVisible() && form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue() == null)		//wdev-12819
			clearCCOControls();
	}
	
}
 
Example 22
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void updateContextMenuState()
{
	// Chemotherapy context menu
	form.getContextMenus().getGenericGridAddItem().setVisible(FormMode.VIEW.equals(form.getMode()));
	form.getContextMenus().getGenericGridUpdateItem().setVisible(FormMode.VIEW.equals(form.getMode()) && form.grdChemotherapy().getValue() != null); // Use grid.getValue() as the selected row
									
	if (ConfigFlag.UI.USE_GENERIC_CHEMOTHERAPY_CYCLE_AND_DRUG_DETAILS.getValue())
	{
		// must also have a value, not just be selected
		// Cycle details context menu
		form.getContextMenus().getChemotherapyCycleAddCycleItem().setVisible(FormMode.EDIT.equals(form.getMode()));
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setText("Edit Day");		//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setText("Add Day");
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo );	//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo);	//wdev-12819
		form.getContextMenus().getChemotherapyCycleViewDayItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
	
	}
	else
	{
		//wdev-12819
		// must also have a value, not just be selected
		// Cycle details context menu
		form.getContextMenus().getChemotherapyCycleAddCycleItem().setVisible(FormMode.EDIT.equals(form.getMode()));
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setText("Edit Day");		//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setText("Add Day");
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo );	//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo);	//wdev-12819
		form.getContextMenus().getChemotherapyCycleViewDayItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
		//-----------
		
		//if (form.getLocalContext().getChemotherapyDetailsVo() != null
		//	&& form.getLocalContext().getChemotherapyDetailsVo().getID_ChemotherapyDetailsIsNotNull())
		//{
			// CCO Cycle details context menu
			form.getContextMenus().Oncology.getCCOChemoCycleMenuCCO_ADD_CYCLEItem().setVisible(FormMode.EDIT.equals(form.getMode()));
			form.getContextMenus().Oncology.getCCOChemoCycleMenuCCO_EDIT_CYCLEItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue() instanceof ChemoCycleDetailsCCOVo);
		//}
	}
}
 
Example 23
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void addCCOChemotherapyCyleDetailsRow(ChemoCycleDetailsCCOVo voChemoCycleDetails, DrugTherapyType type, boolean bActiveOnly)
{
	if (voChemoCycleDetails == null)
		return;

	if (voChemoCycleDetails.getIsActiveIsNotNull()
		&& ! voChemoCycleDetails.getIsActive()
		&& bActiveOnly)
		return;
	
	DynamicGridRow row = null;
	if (form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getSelectedRow() != null)
		row = form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getSelectedRow();
	else
		row = form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().newRow();

	String strOPTooltip = "";
	if (voChemoCycleDetails.getTreatmentType()!= null && voChemoCycleDetails.getTreatmentType().equals(ChemoCycleTreatmentType.OUTPATIENT))  //wdev-12819
		strOPTooltip = createChosenOPAppointmentString(voChemoCycleDetails.getDiaryEntry(), voChemoCycleDetails.getID_ChemoCycleDetailsCCOIsNotNull() ? true : false);
	
	DynamicGridCell treatTypeCell = row.getCells().newCell(getCol(TREAT_TYPE), DynamicCellType.LABEL);	
	treatTypeCell.setValue(voChemoCycleDetails.getTreatmentTypeIsNotNull() ? voChemoCycleDetails.getTreatmentType().getText() : "");								
	treatTypeCell.setTooltip(strOPTooltip);
	
	DynamicGridCell treatDateCell = row.getCells().newCell(getCol(TREAT_DATE), DynamicCellType.LABEL);	
	treatDateCell.setValue(voChemoCycleDetails.getCycleStartDateIsNotNull() ? voChemoCycleDetails.getCycleStartDate().toString() : "");								
	treatDateCell.setTooltip(strOPTooltip);

	if (type != null && type.equals(DrugTherapyType.HIGHCOSTDRUG))
	{
		DynamicGridCell durationCell = row.getCells().newCell(getCol(TREAT_DURATION), DynamicCellType.LABEL);	
		durationCell.setValue(voChemoCycleDetails.getCycleDurationIsNotNull() ? voChemoCycleDetails.getCycleDuration().toString() : "");								
		durationCell.setTooltip(strOPTooltip);
	}
	
	DynamicGridCell treatCycleCell = row.getCells().newCell(getCol(TREAT_CYCLE), DynamicCellType.LABEL);	
	treatCycleCell.setValue(voChemoCycleDetails.getCycleNumberIsNotNull() ? voChemoCycleDetails.getCycleNumber().toString() : "");								
	treatCycleCell.setTooltip(strOPTooltip);

	if (type == null || ! type.equals(DrugTherapyType.HIGHCOSTDRUG))			//wdev-12416
	{
		DynamicGridCell treatDayCell = row.getCells().newCell(getCol(TREAT_DAY), DynamicCellType.LABEL);	
		treatDayCell.setValue(voChemoCycleDetails.getDayNumberIsNotNull() ? voChemoCycleDetails.getDayNumber().toString() : "");								
		treatDayCell.setTooltip(strOPTooltip);
	}

	

	DynamicGridCell treatPCODECell = row.getCells().newCell(getCol(TREAT_PCODE), DynamicCellType.LABEL);	
	treatPCODECell.setValue(voChemoCycleDetails.getProcurementCodeIsNotNull() ? voChemoCycleDetails.getProcurementCode().getText() : "");
	treatPCODECell.setTooltip(strOPTooltip);
	
	DynamicGridCell treatDCODECell = row.getCells().newCell(getCol(TREAT_DCODE), DynamicCellType.LABEL);	
	treatDCODECell.setValue(voChemoCycleDetails.getDayOneDeliveryCodeIsNotNull() ? voChemoCycleDetails.getDayOneDeliveryCode().getText() : (voChemoCycleDetails.getDeliveryCodeAllOtherDaysIsNotNull() ? voChemoCycleDetails.getDeliveryCodeAllOtherDays().getText() : "" ));
	if (type != null && type.equals(DrugTherapyType.HIGHCOSTDRUG))
		treatDCODECell.setValue(voChemoCycleDetails.getDeliveryCodeAllOtherDaysIsNotNull() ? voChemoCycleDetails.getDeliveryCodeAllOtherDays().getText() : "");
	
	treatDCODECell.setTooltip(strOPTooltip);

	DynamicGridCell treatSTATUSCell = row.getCells().newCell(getCol(TREAT_STATUS), DynamicCellType.LABEL);	
	treatSTATUSCell.setValue(voChemoCycleDetails.getIsActiveIsNotNull() ? (voChemoCycleDetails.getIsActive() ? "Active" : "Inactive" ) : "");								

	row.setValue(voChemoCycleDetails);
}
 
Example 24
Project: AvoinApotti   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateCCOCycleControls(Object value) 
{
	clearCCOControls();
	if (value instanceof ChemoCycleDetailsCCOVo)
	{
		ChemoCycleDetailsCCOVo voChemoCycleDetails = (ChemoCycleDetailsCCOVo)value;

		form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getTreatmentType():null);	//wdev-13106
		form.lyrDetails().tabCycleAndDrugCCO().dteTreatmentDate().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getCycleStartDate():null);	//wdev-13106
		form.lyrDetails().tabCycleAndDrugCCO().intCycle().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getCycleNumber():null);			//wdev-13106	
		//wdev-12819
		form.lyrDetails().tabCycleAndDrugCCO().intWeightStartCycle().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getWeight():null);		//wdev-13106	
		form.lyrDetails().tabCycleAndDrugCCO().cmbPerformanceStatusAtSTartCycle().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getPerformanceStatus():null);	//wdev-13106
		//----------
		
		//if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
		if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null && form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue().equals(DrugTherapyType.HIGHCOSTDRUG))  //wdev-12393
		{
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getCycleDuration():null);	//wdev-13106	
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setVisible(Boolean.TRUE);
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setVisible(Boolean.FALSE);
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setValue(null);
		}
		else
		{
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getDayNumber():null);			//wdev-13106
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setVisible(Boolean.FALSE);
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setVisible(Boolean.TRUE);
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setValue(null);
		}
		
		form.lyrDetails().tabCycleAndDrugCCO().Group1().setValue(voChemoCycleDetails != null && voChemoCycleDetails.getIsActiveIsNotNull() ? (voChemoCycleDetails.getIsActive() ? Group1Enumeration.rdoActive : Group1Enumeration.rdoInactive) : Group1Enumeration.None); //wdev-13106

		form.lyrDetails().tabCycleAndDrugCCO().lblOPAppt().setVisible(false);
		form.lyrDetails().tabCycleAndDrugCCO().lblOPDetails().setVisible(false);

		if (voChemoCycleDetails != null && voChemoCycleDetails.getTreatmentTypeIsNotNull() && voChemoCycleDetails.getTreatmentType().equals(ChemoCycleTreatmentType.OUTPATIENT)) //wdev-13106 
		{
			form.lyrDetails().tabCycleAndDrugCCO().lblOPAppt().setVisible(true);
			form.lyrDetails().tabCycleAndDrugCCO().lblOPDetails().setVisible(true);
			form.lyrDetails().tabCycleAndDrugCCO().lblOPDetails().setValue(createChosenOPAppointmentString(voChemoCycleDetails.getDiaryEntry(),voChemoCycleDetails.getID_ChemoCycleDetailsCCOIsNotNull() ? true : false));
		}
	}
}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void updateContextMenuState()
{
	// Chemotherapy context menu
	form.getContextMenus().getGenericGridAddItem().setVisible(FormMode.VIEW.equals(form.getMode()));
	form.getContextMenus().getGenericGridUpdateItem().setVisible(FormMode.VIEW.equals(form.getMode()) && form.grdChemotherapy().getValue() != null); // Use grid.getValue() as the selected row
									
	if (ConfigFlag.UI.USE_GENERIC_CHEMOTHERAPY_CYCLE_AND_DRUG_DETAILS.getValue())
	{
		// must also have a value, not just be selected
		// Cycle details context menu
		form.getContextMenus().getChemotherapyCycleAddCycleItem().setVisible(FormMode.EDIT.equals(form.getMode()));
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setText("Edit Day");		//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setText("Add Day");
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo );	//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo);	//wdev-12819
		form.getContextMenus().getChemotherapyCycleViewDayItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
	
	}
	else
	{
		//wdev-12819
		// must also have a value, not just be selected
		// Cycle details context menu
		form.getContextMenus().getChemotherapyCycleAddCycleItem().setVisible(FormMode.EDIT.equals(form.getMode()));
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setText("Edit Day");		//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setText("Add Day");
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo );	//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo);	//wdev-12819
		form.getContextMenus().getChemotherapyCycleViewDayItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
		//-----------
		
		//if (form.getLocalContext().getChemotherapyDetailsVo() != null
		//	&& form.getLocalContext().getChemotherapyDetailsVo().getID_ChemotherapyDetailsIsNotNull())
		//{
			// CCO Cycle details context menu
			form.getContextMenus().Oncology.getCCOChemoCycleMenuCCO_ADD_CYCLEItem().setVisible(FormMode.EDIT.equals(form.getMode()));
			form.getContextMenus().Oncology.getCCOChemoCycleMenuCCO_EDIT_CYCLEItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue() instanceof ChemoCycleDetailsCCOVo);
		//}
	}
}
 
Example 26
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void addCCOChemotherapyCyleDetailsRow(ChemoCycleDetailsCCOVo voChemoCycleDetails, DrugTherapyType type, boolean bActiveOnly)
{
	if (voChemoCycleDetails == null)
		return;

	if (voChemoCycleDetails.getIsActiveIsNotNull()
		&& ! voChemoCycleDetails.getIsActive()
		&& bActiveOnly)
		return;
	
	DynamicGridRow row = null;
	if (form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getSelectedRow() != null)
		row = form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getSelectedRow();
	else
		row = form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().newRow();

	String strOPTooltip = "";
	if (voChemoCycleDetails.getTreatmentType()!= null && voChemoCycleDetails.getTreatmentType().equals(ChemoCycleTreatmentType.OUTPATIENT))  //wdev-12819
		strOPTooltip = createChosenOPAppointmentString(voChemoCycleDetails.getDiaryEntry(), voChemoCycleDetails.getID_ChemoCycleDetailsCCOIsNotNull() ? true : false);
	
	DynamicGridCell treatTypeCell = row.getCells().newCell(getCol(TREAT_TYPE), DynamicCellType.LABEL);	
	treatTypeCell.setValue(voChemoCycleDetails.getTreatmentTypeIsNotNull() ? voChemoCycleDetails.getTreatmentType().getText() : "");								
	treatTypeCell.setTooltip(strOPTooltip);
	
	DynamicGridCell treatDateCell = row.getCells().newCell(getCol(TREAT_DATE), DynamicCellType.LABEL);	
	treatDateCell.setValue(voChemoCycleDetails.getCycleStartDateIsNotNull() ? voChemoCycleDetails.getCycleStartDate().toString() : "");								
	treatDateCell.setTooltip(strOPTooltip);

	if (type != null && type.equals(DrugTherapyType.HIGHCOSTDRUG))
	{
		DynamicGridCell durationCell = row.getCells().newCell(getCol(TREAT_DURATION), DynamicCellType.LABEL);	
		durationCell.setValue(voChemoCycleDetails.getCycleDurationIsNotNull() ? voChemoCycleDetails.getCycleDuration().toString() : "");								
		durationCell.setTooltip(strOPTooltip);
	}
	
	DynamicGridCell treatCycleCell = row.getCells().newCell(getCol(TREAT_CYCLE), DynamicCellType.LABEL);	
	treatCycleCell.setValue(voChemoCycleDetails.getCycleNumberIsNotNull() ? voChemoCycleDetails.getCycleNumber().toString() : "");								
	treatCycleCell.setTooltip(strOPTooltip);

	if (type == null || ! type.equals(DrugTherapyType.HIGHCOSTDRUG))			//wdev-12416
	{
		DynamicGridCell treatDayCell = row.getCells().newCell(getCol(TREAT_DAY), DynamicCellType.LABEL);	
		treatDayCell.setValue(voChemoCycleDetails.getDayNumberIsNotNull() ? voChemoCycleDetails.getDayNumber().toString() : "");								
		treatDayCell.setTooltip(strOPTooltip);
	}

	

	DynamicGridCell treatPCODECell = row.getCells().newCell(getCol(TREAT_PCODE), DynamicCellType.LABEL);	
	treatPCODECell.setValue(voChemoCycleDetails.getProcurementCodeIsNotNull() ? voChemoCycleDetails.getProcurementCode().getText() : "");
	treatPCODECell.setTooltip(strOPTooltip);
	
	DynamicGridCell treatDCODECell = row.getCells().newCell(getCol(TREAT_DCODE), DynamicCellType.LABEL);	
	treatDCODECell.setValue(voChemoCycleDetails.getDayOneDeliveryCodeIsNotNull() ? voChemoCycleDetails.getDayOneDeliveryCode().getText() : (voChemoCycleDetails.getDeliveryCodeAllOtherDaysIsNotNull() ? voChemoCycleDetails.getDeliveryCodeAllOtherDays().getText() : "" ));
	if (type != null && type.equals(DrugTherapyType.HIGHCOSTDRUG))
		treatDCODECell.setValue(voChemoCycleDetails.getDeliveryCodeAllOtherDaysIsNotNull() ? voChemoCycleDetails.getDeliveryCodeAllOtherDays().getText() : "");
	
	treatDCODECell.setTooltip(strOPTooltip);

	DynamicGridCell treatSTATUSCell = row.getCells().newCell(getCol(TREAT_STATUS), DynamicCellType.LABEL);	
	treatSTATUSCell.setValue(voChemoCycleDetails.getIsActiveIsNotNull() ? (voChemoCycleDetails.getIsActive() ? "Active" : "Inactive" ) : "");								

	row.setValue(voChemoCycleDetails);
}
 
Example 27
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateCCOCycleControls(Object value) 
{
	clearCCOControls();
	if (value instanceof ChemoCycleDetailsCCOVo)
	{
		ChemoCycleDetailsCCOVo voChemoCycleDetails = (ChemoCycleDetailsCCOVo)value;

		form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getTreatmentType():null);	//wdev-13106
		form.lyrDetails().tabCycleAndDrugCCO().dteTreatmentDate().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getCycleStartDate():null);	//wdev-13106
		form.lyrDetails().tabCycleAndDrugCCO().intCycle().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getCycleNumber():null);			//wdev-13106	
		//wdev-12819
		form.lyrDetails().tabCycleAndDrugCCO().intWeightStartCycle().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getWeight():null);		//wdev-13106	
		form.lyrDetails().tabCycleAndDrugCCO().cmbPerformanceStatusAtSTartCycle().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getPerformanceStatus():null);	//wdev-13106
		//----------
		
		//if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
		if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null && form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue().equals(DrugTherapyType.HIGHCOSTDRUG))  //wdev-12393
		{
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getCycleDuration():null);	//wdev-13106	
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setVisible(Boolean.TRUE);
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setVisible(Boolean.FALSE);
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setValue(null);
		}
		else
		{
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getDayNumber():null);			//wdev-13106
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setVisible(Boolean.FALSE);
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setVisible(Boolean.TRUE);
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setValue(null);
		}
		
		form.lyrDetails().tabCycleAndDrugCCO().Group1().setValue(voChemoCycleDetails != null && voChemoCycleDetails.getIsActiveIsNotNull() ? (voChemoCycleDetails.getIsActive() ? Group1Enumeration.rdoActive : Group1Enumeration.rdoInactive) : Group1Enumeration.None); //wdev-13106

		form.lyrDetails().tabCycleAndDrugCCO().lblOPAppt().setVisible(false);
		form.lyrDetails().tabCycleAndDrugCCO().lblOPDetails().setVisible(false);

		if (voChemoCycleDetails != null && voChemoCycleDetails.getTreatmentTypeIsNotNull() && voChemoCycleDetails.getTreatmentType().equals(ChemoCycleTreatmentType.OUTPATIENT)) //wdev-13106 
		{
			form.lyrDetails().tabCycleAndDrugCCO().lblOPAppt().setVisible(true);
			form.lyrDetails().tabCycleAndDrugCCO().lblOPDetails().setVisible(true);
			form.lyrDetails().tabCycleAndDrugCCO().lblOPDetails().setValue(createChosenOPAppointmentString(voChemoCycleDetails.getDiaryEntry(),voChemoCycleDetails.getID_ChemoCycleDetailsCCOIsNotNull() ? true : false));
		}
	}
}
 
Example 28
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private ChemoCycleDetailsCCOVo populateCCOChemotherapyVo(ChemoCycleDetailsCCOVo voCCOCycle)				//wdev-12416
{
	//ChemoCycleDetailsCCOVo voCCOCycle = (ChemoCycleDetailsCCOVo) form.getLocalContext().getSelectedCCOChemoCycleDetails().clone();
	if(voCCOCycle == null)		//wdev-12416
		return null;

	voCCOCycle.setTreatmentType(form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().getValue());
	voCCOCycle.setCycleStartDate(form.lyrDetails().tabCycleAndDrugCCO().dteTreatmentDate().getValue());
	if (form.getGlobalContext().Oncology.getChosenCCOOPAppointmentIsNotNull())
		voCCOCycle.setDiaryEntry(form.getGlobalContext().Oncology.getChosenCCOOPAppointment());
	
	voCCOCycle.setCycleNumber(form.lyrDetails().tabCycleAndDrugCCO().intCycle().getValue());
	voCCOCycle.setDayNumber(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue());
	voCCOCycle.setCycleDuration(form.lyrDetails().tabCycleAndDrugCCO().intDuration().getValue());
	voCCOCycle.setIsActive(form.lyrDetails().tabCycleAndDrugCCO().Group1().getValue().equals(Group1Enumeration.rdoActive) ? true : false);
	voCCOCycle.setWeight(form.lyrDetails().tabCycleAndDrugCCO().intWeightStartCycle().getValue()); //wdev-12819
	voCCOCycle.setPerformanceStatus(form.lyrDetails().tabCycleAndDrugCCO().cmbPerformanceStatusAtSTartCycle().getValue()); //wdev-12819

	if (form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().getValue() != null
		&& form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().getValue().equals(ChemoCycleTreatmentType.OUTPATIENT)
		&& form.getGlobalContext().Oncology.getChosenCCOOPAppointmentIsNotNull())
		voCCOCycle.setDiaryEntry(form.getGlobalContext().Oncology.getChosenCCOOPAppointment());
	
	if (form.lyrDetails().tabDetails().cmbRegimeAcronym() != null)
	{
		ChemoRegimensConfigVo voConfig = domain.getChemoRegimeConfig(form.lyrDetails().tabDetails().cmbRegimeAcronym().getValue());
		if (voConfig != null)
		{
			voCCOCycle.setRegimen(voConfig.getRegimen());
			voCCOCycle.setProcurementCode(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != null &&  form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() == 1 ?voConfig.getProcurementCode() : null);
			voCCOCycle.setDayOneDeliveryCode(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != null &&  form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() == 1 ? voConfig.getDayOneDeliveryCode() : null);
			voCCOCycle.setDeliveryCodeAllOtherDays(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != null && form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != 1 ? voConfig.getDeliveryCodeAllOtherDays() : null);
			
			//if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
			if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null && form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue().equals(DrugTherapyType.HIGHCOSTDRUG))  //wdev-13106	
			{
				voCCOCycle.setDayOneDeliveryCode(null);
				voCCOCycle.setDeliveryCodeAllOtherDays(voConfig.getDeliveryCodeAllOtherDays());
				voCCOCycle.setProcurementCode(voConfig.getProcurementCode());
			}
		}
	}
	
	return voCCOCycle;
}
 
Example 29
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void updateContextMenuState()
{
	// Chemotherapy context menu
	form.getContextMenus().getGenericGridAddItem().setVisible(FormMode.VIEW.equals(form.getMode()));
	form.getContextMenus().getGenericGridUpdateItem().setVisible(FormMode.VIEW.equals(form.getMode()) && form.grdChemotherapy().getValue() != null); // Use grid.getValue() as the selected row
									
	if (ConfigFlag.UI.USE_GENERIC_CHEMOTHERAPY_CYCLE_AND_DRUG_DETAILS.getValue())
	{
		// must also have a value, not just be selected
		// Cycle details context menu
		form.getContextMenus().getChemotherapyCycleAddCycleItem().setVisible(FormMode.EDIT.equals(form.getMode()));
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setText("Edit Day");		//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setText("Add Day");
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo );	//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo);	//wdev-12819
		form.getContextMenus().getChemotherapyCycleViewDayItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
	
	}
	else
	{
		//wdev-12819
		// must also have a value, not just be selected
		// Cycle details context menu
		form.getContextMenus().getChemotherapyCycleAddCycleItem().setVisible(FormMode.EDIT.equals(form.getMode()));
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setText("Edit Day");		//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setText("Add Day");
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo );	//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo);	//wdev-12819
		form.getContextMenus().getChemotherapyCycleViewDayItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
		//-----------
		
		//if (form.getLocalContext().getChemotherapyDetailsVo() != null
		//	&& form.getLocalContext().getChemotherapyDetailsVo().getID_ChemotherapyDetailsIsNotNull())
		//{
			// CCO Cycle details context menu
			form.getContextMenus().Oncology.getCCOChemoCycleMenuCCO_ADD_CYCLEItem().setVisible(FormMode.EDIT.equals(form.getMode()));
			form.getContextMenus().Oncology.getCCOChemoCycleMenuCCO_EDIT_CYCLEItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue() instanceof ChemoCycleDetailsCCOVo);
		//}
	}
}
 
Example 30
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void addCCOChemotherapyCyleDetailsRow(ChemoCycleDetailsCCOVo voChemoCycleDetails, DrugTherapyType type, boolean bActiveOnly)
{
	if (voChemoCycleDetails == null)
		return;

	if (voChemoCycleDetails.getIsActiveIsNotNull()
		&& ! voChemoCycleDetails.getIsActive()
		&& bActiveOnly)
		return;
	
	DynamicGridRow row = null;
	if (form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getSelectedRow() != null)
		row = form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getSelectedRow();
	else
		row = form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().newRow();

	String strOPTooltip = "";
	if (voChemoCycleDetails.getTreatmentType()!= null && voChemoCycleDetails.getTreatmentType().equals(ChemoCycleTreatmentType.OUTPATIENT))  //wdev-12819
		strOPTooltip = createChosenOPAppointmentString(voChemoCycleDetails.getDiaryEntry(), voChemoCycleDetails.getID_ChemoCycleDetailsCCOIsNotNull() ? true : false);
	
	DynamicGridCell treatTypeCell = row.getCells().newCell(getCol(TREAT_TYPE), DynamicCellType.LABEL);	
	treatTypeCell.setValue(voChemoCycleDetails.getTreatmentTypeIsNotNull() ? voChemoCycleDetails.getTreatmentType().getText() : "");								
	treatTypeCell.setTooltip(strOPTooltip);
	
	DynamicGridCell treatDateCell = row.getCells().newCell(getCol(TREAT_DATE), DynamicCellType.LABEL);	
	treatDateCell.setValue(voChemoCycleDetails.getCycleStartDateIsNotNull() ? voChemoCycleDetails.getCycleStartDate().toString() : "");								
	treatDateCell.setTooltip(strOPTooltip);

	if (type != null && type.equals(DrugTherapyType.HIGHCOSTDRUG))
	{
		DynamicGridCell durationCell = row.getCells().newCell(getCol(TREAT_DURATION), DynamicCellType.LABEL);	
		durationCell.setValue(voChemoCycleDetails.getCycleDurationIsNotNull() ? voChemoCycleDetails.getCycleDuration().toString() : "");								
		durationCell.setTooltip(strOPTooltip);
	}
	
	DynamicGridCell treatCycleCell = row.getCells().newCell(getCol(TREAT_CYCLE), DynamicCellType.LABEL);	
	treatCycleCell.setValue(voChemoCycleDetails.getCycleNumberIsNotNull() ? voChemoCycleDetails.getCycleNumber().toString() : "");								
	treatCycleCell.setTooltip(strOPTooltip);

	if (type == null || ! type.equals(DrugTherapyType.HIGHCOSTDRUG))			//wdev-12416
	{
		DynamicGridCell treatDayCell = row.getCells().newCell(getCol(TREAT_DAY), DynamicCellType.LABEL);	
		treatDayCell.setValue(voChemoCycleDetails.getDayNumberIsNotNull() ? voChemoCycleDetails.getDayNumber().toString() : "");								
		treatDayCell.setTooltip(strOPTooltip);
	}

	

	DynamicGridCell treatPCODECell = row.getCells().newCell(getCol(TREAT_PCODE), DynamicCellType.LABEL);	
	treatPCODECell.setValue(voChemoCycleDetails.getProcurementCodeIsNotNull() ? voChemoCycleDetails.getProcurementCode().getText() : "");
	treatPCODECell.setTooltip(strOPTooltip);
	
	DynamicGridCell treatDCODECell = row.getCells().newCell(getCol(TREAT_DCODE), DynamicCellType.LABEL);	
	treatDCODECell.setValue(voChemoCycleDetails.getDayOneDeliveryCodeIsNotNull() ? voChemoCycleDetails.getDayOneDeliveryCode().getText() : (voChemoCycleDetails.getDeliveryCodeAllOtherDaysIsNotNull() ? voChemoCycleDetails.getDeliveryCodeAllOtherDays().getText() : "" ));
	if (type != null && type.equals(DrugTherapyType.HIGHCOSTDRUG))
		treatDCODECell.setValue(voChemoCycleDetails.getDeliveryCodeAllOtherDaysIsNotNull() ? voChemoCycleDetails.getDeliveryCodeAllOtherDays().getText() : "");
	
	treatDCODECell.setTooltip(strOPTooltip);

	DynamicGridCell treatSTATUSCell = row.getCells().newCell(getCol(TREAT_STATUS), DynamicCellType.LABEL);	
	treatSTATUSCell.setValue(voChemoCycleDetails.getIsActiveIsNotNull() ? (voChemoCycleDetails.getIsActive() ? "Active" : "Inactive" ) : "");								

	row.setValue(voChemoCycleDetails);
}
 
Example 31
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateCCOCycleControls(Object value) 
{
	clearCCOControls();
	if (value instanceof ChemoCycleDetailsCCOVo)
	{
		ChemoCycleDetailsCCOVo voChemoCycleDetails = (ChemoCycleDetailsCCOVo)value;

		form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getTreatmentType():null);	//wdev-13106
		form.lyrDetails().tabCycleAndDrugCCO().dteTreatmentDate().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getCycleStartDate():null);	//wdev-13106
		form.lyrDetails().tabCycleAndDrugCCO().intCycle().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getCycleNumber():null);			//wdev-13106	
		//wdev-12819
		form.lyrDetails().tabCycleAndDrugCCO().intWeightStartCycle().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getWeight():null);		//wdev-13106	
		form.lyrDetails().tabCycleAndDrugCCO().cmbPerformanceStatusAtSTartCycle().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getPerformanceStatus():null);	//wdev-13106
		//----------
		
		//if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
		if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null && form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue().equals(DrugTherapyType.HIGHCOSTDRUG))  //wdev-12393
		{
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getCycleDuration():null);	//wdev-13106	
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setVisible(Boolean.TRUE);
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setVisible(Boolean.FALSE);
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setValue(null);
		}
		else
		{
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getDayNumber():null);			//wdev-13106
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setVisible(Boolean.FALSE);
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setVisible(Boolean.TRUE);
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setValue(null);
		}
		
		form.lyrDetails().tabCycleAndDrugCCO().Group1().setValue(voChemoCycleDetails != null && voChemoCycleDetails.getIsActiveIsNotNull() ? (voChemoCycleDetails.getIsActive() ? Group1Enumeration.rdoActive : Group1Enumeration.rdoInactive) : Group1Enumeration.None); //wdev-13106

		form.lyrDetails().tabCycleAndDrugCCO().lblOPAppt().setVisible(false);
		form.lyrDetails().tabCycleAndDrugCCO().lblOPDetails().setVisible(false);

		if (voChemoCycleDetails != null && voChemoCycleDetails.getTreatmentTypeIsNotNull() && voChemoCycleDetails.getTreatmentType().equals(ChemoCycleTreatmentType.OUTPATIENT)) //wdev-13106 
		{
			form.lyrDetails().tabCycleAndDrugCCO().lblOPAppt().setVisible(true);
			form.lyrDetails().tabCycleAndDrugCCO().lblOPDetails().setVisible(true);
			form.lyrDetails().tabCycleAndDrugCCO().lblOPDetails().setValue(createChosenOPAppointmentString(voChemoCycleDetails.getDiaryEntry(),voChemoCycleDetails.getID_ChemoCycleDetailsCCOIsNotNull() ? true : false));
		}
	}
}
 
Example 32
Project: openMAXIMS   File: Logic.java   Source Code and License 4 votes vote down vote up
private ChemoCycleDetailsCCOVo populateCCOChemotherapyVo(ChemoCycleDetailsCCOVo voCCOCycle)				//wdev-12416
{
	//ChemoCycleDetailsCCOVo voCCOCycle = (ChemoCycleDetailsCCOVo) form.getLocalContext().getSelectedCCOChemoCycleDetails().clone();
	if(voCCOCycle == null)		//wdev-12416
		return null;

	voCCOCycle.setTreatmentType(form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().getValue());
	voCCOCycle.setCycleStartDate(form.lyrDetails().tabCycleAndDrugCCO().dteTreatmentDate().getValue());
	if (form.getGlobalContext().Oncology.getChosenCCOOPAppointmentIsNotNull())
		voCCOCycle.setDiaryEntry(form.getGlobalContext().Oncology.getChosenCCOOPAppointment());
	
	voCCOCycle.setCycleNumber(form.lyrDetails().tabCycleAndDrugCCO().intCycle().getValue());
	voCCOCycle.setDayNumber(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue());
	voCCOCycle.setCycleDuration(form.lyrDetails().tabCycleAndDrugCCO().intDuration().getValue());
	voCCOCycle.setIsActive(form.lyrDetails().tabCycleAndDrugCCO().Group1().getValue().equals(Group1Enumeration.rdoActive) ? true : false);
	voCCOCycle.setWeight(form.lyrDetails().tabCycleAndDrugCCO().intWeightStartCycle().getValue()); //wdev-12819
	voCCOCycle.setPerformanceStatus(form.lyrDetails().tabCycleAndDrugCCO().cmbPerformanceStatusAtSTartCycle().getValue()); //wdev-12819

	if (form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().getValue() != null
		&& form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().getValue().equals(ChemoCycleTreatmentType.OUTPATIENT)
		&& form.getGlobalContext().Oncology.getChosenCCOOPAppointmentIsNotNull())
		voCCOCycle.setDiaryEntry(form.getGlobalContext().Oncology.getChosenCCOOPAppointment());
	
	if (form.lyrDetails().tabDetails().cmbRegimeAcronym() != null)
	{
		ChemoRegimensConfigVo voConfig = domain.getChemoRegimeConfig(form.lyrDetails().tabDetails().cmbRegimeAcronym().getValue());
		if (voConfig != null)
		{
			voCCOCycle.setRegimen(voConfig.getRegimen());
			voCCOCycle.setProcurementCode(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != null &&  form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() == 1 ?voConfig.getProcurementCode() : null);
			voCCOCycle.setDayOneDeliveryCode(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != null &&  form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() == 1 ? voConfig.getDayOneDeliveryCode() : null);
			voCCOCycle.setDeliveryCodeAllOtherDays(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != null && form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != 1 ? voConfig.getDeliveryCodeAllOtherDays() : null);
			
			//if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
			if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null && form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue().equals(DrugTherapyType.HIGHCOSTDRUG))  //wdev-13106	
			{
				voCCOCycle.setDayOneDeliveryCode(null);
				voCCOCycle.setDeliveryCodeAllOtherDays(voConfig.getDeliveryCodeAllOtherDays());
				voCCOCycle.setProcurementCode(voConfig.getProcurementCode());
			}
		}
	}
	
	return voCCOCycle;
}
 
Example 33
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private void updateContextMenuState()
{
	// Chemotherapy context menu
	form.getContextMenus().getGenericGridAddItem().setVisible(FormMode.VIEW.equals(form.getMode()));
	form.getContextMenus().getGenericGridUpdateItem().setVisible(FormMode.VIEW.equals(form.getMode()) && form.grdChemotherapy().getValue() != null); // Use grid.getValue() as the selected row
									
	if (ConfigFlag.UI.USE_GENERIC_CHEMOTHERAPY_CYCLE_AND_DRUG_DETAILS.getValue())
	{
		// must also have a value, not just be selected
		// Cycle details context menu
		form.getContextMenus().getChemotherapyCycleAddCycleItem().setVisible(FormMode.EDIT.equals(form.getMode()));
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setText("Edit Day");		//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setText("Add Day");
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo );	//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo);	//wdev-12819
		form.getContextMenus().getChemotherapyCycleViewDayItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
	
	}
	else
	{
		//wdev-12819
		// must also have a value, not just be selected
		// Cycle details context menu
		form.getContextMenus().getChemotherapyCycleAddCycleItem().setVisible(FormMode.EDIT.equals(form.getMode()));
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setText("Edit Day");		//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setText("Add Day");
		form.getContextMenus().getChemotherapyCycleAddFractionItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo );	//wdev-12819
		form.getContextMenus().getChemotherapyCycleEditItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemotherapyCycleDetailsVo);	//wdev-12819
		form.getContextMenus().getChemotherapyCycleViewDayItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrug().dyngrdCyclesDays().getValue() instanceof ChemoTherapyDayDetailsVo);  //wdev-12819
		//-----------
		
		//if (form.getLocalContext().getChemotherapyDetailsVo() != null
		//	&& form.getLocalContext().getChemotherapyDetailsVo().getID_ChemotherapyDetailsIsNotNull())
		//{
			// CCO Cycle details context menu
			form.getContextMenus().Oncology.getCCOChemoCycleMenuCCO_ADD_CYCLEItem().setVisible(FormMode.EDIT.equals(form.getMode()));
			form.getContextMenus().Oncology.getCCOChemoCycleMenuCCO_EDIT_CYCLEItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getValue() instanceof ChemoCycleDetailsCCOVo);
		//}
	}
}
 
Example 34
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private void addCCOChemotherapyCyleDetailsRow(ChemoCycleDetailsCCOVo voChemoCycleDetails, DrugTherapyType type, boolean bActiveOnly)
{
	if (voChemoCycleDetails == null)
		return;

	if (voChemoCycleDetails.getIsActiveIsNotNull()
		&& ! voChemoCycleDetails.getIsActive()
		&& bActiveOnly)
		return;
	
	DynamicGridRow row = null;
	if (form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getSelectedRow() != null)
		row = form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getSelectedRow();
	else
		row = form.lyrDetails().tabCycleAndDrugCCO().dyngrdCCOCyclesDays().getRows().newRow();

	String strOPTooltip = "";
	if (voChemoCycleDetails.getTreatmentType()!= null && voChemoCycleDetails.getTreatmentType().equals(ChemoCycleTreatmentType.OUTPATIENT))  //wdev-12819
		strOPTooltip = createChosenOPAppointmentString(voChemoCycleDetails.getDiaryEntry(), voChemoCycleDetails.getID_ChemoCycleDetailsCCOIsNotNull() ? true : false);
	
	DynamicGridCell treatTypeCell = row.getCells().newCell(getCol(TREAT_TYPE), DynamicCellType.LABEL);	
	treatTypeCell.setValue(voChemoCycleDetails.getTreatmentTypeIsNotNull() ? voChemoCycleDetails.getTreatmentType().getText() : "");								
	treatTypeCell.setTooltip(strOPTooltip);
	
	DynamicGridCell treatDateCell = row.getCells().newCell(getCol(TREAT_DATE), DynamicCellType.LABEL);	
	treatDateCell.setValue(voChemoCycleDetails.getCycleStartDateIsNotNull() ? voChemoCycleDetails.getCycleStartDate().toString() : "");								
	treatDateCell.setTooltip(strOPTooltip);

	if (type != null && type.equals(DrugTherapyType.HIGHCOSTDRUG))
	{
		DynamicGridCell durationCell = row.getCells().newCell(getCol(TREAT_DURATION), DynamicCellType.LABEL);	
		durationCell.setValue(voChemoCycleDetails.getCycleDurationIsNotNull() ? voChemoCycleDetails.getCycleDuration().toString() : "");								
		durationCell.setTooltip(strOPTooltip);
	}
	
	DynamicGridCell treatCycleCell = row.getCells().newCell(getCol(TREAT_CYCLE), DynamicCellType.LABEL);	
	treatCycleCell.setValue(voChemoCycleDetails.getCycleNumberIsNotNull() ? voChemoCycleDetails.getCycleNumber().toString() : "");								
	treatCycleCell.setTooltip(strOPTooltip);

	if (type == null || ! type.equals(DrugTherapyType.HIGHCOSTDRUG))			//wdev-12416
	{
		DynamicGridCell treatDayCell = row.getCells().newCell(getCol(TREAT_DAY), DynamicCellType.LABEL);	
		treatDayCell.setValue(voChemoCycleDetails.getDayNumberIsNotNull() ? voChemoCycleDetails.getDayNumber().toString() : "");								
		treatDayCell.setTooltip(strOPTooltip);
	}

	

	DynamicGridCell treatPCODECell = row.getCells().newCell(getCol(TREAT_PCODE), DynamicCellType.LABEL);	
	treatPCODECell.setValue(voChemoCycleDetails.getProcurementCodeIsNotNull() ? voChemoCycleDetails.getProcurementCode().getText() : "");
	treatPCODECell.setTooltip(strOPTooltip);
	
	DynamicGridCell treatDCODECell = row.getCells().newCell(getCol(TREAT_DCODE), DynamicCellType.LABEL);	
	treatDCODECell.setValue(voChemoCycleDetails.getDayOneDeliveryCodeIsNotNull() ? voChemoCycleDetails.getDayOneDeliveryCode().getText() : (voChemoCycleDetails.getDeliveryCodeAllOtherDaysIsNotNull() ? voChemoCycleDetails.getDeliveryCodeAllOtherDays().getText() : "" ));
	if (type != null && type.equals(DrugTherapyType.HIGHCOSTDRUG))
		treatDCODECell.setValue(voChemoCycleDetails.getDeliveryCodeAllOtherDaysIsNotNull() ? voChemoCycleDetails.getDeliveryCodeAllOtherDays().getText() : "");
	
	treatDCODECell.setTooltip(strOPTooltip);

	DynamicGridCell treatSTATUSCell = row.getCells().newCell(getCol(TREAT_STATUS), DynamicCellType.LABEL);	
	treatSTATUSCell.setValue(voChemoCycleDetails.getIsActiveIsNotNull() ? (voChemoCycleDetails.getIsActive() ? "Active" : "Inactive" ) : "");								

	row.setValue(voChemoCycleDetails);
}
 
Example 35
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private void populateCCOCycleControls(Object value) 
{
	clearCCOControls();
	if (value instanceof ChemoCycleDetailsCCOVo)
	{
		ChemoCycleDetailsCCOVo voChemoCycleDetails = (ChemoCycleDetailsCCOVo)value;

		form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getTreatmentType():null);	//wdev-13106
		form.lyrDetails().tabCycleAndDrugCCO().dteTreatmentDate().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getCycleStartDate():null);	//wdev-13106
		form.lyrDetails().tabCycleAndDrugCCO().intCycle().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getCycleNumber():null);			//wdev-13106	
		//wdev-12819
		form.lyrDetails().tabCycleAndDrugCCO().intWeightStartCycle().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getWeight():null);		//wdev-13106	
		form.lyrDetails().tabCycleAndDrugCCO().cmbPerformanceStatusAtSTartCycle().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getPerformanceStatus():null);	//wdev-13106
		//----------
		
		//if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
		if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null && form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue().equals(DrugTherapyType.HIGHCOSTDRUG))  //wdev-12393
		{
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getCycleDuration():null);	//wdev-13106	
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setVisible(Boolean.TRUE);
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setVisible(Boolean.FALSE);
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setValue(null);
		}
		else
		{
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setValue(voChemoCycleDetails != null ? voChemoCycleDetails.getDayNumber():null);			//wdev-13106
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setVisible(Boolean.FALSE);
			form.lyrDetails().tabCycleAndDrugCCO().intDay().setVisible(Boolean.TRUE);
			form.lyrDetails().tabCycleAndDrugCCO().intDuration().setValue(null);
		}
		
		form.lyrDetails().tabCycleAndDrugCCO().Group1().setValue(voChemoCycleDetails != null && voChemoCycleDetails.getIsActiveIsNotNull() ? (voChemoCycleDetails.getIsActive() ? Group1Enumeration.rdoActive : Group1Enumeration.rdoInactive) : Group1Enumeration.None); //wdev-13106

		form.lyrDetails().tabCycleAndDrugCCO().lblOPAppt().setVisible(false);
		form.lyrDetails().tabCycleAndDrugCCO().lblOPDetails().setVisible(false);

		if (voChemoCycleDetails != null && voChemoCycleDetails.getTreatmentTypeIsNotNull() && voChemoCycleDetails.getTreatmentType().equals(ChemoCycleTreatmentType.OUTPATIENT)) //wdev-13106 
		{
			form.lyrDetails().tabCycleAndDrugCCO().lblOPAppt().setVisible(true);
			form.lyrDetails().tabCycleAndDrugCCO().lblOPDetails().setVisible(true);
			form.lyrDetails().tabCycleAndDrugCCO().lblOPDetails().setValue(createChosenOPAppointmentString(voChemoCycleDetails.getDiaryEntry(),voChemoCycleDetails.getID_ChemoCycleDetailsCCOIsNotNull() ? true : false));
		}
	}
}
 
Example 36
Project: openmaxims-linux   File: Logic.java   Source Code and License 4 votes vote down vote up
private ChemoCycleDetailsCCOVo populateCCOChemotherapyVo(ChemoCycleDetailsCCOVo voCCOCycle)				//wdev-12416
{
	//ChemoCycleDetailsCCOVo voCCOCycle = (ChemoCycleDetailsCCOVo) form.getLocalContext().getSelectedCCOChemoCycleDetails().clone();
	if(voCCOCycle == null)		//wdev-12416
		return null;

	voCCOCycle.setTreatmentType(form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().getValue());
	voCCOCycle.setCycleStartDate(form.lyrDetails().tabCycleAndDrugCCO().dteTreatmentDate().getValue());
	if (form.getGlobalContext().Oncology.getChosenCCOOPAppointmentIsNotNull())
		voCCOCycle.setDiaryEntry(form.getGlobalContext().Oncology.getChosenCCOOPAppointment());
	
	voCCOCycle.setCycleNumber(form.lyrDetails().tabCycleAndDrugCCO().intCycle().getValue());
	voCCOCycle.setDayNumber(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue());
	voCCOCycle.setCycleDuration(form.lyrDetails().tabCycleAndDrugCCO().intDuration().getValue());
	voCCOCycle.setIsActive(form.lyrDetails().tabCycleAndDrugCCO().Group1().getValue().equals(Group1Enumeration.rdoActive) ? true : false);
	voCCOCycle.setWeight(form.lyrDetails().tabCycleAndDrugCCO().intWeightStartCycle().getValue()); //wdev-12819
	voCCOCycle.setPerformanceStatus(form.lyrDetails().tabCycleAndDrugCCO().cmbPerformanceStatusAtSTartCycle().getValue()); //wdev-12819

	if (form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().getValue() != null
		&& form.lyrDetails().tabCycleAndDrugCCO().cmbTreatmentType().getValue().equals(ChemoCycleTreatmentType.OUTPATIENT)
		&& form.getGlobalContext().Oncology.getChosenCCOOPAppointmentIsNotNull())
		voCCOCycle.setDiaryEntry(form.getGlobalContext().Oncology.getChosenCCOOPAppointment());
	
	if (form.lyrDetails().tabDetails().cmbRegimeAcronym() != null)
	{
		ChemoRegimensConfigVo voConfig = domain.getChemoRegimeConfig(form.lyrDetails().tabDetails().cmbRegimeAcronym().getValue());
		if (voConfig != null)
		{
			voCCOCycle.setRegimen(voConfig.getRegimen());
			voCCOCycle.setProcurementCode(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != null &&  form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() == 1 ?voConfig.getProcurementCode() : null);
			voCCOCycle.setDayOneDeliveryCode(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != null &&  form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() == 1 ? voConfig.getDayOneDeliveryCode() : null);
			voCCOCycle.setDeliveryCodeAllOtherDays(form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != null && form.lyrDetails().tabCycleAndDrugCCO().intDay().getValue() != 1 ? voConfig.getDeliveryCodeAllOtherDays() : null);
			
			//if (form.grdChemotherapy().getValue() != null && form.grdChemotherapy().getValue().getDrugTherapyType().equals(DrugTherapyType.HIGHCOSTDRUG))
			if(form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue() != null && form.lyrDetails().tabDetails().cmbDrugTherapyType().getValue().equals(DrugTherapyType.HIGHCOSTDRUG))  //wdev-13106	
			{
				voCCOCycle.setDayOneDeliveryCode(null);
				voCCOCycle.setDeliveryCodeAllOtherDays(voConfig.getDeliveryCodeAllOtherDays());
				voCCOCycle.setProcurementCode(voConfig.getProcurementCode());
			}
		}
	}
	
	return voCCOCycle;
}