Java Code Examples for ims.core.vo.lookups.YesNo

The following are top voted examples for showing how to use ims.core.vo.lookups.YesNo. 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 6 votes vote down vote up
private void calculateOverall()
{
	// Erase cell content first
	DynamicGridCell cell = getCellById(getColumn(COLTYPE_VALUE), OVERALL_VALUE);
	if (cell != null)
	{
		cell.getItems().clear();
		cell.setValue(null);
	}

	
	if (checkForMandatoryAtributes())
	{
		calculateOverallStaging(form.getLocalContext().getSelectedGroup(), form.getLocalContext().getSelectedSite(), (TumourGroupSiteTNMValueRefVo) getComboValues(TNM_T), (TumourGroupSiteTNMValueRefVo) getComboValues(TNM_N), (TumourGroupSiteTNMValueRefVo) getComboValues(TNM_M), (TumourHistologyRefVo) form.lyrMain().tabTumourDetails().cmbTumourHistologyType().getValue(), (HistopathologicGradeRefVo) form.lyrMain().tabTumourDetails().cmbTumourHistologyGrade().getValue(), (getComboValues(OVER45) != null ? ((getComboValues(OVER45).equals(YesNo.YES) ? Boolean.TRUE : Boolean.FALSE)) : null), (TumourSerumMarkerRefVo) form.lyrMain().tabTumourDetails().cmbSerumMarker().getValue());

	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateModalityFromScreen(
		TreatmentModalitiesVoCollection collCarePlanModalityVo) {
	GenForm.grdPlannedModRow rowPlanned;
	for(int i=0;i<form.grdPlannedMod().getRows().size();i++)
	{
		rowPlanned = form.grdPlannedMod().getRows().get(i);
		if (rowPlanned.getcolSelect())
		{
			TreatmentModalitiesVo voTreatmentModalities = new TreatmentModalitiesVo();					

			voTreatmentModalities.setPatientAgreed(YesNo.YES);
			voTreatmentModalities.setPatientSequence(rowPlanned.getcolSequence());
			voTreatmentModalities.setIsMDTModality(Boolean.TRUE);
			voTreatmentModalities.setMDTSequence(rowPlanned.getcolSequence());
			voTreatmentModalities.setTreatmentModality(rowPlanned.getValue());
			voTreatmentModalities.setIsCommenced(Boolean.TRUE);
			
			collCarePlanModalityVo.add(voTreatmentModalities);				
		}
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private BrachyTxTreatmentDetailsVoCollection populateDataFromDosesGrid() 
{
	BrachyTxTreatmentDetailsVoCollection dosesColl = new BrachyTxTreatmentDetailsVoCollection();
	
	for(int i=0; i<form.lyrDetails().tabBrachytherapy().grdDoses().getRows().size(); i++)
	{
		grdDosesRow row = form.lyrDetails().tabBrachytherapy().grdDoses().getRows().get(i);
		
		if(row.getColDate() != null || row.getColDose() != null || row.getColAnaesthetic())
		{
			BrachyTxTreatmentDetailsVo dose = (row.getValue() instanceof BrachyTxTreatmentDetailsVo) ? row.getValue() : new BrachyTxTreatmentDetailsVo();
			
			dose.setTreatmentDate(row.getColDate());
			dose.setDose(row.getColDose());
			dose.setGeneralAnaesthetic(row.getColAnaesthetic() ? YesNo.YES : YesNo.NO);
			
			dosesColl.add(dose);
		}
	}
	
	return dosesColl.size() > 0 ? dosesColl : null;
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void newInstance() 
{
	form.setMode(FormMode.EDIT);
	if (form.getLocalContext().getpreviousRepositioningPlanIsNotNull())
	{
		form.ctnRepo().ansFrequency().setValue(null);
		form.ctnRepo().ansFrequency().setEnabled(true);
	}
	else
	{
		form.ctnRepo().ansFrequency().setValue(YesNo.NO);
		form.ctnRepo().ansFrequency().setEnabled(false);
	}
	clearInstanceControls();	
	setDefaultValues();
	form.ctnRepo().setcustomAuthoringEnabled(true);
	form.getLocalContext().setRepositioningPlan(null);
}
 
Example 5
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onAnsFrequencyValueChanged() throws PresentationLogicException 
{
	if(form.ctnRepo().ansFrequency().getValue() != null)
	{
		if(form.ctnRepo().ansFrequency().getValue().equals(YesNo.YES))
		{
			populateInstanceControls(form.getLocalContext().getpreviousRepositioningPlan(), true);
			form.ctnRepo().customAuthoring().setValue(null);
			setDefaultValues();
		}
		else
		{
			clearInstanceControls();
			setDefaultValues();
		}
	}
	
}
 
Example 6
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void inactivateTNM()
{
	if (form.lyrConfig().tabTNM().lyrTNM().tabTNMValues().dynTNM().getSelectedRow() == null)
		return;

	DynamicGridRow rowSelected = form.lyrConfig().tabTNM().lyrTNM().tabTNMValues().dynTNM().getSelectedRow();

	if (!form.lyrConfig().tabTNM().chkActiveTNM().getValue())
		rowSelected.getCells().get(getColumn(COLACTIVE)).setValue(YesNo.NO);

	rowSelected.setBackColor(Color.Red);
	rowSelected.setReadOnly(true);
	Object value = form.lyrConfig().tabTNM().lyrTNM().tabTNMValues().dynTNM().getSelectedRow().getValue();
	rowSelected.setValue(value);

	if (value instanceof TumourGroupSiteTNMValueVo)
	{
		TumourGroupSiteTNMValueVo vo = (TumourGroupSiteTNMValueVo) value;
		vo.setIsActive(Boolean.FALSE);
	}

	// rowSelected.setTooltip("This record was marked as inactive!");
}
 
Example 7
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onBtnOKClick() throws PresentationLogicException
{
	Appointment_StatusVo voApptStatus = new Appointment_StatusVo();
	voApptStatus.setComment(form.txtComment().getValue());
	voApptStatus.setStatus(Status_Reason.CANCELLED);
	voApptStatus.setStatusReason(form.cmbCancellationType().getValue());
	voApptStatus.setCancellationReason(form.cmbCancellationReason().getValue());
	voApptStatus.setRebookSelected(form.ansRebook().getValue() != null && form.ansRebook().getValue().equals(YesNo.YES));
	
	voApptStatus.setCancelTCI(form.chkCancelTCI().getValue());
	
	String[] arrErrors = validateUI(voApptStatus);
	voApptStatus.setCancelledForNonMedicalReason(form.chkCancelledForNonMedicalReason().getValue());	//wdev-18419
	if(arrErrors != null)
	{
		engine.showErrors(arrErrors);
		return;
	}
	
	form.getGlobalContext().Scheduling.setApptCancelStatus(voApptStatus);
	engine.close(DialogResult.OK);
}
 
Example 8
Project: AvoinApotti   File: ReferralDetailsComponentImpl.java   Source Code and License 6 votes vote down vote up
private void updateReferralAppointments(CatsReferral doCats, DomainFactory factory, YesNo ynLookup) throws StaleObjectException
{
	CatsReferralVo voCats = CatsReferralVoAssembler.create(doCats);

	if (voCats.getConsultationApptIsNotNull() && voCats.getConsultationAppt().getApptStatus().equals(Status_Reason.BOOKED))
		voCats.getConsultationAppt().setIsTransportRequired(ynLookup.equals(YesNo.YES) ? Boolean.TRUE : Boolean.FALSE);

	for (int i = 0; voCats.getAppointmentsIsNotNull() && i < voCats.getAppointments().size(); i++)
	{
		if (voCats.getAppointments().get(i).getApptStatusIsNotNull() && voCats.getAppointments().get(i).getApptStatus().equals(Status_Reason.BOOKED))
			voCats.getAppointments().get(i).setIsTransportRequired(ynLookup.equals(YesNo.YES) ? Boolean.TRUE : Boolean.FALSE);

	}
	CatsReferral doCatsRef = CatsReferralVoAssembler.extractCatsReferral(factory, voCats);
	factory.save(doCatsRef);
}
 
Example 9
Project: AvoinApotti   File: AtConsultationImpl.java   Source Code and License 6 votes vote down vote up
public String getInterpretersLanguage(CatsReferralRefVo catsReferral)
{
	DomainFactory factory = getDomainFactory();
	IMSCriteria imsc=new IMSCriteria(CatsReferral.class, factory);
	imsc.equal("id", catsReferral.getID_CatsReferral());
	List cats = imsc.find();
	String language=null;
	CatsReferral catsReferralBo=null;
	if (cats!=null)
		catsReferralBo=(CatsReferral) cats.get(0);
	if (catsReferralBo!=null)
		if (catsReferralBo.getReferralDetails()!=null)
			if (catsReferralBo.getReferralDetails().getLanguage()!=null)
				if (catsReferralBo.getReferralDetails().getInterpreterRequired().equals(getDomLookup(YesNo.YES)))
					language=catsReferralBo.getReferralDetails().getLanguage().getText();
		
	return language;
}
 
Example 10
Project: AvoinApotti   File: AtConsultationImpl.java   Source Code and License 6 votes vote down vote up
public String getInterpretersOtherLanguage(CatsReferralRefVo catsReferral)
{
	DomainFactory factory = getDomainFactory();
	IMSCriteria imsc=new IMSCriteria(CatsReferral.class, factory);
	imsc.equal("id", catsReferral.getID_CatsReferral());
	List cats = imsc.find();
	String language=null;
	CatsReferral catsReferralBo=null;
	if (cats!=null)
		catsReferralBo=(CatsReferral) cats.get(0);
	if (catsReferralBo!=null)
		if (catsReferralBo.getReferralDetails()!=null)
			if (catsReferralBo.getReferralDetails().getOtherLanguage()!=null)
				if (catsReferralBo.getReferralDetails().getInterpreterRequired().equals(getDomLookup(YesNo.YES)))
					language=catsReferralBo.getReferralDetails().getOtherLanguage();
		
	return language;
}
 
Example 11
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void refreshSearchCriteria() 
{
	EDischargeSearchCriteriaVo voCriteria = form.getGlobalContext().getEDischargeSearchCriteria();
	
	form.cmbWard().setValue(domain.getWard(voCriteria.getWard()));
	form.cmbStatus().setValue(voCriteria.getStatus());
	form.cmbSpecialty().setValue(voCriteria.getSpecialty());
	form.dteFrom().setValue(voCriteria.getFromDate());
	form.dteTo().setValue(voCriteria.getToDate());
	form.chkDetailsComplete().setValue(voCriteria.getClinicaDetailsCompleteIsNotNull() && voCriteria.getClinicaDetailsComplete().equals(YesNo.YES) ? true :false);
			
	form.ccResponsibleHCP().setValue((IMos)voCriteria.getResponsibleHCP());

	form.cmbTTA().setValue(voCriteria.getTTAStatus());
	form.chkNoEmail().setValue(voCriteria.getNonCornish());
	
	initializeDynamicGrid();
	
	search();
}
 
Example 12
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void updateControlsState() 
{
	if(FormMode.VIEW.equals(form.getMode()))
	{
		form.btnNew().setVisible(true);
		form.btnEdit().setVisible(true);
	}
	
	if(FormMode.EDIT.equals(form.getMode()))
	{
		form.lyr1().tabActionPlan().txtAdviceGiven().setEnabled(YesNo.YES.equals(form.lyr1().tabActionPlan().ansTelephone().getValue()));
		form.lyr1().tabActionPlan().grdWhom().setEnabled(YesNo.YES.equals(form.lyr1().tabActionPlan().ansFollowUp().getValue()));
		form.lyr1().tabActionPlan().grdWhom().setReadOnly(!YesNo.YES.equals(form.lyr1().tabActionPlan().ansFollowUp().getValue()));
		form.lyr1().tabActionPlan().dteWardRoundReview().setEnabled(YesNo.YES.equals(form.lyr1().tabActionPlan().ansSeeOnWardRouond().getValue()));
		form.lyr1().tabActionPlan().grdReason().setEnabled(YesNo.YES.equals(form.lyr1().tabActionPlan().ansInappropriateReferral().getValue()));
		form.lyr1().tabActionPlan().grdReason().setReadOnly(!YesNo.YES.equals(form.lyr1().tabActionPlan().ansInappropriateReferral().getValue()));
		
		form.lyr1().tabActionPlan().txtOther().setEnabled(isOtherEnabled());
	}
	
	form.getContextMenus().Clinical.getChronicReferralInvestigationGridADDItem().setVisible(FormMode.EDIT.equals(form.getMode()));
	form.getContextMenus().Clinical.getChronicReferralInvestigationGridREMOVEItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyr1().tabReferralDetails().grdInvestigation().getSelectedRowIndex() >= 0);
	form.getContextMenus().Clinical.getChronicReferralVisitGridADDItem().setVisible(FormMode.EDIT.equals(form.getMode()));
	form.getContextMenus().Clinical.getChronicReferralVisitGridREMOVEItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyr1().tabVisitDetails().grdVisits().getSelectedRowIndex() >= 0);
}
 
Example 13
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateForm()
{
	MemberOfStaffLiteVo tempVo = new MemberOfStaffLiteVo();
	PersonName temppers = new PersonName();
	temppers.setForename("Med");
	temppers.setSurname("Med");
	temppers.setUpperForename("Med");
	temppers.setUpperSurname("Med");
	tempVo.setName(temppers);
					
	form.txtExpectedDateOfDischarge().setValue("20/10/2010");
	form.ccDischargingClin().setValue(tempVo);
	form.cmbDischSPecDEp().newRow("Departament","Departament");
	form.cmbDischMethod().newRow("Method","Method");
	form.cmbDischFrom().newRow("Discharged From","Discharged From");
	form.cmbDischDestination().newRow("Destination", "Destination");
	form.ansCertificateofSickness().setValue(YesNo.YES);
	form.ansConfirmationOfHardcopy().setValue(YesNo.NO);
	form.ansLivingAlone().setValue(YesNo.YES);
	form.ansFitToReturnWork().setValue(YesNo.NO);
	form.cmbReturnToWorkAdvice().newRow("Advice1","Advice1");
	form.dtimActualDateTimeOfMedDisch().setValue(new DateTime());
	form.txtDischGrade().setValue("Medic");
}
 
Example 14
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void verifyAndDisableNonHospFollowUp(grdFollowUpRow row)
{
	if(row.getColHospFollowUp()!=null && row.getColHospFollowUp().equals(YesNo.NO)){
		row.setColINReadOnly(true);
		row.setColPeriodReadOnly(true);
		row.setColHCPReadOnly(true);
		row.setColSpecReadOnly(true);
		row.setColLocReadOnly(true);
		
		row.setColIN(null);
		row.setColPeriod(null);
		row.getColHCP().setValue(null);
		row.setColSpec(null);
		row.getColLoc().setValue(null);
	}
	else{
		row.setColINReadOnly(false);
		row.setColPeriodReadOnly(false);
		row.setColHCPReadOnly(false);
		row.setColSpecReadOnly(false);
		row.setColLocReadOnly(false);
	}
}
 
Example 15
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void enableDisableNonHospFollowUp(grdFuturePlanRow row)
{
	if(row.getColHospFollowUp()!=null && row.getColHospFollowUp().equals(YesNo.NO)){
		row.setColINReadOnly(true);
		row.setColPeriodReadOnly(true);
		row.setColHCPReadOnly(true);
		row.setColSpecReadOnly(true);
		row.setColLocReadOnly(true);
		
		row.setColIN(null);
		row.setColPeriod(null);
		row.getColHCP().setValue(null);
		row.setColSpec(null);
		row.getColLoc().setValue(null);
	}
	else{
		row.setColINReadOnly(false);
		row.setColPeriodReadOnly(false);
		row.setColHCPReadOnly(false);
		row.setColSpecReadOnly(false);
		row.setColLocReadOnly(false);
	}
}
 
Example 16
Project: AvoinApotti   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateScreenFromData(PlasticSurgeryAndBurnsVo voPlasticSurgeryAndBurns)
{
	clearInstanceControls();
	
	if (voPlasticSurgeryAndBurns == null)
		return;
	
	
	form.cmbAnaesthetic().setValue(voPlasticSurgeryAndBurns.getAnaestheticType());
	if(voPlasticSurgeryAndBurns.getSkinForStorageIsNotNull() && voPlasticSurgeryAndBurns.getSkinForStorage().equals(YesNo.YES))
		form.Group1().setValue(GenForm.Group1Enumeration.rdoSkinForStorageYes);
	else if(voPlasticSurgeryAndBurns.getSkinForStorageIsNotNull() && voPlasticSurgeryAndBurns.getSkinForStorage().equals(YesNo.NO))
		form.Group1().setValue(GenForm.Group1Enumeration.rdoSkinForStorageNo);
	form.dteFirstdressing().setValue(voPlasticSurgeryAndBurns.getScheduledFirstDressingDate());
	form.dteSutureremoval().setValue(voPlasticSurgeryAndBurns.getScheduledSutureRemoval());
	form.qmbSurgeon().newRow(voPlasticSurgeryAndBurns.getSurgeon(), voPlasticSurgeryAndBurns.getSurgeon().getIMosName());
	form.qmbSurgeon().setValue(voPlasticSurgeryAndBurns.getSurgeon());
	form.chkComplete().setValue(voPlasticSurgeryAndBurns.getIsComplete());
		
}
 
Example 17
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void calculateOverall()
{
	// Erase cell content first
	DynamicGridCell cell = getCellById(getColumn(COLTYPE_VALUE), OVERALL_VALUE);
	if (cell != null)
	{
		cell.getItems().clear();
		cell.setValue(null);
	}

	
	if (checkForMandatoryAtributes())
	{
		calculateOverallStaging(form.getLocalContext().getSelectedGroup(), form.getLocalContext().getSelectedSite(), (TumourGroupSiteTNMValueRefVo) getComboValues(TNM_T), (TumourGroupSiteTNMValueRefVo) getComboValues(TNM_N), (TumourGroupSiteTNMValueRefVo) getComboValues(TNM_M), (TumourHistologyRefVo) form.lyrMain().tabTumourDetails().cmbTumourHistologyType().getValue(), (HistopathologicGradeRefVo) form.lyrMain().tabTumourDetails().cmbTumourHistologyGrade().getValue(), (getComboValues(OVER45) != null ? ((getComboValues(OVER45).equals(YesNo.YES) ? Boolean.TRUE : Boolean.FALSE)) : null), (TumourSerumMarkerRefVo) form.lyrMain().tabTumourDetails().cmbSerumMarker().getValue());

	}
}
 
Example 18
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateModalityFromScreen(
		TreatmentModalitiesVoCollection collCarePlanModalityVo) {
	GenForm.grdPlannedModRow rowPlanned;
	for(int i=0;i<form.grdPlannedMod().getRows().size();i++)
	{
		rowPlanned = form.grdPlannedMod().getRows().get(i);
		if (rowPlanned.getcolSelect())
		{
			TreatmentModalitiesVo voTreatmentModalities = new TreatmentModalitiesVo();					

			voTreatmentModalities.setPatientAgreed(YesNo.YES);
			voTreatmentModalities.setPatientSequence(rowPlanned.getcolSequence());
			voTreatmentModalities.setIsMDTModality(Boolean.TRUE);
			voTreatmentModalities.setMDTSequence(rowPlanned.getcolSequence());
			voTreatmentModalities.setTreatmentModality(rowPlanned.getValue());
			voTreatmentModalities.setIsCommenced(Boolean.TRUE);
			
			collCarePlanModalityVo.add(voTreatmentModalities);				
		}
	}
}
 
Example 19
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void newInstance() 
{
	form.setMode(FormMode.EDIT);
	if (form.getLocalContext().getpreviousRepositioningPlanIsNotNull())
	{
		form.ctnRepo().ansFrequency().setValue(null);
		form.ctnRepo().ansFrequency().setEnabled(true);
	}
	else
	{
		form.ctnRepo().ansFrequency().setValue(YesNo.NO);
		form.ctnRepo().ansFrequency().setEnabled(false);
	}
	clearInstanceControls();	
	setDefaultValues();
	form.ctnRepo().setcustomAuthoringEnabled(true);
	form.getLocalContext().setRepositioningPlan(null);
}
 
Example 20
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onAnsFrequencyValueChanged() throws PresentationLogicException 
{
	if(form.ctnRepo().ansFrequency().getValue() != null)
	{
		if(form.ctnRepo().ansFrequency().getValue().equals(YesNo.YES))
		{
			populateInstanceControls(form.getLocalContext().getpreviousRepositioningPlan(), true);
			form.ctnRepo().customAuthoring().setValue(null);
			setDefaultValues();
		}
		else
		{
			clearInstanceControls();
			setDefaultValues();
		}
	}
	
}
 
Example 21
Project: openMAXIMS   File: AtConsultationImpl.java   Source Code and License 6 votes vote down vote up
public String getInterpretersLanguage(CatsReferralRefVo catsReferral)
{
	DomainFactory factory = getDomainFactory();
	IMSCriteria imsc=new IMSCriteria(CatsReferral.class, factory);
	imsc.equal("id", catsReferral.getID_CatsReferral());
	List cats = imsc.find();
	String language=null;
	CatsReferral catsReferralBo=null;
	if (cats!=null)
		catsReferralBo=(CatsReferral) cats.get(0);
	if (catsReferralBo!=null)
		if (catsReferralBo.getReferralDetails()!=null)
			if (catsReferralBo.getReferralDetails().getLanguage()!=null)
				if (catsReferralBo.getReferralDetails().getInterpreterRequired().equals(getDomLookup(YesNo.YES)))
					language=catsReferralBo.getReferralDetails().getLanguage().getText();
		
	return language;
}
 
Example 22
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void inactivateTNM()
{
	if (form.lyrConfig().tabTNM().lyrTNM().tabTNMValues().dynTNM().getSelectedRow() == null)
		return;

	DynamicGridRow rowSelected = form.lyrConfig().tabTNM().lyrTNM().tabTNMValues().dynTNM().getSelectedRow();

	if (!form.lyrConfig().tabTNM().chkActiveTNM().getValue())
		rowSelected.getCells().get(getColumn(COLACTIVE)).setValue(YesNo.NO);

	rowSelected.setBackColor(Color.Red);
	rowSelected.setReadOnly(true);
	Object value = form.lyrConfig().tabTNM().lyrTNM().tabTNMValues().dynTNM().getSelectedRow().getValue();
	rowSelected.setValue(value);

	if (value instanceof TumourGroupSiteTNMValueVo)
	{
		TumourGroupSiteTNMValueVo vo = (TumourGroupSiteTNMValueVo) value;
		vo.setIsActive(Boolean.FALSE);
	}

	// rowSelected.setTooltip("This record was marked as inactive!");
}
 
Example 23
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void verifyAndDisableNonHospFollowUp(grdFollowUpRow row)
{
	if(row.getColHospFollowUp()!=null && row.getColHospFollowUp().equals(YesNo.NO)){
		row.setColINReadOnly(true);
		row.setColPeriodReadOnly(true);
		row.setColHCPReadOnly(true);
		row.setColSpecReadOnly(true);
		row.setColLocReadOnly(true);
		
		row.setColIN(null);
		row.setColPeriod(null);
		row.getColHCP().setValue(null);
		row.setColSpec(null);
		row.getColLoc().setValue(null);
	}
	else{
		row.setColINReadOnly(false);
		row.setColPeriodReadOnly(false);
		row.setColHCPReadOnly(false);
		row.setColSpecReadOnly(false);
		row.setColLocReadOnly(false);
	}
}
 
Example 24
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void verifyAndDisableNonHospFollowUp(grdFollowUpRow row)
{
	if(row.getColHospFollowUp()!=null && row.getColHospFollowUp().equals(YesNo.NO)){
		row.setColINReadOnly(true);
		row.setColPeriodReadOnly(true);
		row.setColHCPReadOnly(true);
		row.setColSpecReadOnly(true);
		row.setColLocReadOnly(true);
		
		row.setColIN(null);
		row.setColPeriod(null);
		row.getColHCP().setValue(null);
		row.setColSpec(null);
		row.getColLoc().setValue(null);
	}
	else{
		row.setColINReadOnly(false);
		row.setColPeriodReadOnly(false);
		row.setColHCPReadOnly(false);
		row.setColSpecReadOnly(false);
		row.setColLocReadOnly(false);
	}
}
 
Example 25
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private InterventionTreatmentDetailVo createInterventionTreatmentDetail(TreatmentInterventionLiteVo value) 
{
	if(value == null)
		return null;
	
	InterventionTreatmentDetailVo record = new InterventionTreatmentDetailVo();
	//wdev-17444
	if( Boolean.TRUE.equals(form.getLocalContext().getAuthoringInfoControlIsEnabled()) )
		record.setAuthoringInformation(form.ccAuthoringInfo().getValue());
	else
		record.setAuthoringInformation(form.getLocalContext().getLoggedInAuthoring());
	//----------
	record.setTreatmentIntervention(value);
	record.setTreatmentInterventionDescription(value.getTreatmentInterventionName());
	
	if(Boolean.TRUE.equals(form.getLocalContext().getAddedDuringCoding()))
	{
		record.setAddedDuringCoding(true);
	}
	
	//WDEV-19058
	record.setInterventionTreatmentComplete(YesNo.YES);
	
	return record;
}
 
Example 26
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private boolean saveTreatmentIntervention(grdInterventionsTreatmentsRow row, boolean isChecked) 
{
	InterventionTreatmentDetailVo interventionTreatToSave = (InterventionTreatmentDetailVo) row.getValue();
	interventionTreatToSave.setInterventionTreatmentComplete(isChecked ? YesNo.YES : YesNo.NO );
	
	String[] errors = interventionTreatToSave.validate();
	if(errors != null && errors.length > 0)
	{
		engine.showErrors(errors);
		return false;
	}
	
	try 
	{
		domain.saveInterventionTreatmentDetailVo(interventionTreatToSave);
	} 
	catch (StaleObjectException e) 
	{
		e.printStackTrace();
		engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
		refresh();
		return false;
	} 
	
	return true;
}
 
Example 27
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onAnsFrequencyValueChanged() throws PresentationLogicException 
{
	if(form.ctnRepo().ansFrequency().getValue() != null)
	{
		if(form.ctnRepo().ansFrequency().getValue().equals(YesNo.YES))
		{
			populateInstanceControls(form.getLocalContext().getpreviousRepositioningPlan(), true);
			form.ctnRepo().customAuthoring().setValue(null);
			setDefaultValues();
		}
		else
		{
			clearInstanceControls();
			setDefaultValues();
		}
	}
	
}
 
Example 28
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void checkPegRequired()
{
	if (form.getMode().equals(FormMode.EDIT))
	{

		if (form.lyrProtocol().tabConfig().ctn().cmbPegReq().getValue() != null && form.lyrProtocol().tabConfig().ctn().cmbPegReq().getValue().equals(OptionsRequired.MANDATORY))
		{
			form.lyrProtocol().tabConfig().ctn().cmbPegDefault().setValue(YesNo.YES);
			form.lyrProtocol().tabConfig().ctn().cmbPegDefault().setEnabled(false);
		}
		else if (form.lyrProtocol().tabConfig().ctn().cmbPegReq().getValue() != null && form.lyrProtocol().tabConfig().ctn().cmbPegReq().getValue().equals(OptionsRequired.NOT_REQUIRED))
		{
			form.lyrProtocol().tabConfig().ctn().cmbPegDefault().setValue(null);
			form.lyrProtocol().tabConfig().ctn().cmbPegDefault().setEnabled(false);
		}
		else
			form.lyrProtocol().tabConfig().ctn().cmbPegDefault().setEnabled(true);
	}
}
 
Example 29
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void checkPlanningCTRequired()
{
	if (form.getMode().equals(FormMode.EDIT))
	{

		if (form.lyrProtocol().tabConfig().ctn().cmbPlanningCTReq().getValue() != null && form.lyrProtocol().tabConfig().ctn().cmbPlanningCTReq().getValue().equals(OptionsRequired.MANDATORY))
		{
			form.lyrProtocol().tabConfig().ctn().cmbPlanningDefault().setValue(YesNo.YES);
			form.lyrProtocol().tabConfig().ctn().cmbPlanningDefault().setEnabled(false);
		}
		else if (form.lyrProtocol().tabConfig().ctn().cmbPlanningCTReq().getValue() != null && form.lyrProtocol().tabConfig().ctn().cmbPlanningCTReq().getValue().equals(OptionsRequired.NOT_REQUIRED))
		{
			form.lyrProtocol().tabConfig().ctn().cmbPlanningDefault().setValue(null);
			form.lyrProtocol().tabConfig().ctn().cmbPlanningDefault().setEnabled(false);
		}
		else
			form.lyrProtocol().tabConfig().ctn().cmbPlanningDefault().setEnabled(true);
	}
}
 
Example 30
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateForm()
{
	MemberOfStaffLiteVo tempVo = new MemberOfStaffLiteVo();
	PersonName temppers = new PersonName();
	temppers.setForename("Med");
	temppers.setSurname("Med");
	temppers.setUpperForename("Med");
	temppers.setUpperSurname("Med");
	tempVo.setName(temppers);
					
	form.txtExpectedDateOfDischarge().setValue("20/10/2010");
	form.ccDischargingClin().setValue(tempVo);
	form.cmbDischSPecDEp().newRow("Departament","Departament");
	form.cmbDischMethod().newRow("Method","Method");
	form.cmbDischFrom().newRow("Discharged From","Discharged From");
	form.cmbDischDestination().newRow("Destination", "Destination");
	form.ansCertificateofSickness().setValue(YesNo.YES);
	form.ansConfirmationOfHardcopy().setValue(YesNo.NO);
	form.ansLivingAlone().setValue(YesNo.YES);
	form.ansFitToReturnWork().setValue(YesNo.NO);
	form.cmbReturnToWorkAdvice().newRow("Advice1","Advice1");
	form.dtimActualDateTimeOfMedDisch().setValue(new DateTime());
	form.txtDischGrade().setValue("Medic");
}
 
Example 31
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void calculateOverall()
{
	// Erase cell content first
	DynamicGridCell cell = getCellById(getColumn(COLTYPE_VALUE), OVERALL_VALUE);
	if (cell != null)
	{
		cell.getItems().clear();
		cell.setValue(null);
	}

	
	if (checkForMandatoryAtributes())
	{
		calculateOverallStaging(form.getLocalContext().getSelectedGroup(), form.getLocalContext().getSelectedSite(), (TumourGroupSiteTNMValueRefVo) getComboValues(TNM_T), (TumourGroupSiteTNMValueRefVo) getComboValues(TNM_N), (TumourGroupSiteTNMValueRefVo) getComboValues(TNM_M), (TumourHistologyRefVo) form.lyrMain().tabTumourDetails().cmbTumourHistologyType().getValue(), (HistopathologicGradeRefVo) form.lyrMain().tabTumourDetails().cmbTumourHistologyGrade().getValue(), (getComboValues(OVER45) != null ? ((getComboValues(OVER45).equals(YesNo.YES) ? Boolean.TRUE : Boolean.FALSE)) : null), (TumourSerumMarkerRefVo) form.lyrMain().tabTumourDetails().cmbSerumMarker().getValue());

	}
}
 
Example 32
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateModalityFromScreen(
		TreatmentModalitiesVoCollection collCarePlanModalityVo) {
	GenForm.grdPlannedModRow rowPlanned;
	for(int i=0;i<form.grdPlannedMod().getRows().size();i++)
	{
		rowPlanned = form.grdPlannedMod().getRows().get(i);
		if (rowPlanned.getcolSelect())
		{
			TreatmentModalitiesVo voTreatmentModalities = new TreatmentModalitiesVo();					

			voTreatmentModalities.setPatientAgreed(YesNo.YES);
			voTreatmentModalities.setPatientSequence(rowPlanned.getcolSequence());
			voTreatmentModalities.setIsMDTModality(Boolean.TRUE);
			voTreatmentModalities.setMDTSequence(rowPlanned.getcolSequence());
			voTreatmentModalities.setTreatmentModality(rowPlanned.getValue());
			voTreatmentModalities.setIsCommenced(Boolean.TRUE);
			
			collCarePlanModalityVo.add(voTreatmentModalities);				
		}
	}
}
 
Example 33
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void enableDisableNonHospFollowUp(grdFuturePlanRow row)
{
	if(row.getColHospFollowUp()!=null && row.getColHospFollowUp().equals(YesNo.NO)){
		row.setColINReadOnly(true);
		row.setColPeriodReadOnly(true);
		row.setColHCPReadOnly(true);
		row.setColSpecReadOnly(true);
		row.setColLocReadOnly(true);
		
		row.getColIN().setValue(null);
		row.setColPeriod(null);
		row.getColHCP().setValue(null);
		row.setColSpec(null);
		row.getColLoc().setValue(null);
	}
	else{
		row.setColINReadOnly(false);
		row.setColPeriodReadOnly(false);
		row.setColHCPReadOnly(false);
		row.setColSpecReadOnly(false);
		row.setColLocReadOnly(false);
	}
}
 
Example 34
Project: openMAXIMS   File: IntraOperativeCaseDetailsDialogImpl.java   Source Code and License 6 votes vote down vote up
@Override
public Boolean isAnaestheticSignInIntraOpFluidsYes(Booking_AppointmentRefVo appt)
{
	if (appt == null || appt.getID_Booking_Appointment() == null)
		throw new CodingRuntimeException("appt is null in isAnaestheticSignInIntraOpFluidsYes");

	DomainFactory factory = getDomainFactory();

	String hql = "select signIn.intraoperativeFluidsRequired from AnaestheticSignIn signIn " +
				" where  signIn.theatreAppointment.id=" + appt.getID_Booking_Appointment() ; 
	List values = factory.find(hql);
	
	if (values != null 
			&& values.size() == 1 
			&& values.get(0) instanceof LookupInstance) 
	{
		LookupInstance intraOpFluids = (LookupInstance) values.get(0);
		return YesNo.YES.getID() == intraOpFluids.getId();
	}
	
	return false;
}
 
Example 35
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private BrachyTxTreatmentDetailsVoCollection populateDataFromDosesGrid() 
{
	BrachyTxTreatmentDetailsVoCollection dosesColl = new BrachyTxTreatmentDetailsVoCollection();
	
	for(int i=0; i<form.lyrDetails().tabBrachytherapy().grdDoses().getRows().size(); i++)
	{
		grdDosesRow row = form.lyrDetails().tabBrachytherapy().grdDoses().getRows().get(i);
		
		if(row.getColDate() != null || row.getColDose() != null || row.getColAnaesthetic())
		{
			BrachyTxTreatmentDetailsVo dose = (row.getValue() instanceof BrachyTxTreatmentDetailsVo) ? row.getValue() : new BrachyTxTreatmentDetailsVo();
			
			dose.setTreatmentDate(row.getColDate());
			dose.setDose(row.getColDose());
			dose.setGeneralAnaesthetic(row.getColAnaesthetic() ? YesNo.YES : YesNo.NO);
			
			dosesColl.add(dose);
		}
	}
	
	return dosesColl.size() > 0 ? dosesColl : null;
}
 
Example 36
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void newInstance() 
{
	form.setMode(FormMode.EDIT);
	if (form.getLocalContext().getpreviousRepositioningPlanIsNotNull())
	{
		form.ctnRepo().ansFrequency().setValue(null);
		form.ctnRepo().ansFrequency().setEnabled(true);
	}
	else
	{
		form.ctnRepo().ansFrequency().setValue(YesNo.NO);
		form.ctnRepo().ansFrequency().setEnabled(false);
	}
	clearInstanceControls();	
	setDefaultValues();
	form.ctnRepo().setcustomAuthoringEnabled(true);
	form.getLocalContext().setRepositioningPlan(null);
}
 
Example 37
Project: openMAXIMS   File: AtConsultationImpl.java   Source Code and License 6 votes vote down vote up
public String getInterpretersOtherLanguage(CatsReferralRefVo catsReferral)
{
	DomainFactory factory = getDomainFactory();
	IMSCriteria imsc=new IMSCriteria(CatsReferral.class, factory);
	imsc.equal("id", catsReferral.getID_CatsReferral());
	List cats = imsc.find();
	String language=null;
	CatsReferral catsReferralBo=null;
	if (cats!=null)
		catsReferralBo=(CatsReferral) cats.get(0);
	if (catsReferralBo!=null)
		if (catsReferralBo.getReferralDetails()!=null)
			if (catsReferralBo.getReferralDetails().getOtherLanguage()!=null)
				if (catsReferralBo.getReferralDetails().getInterpreterRequired().equals(getDomLookup(YesNo.YES)))
					language=catsReferralBo.getReferralDetails().getOtherLanguage();
		
	return language;
}
 
Example 38
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void updateControlsState() 
{
	if(FormMode.VIEW.equals(form.getMode()))
	{
		form.btnNew().setVisible(true);
		form.btnEdit().setVisible(true);
	}
	
	if(FormMode.EDIT.equals(form.getMode()))
	{
		form.lyr1().tabActionPlan().txtAdviceGiven().setEnabled(YesNo.YES.equals(form.lyr1().tabActionPlan().ansTelephone().getValue()));
		form.lyr1().tabActionPlan().grdWhom().setEnabled(YesNo.YES.equals(form.lyr1().tabActionPlan().ansFollowUp().getValue()));
		form.lyr1().tabActionPlan().grdWhom().setReadOnly(!YesNo.YES.equals(form.lyr1().tabActionPlan().ansFollowUp().getValue()));
		form.lyr1().tabActionPlan().dteWardRoundReview().setEnabled(YesNo.YES.equals(form.lyr1().tabActionPlan().ansSeeOnWardRouond().getValue()));
		form.lyr1().tabActionPlan().grdReason().setEnabled(YesNo.YES.equals(form.lyr1().tabActionPlan().ansInappropriateReferral().getValue()));
		form.lyr1().tabActionPlan().grdReason().setReadOnly(!YesNo.YES.equals(form.lyr1().tabActionPlan().ansInappropriateReferral().getValue()));
		
		form.lyr1().tabActionPlan().txtOther().setEnabled(isOtherEnabled());
	}
	
	form.getContextMenus().Clinical.getChronicReferralInvestigationGridADDItem().setVisible(FormMode.EDIT.equals(form.getMode()));
	form.getContextMenus().Clinical.getChronicReferralInvestigationGridREMOVEItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyr1().tabReferralDetails().grdInvestigation().getSelectedRowIndex() >= 0);
	form.getContextMenus().Clinical.getChronicReferralVisitGridADDItem().setVisible(FormMode.EDIT.equals(form.getMode()));
	form.getContextMenus().Clinical.getChronicReferralVisitGridREMOVEItem().setVisible(FormMode.EDIT.equals(form.getMode()) && form.lyr1().tabVisitDetails().grdVisits().getSelectedRowIndex() >= 0);
}
 
Example 39
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateScreenFromData(PlasticSurgeryAndBurnsVo voPlasticSurgeryAndBurns)
{
	clearInstanceControls();
	
	if (voPlasticSurgeryAndBurns == null)
		return;
	
	
	form.cmbAnaesthetic().setValue(voPlasticSurgeryAndBurns.getAnaestheticType());
	if(voPlasticSurgeryAndBurns.getSkinForStorageIsNotNull() && voPlasticSurgeryAndBurns.getSkinForStorage().equals(YesNo.YES))
		form.Group1().setValue(GenForm.Group1Enumeration.rdoSkinForStorageYes);
	else if(voPlasticSurgeryAndBurns.getSkinForStorageIsNotNull() && voPlasticSurgeryAndBurns.getSkinForStorage().equals(YesNo.NO))
		form.Group1().setValue(GenForm.Group1Enumeration.rdoSkinForStorageNo);
	form.dteFirstdressing().setValue(voPlasticSurgeryAndBurns.getScheduledFirstDressingDate());
	form.dteSutureremoval().setValue(voPlasticSurgeryAndBurns.getScheduledSutureRemoval());
	form.qmbSurgeon().newRow(voPlasticSurgeryAndBurns.getSurgeon(), voPlasticSurgeryAndBurns.getSurgeon().getIMosName());
	form.qmbSurgeon().setValue(voPlasticSurgeryAndBurns.getSurgeon());
	form.chkComplete().setValue(voPlasticSurgeryAndBurns.getIsComplete());
		
}
 
Example 40
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
protected void onAnsFrequencyValueChanged() throws PresentationLogicException 
{
	if(form.ctnRepo().ansFrequency().getValue() != null)
	{
		if(form.ctnRepo().ansFrequency().getValue().equals(YesNo.YES))
		{
			populateInstanceControls(form.getLocalContext().getpreviousRepositioningPlan(), true);
			form.ctnRepo().customAuthoring().setValue(null);
			setDefaultValues();
		}
		else
		{
			clearInstanceControls();
			setDefaultValues();
		}
	}
	
}
 
Example 41
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateForm()
{
	MemberOfStaffLiteVo tempVo = new MemberOfStaffLiteVo();
	PersonName temppers = new PersonName();
	temppers.setForename("Med");
	temppers.setSurname("Med");
	temppers.setUpperForename("Med");
	temppers.setUpperSurname("Med");
	tempVo.setName(temppers);
					
	form.txtExpectedDateOfDischarge().setValue("20/10/2010");
	form.ccDischargingClin().setValue(tempVo);
	form.cmbDischSPecDEp().newRow("Departament","Departament");
	form.cmbDischMethod().newRow("Method","Method");
	form.cmbDischFrom().newRow("Discharged From","Discharged From");
	form.cmbDischDestination().newRow("Destination", "Destination");
	form.ansCertificateofSickness().setValue(YesNo.YES);
	form.ansConfirmationOfHardcopy().setValue(YesNo.NO);
	form.ansLivingAlone().setValue(YesNo.YES);
	form.ansFitToReturnWork().setValue(YesNo.NO);
	form.cmbReturnToWorkAdvice().newRow("Advice1","Advice1");
	form.dtimActualDateTimeOfMedDisch().setValue(new DateTime());
	form.txtDischGrade().setValue("Medic");
}
 
Example 42
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void verifyAndDisableNonHospFollowUp(grdFollowUpRow row)
{
	if(row.getColHospFollowUp()!=null && row.getColHospFollowUp().equals(YesNo.NO)){
		row.setColINReadOnly(true);
		row.setColPeriodReadOnly(true);
		row.setColHCPReadOnly(true);
		row.setColSpecReadOnly(true);
		row.setColLocReadOnly(true);
		
		row.setColIN(null);
		row.setColPeriod(null);
		row.getColHCP().setValue(null);
		row.setColSpec(null);
		row.getColLoc().setValue(null);
	}
	else{
		row.setColINReadOnly(false);
		row.setColPeriodReadOnly(false);
		row.setColHCPReadOnly(false);
		row.setColSpecReadOnly(false);
		row.setColLocReadOnly(false);
	}
}
 
Example 43
Project: openmaxims-linux   File: Logic.java   Source Code and License 6 votes vote down vote up
private void refreshSearchCriteria() 
{
	EDischargeSearchCriteriaVo voCriteria = form.getGlobalContext().getEDischargeSearchCriteria();
	
	form.cmbWard().setValue(domain.getWard(voCriteria.getWard()));
	form.cmbStatus().setValue(voCriteria.getStatus());
	form.cmbSpecialty().setValue(voCriteria.getSpecialty());
	form.dteFrom().setValue(voCriteria.getFromDate());
	form.dteTo().setValue(voCriteria.getToDate());
	form.chkDetailsComplete().setValue(voCriteria.getClinicaDetailsCompleteIsNotNull() && voCriteria.getClinicaDetailsComplete().equals(YesNo.YES) ? true :false);
			
	form.ccResponsibleHCP().setValue((IMos)voCriteria.getResponsibleHCP());

	form.cmbTTA().setValue(voCriteria.getTTAStatus());
	form.chkNoEmail().setValue(voCriteria.getNonCornish());
	
	initializeDynamicGrid();
	
	search();
}
 
Example 44
Project: openMAXIMS   File: Logic.java   Source Code and License 6 votes vote down vote up
private void populateScreenFromData(PlasticSurgeryAndBurnsVo voPlasticSurgeryAndBurns)
{
	clearInstanceControls();
	
	if (voPlasticSurgeryAndBurns == null)
		return;
	
	
	form.cmbAnaesthetic().setValue(voPlasticSurgeryAndBurns.getAnaestheticType());
	if(voPlasticSurgeryAndBurns.getSkinForStorageIsNotNull() && voPlasticSurgeryAndBurns.getSkinForStorage().equals(YesNo.YES))
		form.Group1().setValue(GenForm.Group1Enumeration.rdoSkinForStorageYes);
	else if(voPlasticSurgeryAndBurns.getSkinForStorageIsNotNull() && voPlasticSurgeryAndBurns.getSkinForStorage().equals(YesNo.NO))
		form.Group1().setValue(GenForm.Group1Enumeration.rdoSkinForStorageNo);
	form.dteFirstdressing().setValue(voPlasticSurgeryAndBurns.getScheduledFirstDressingDate());
	form.dteSutureremoval().setValue(voPlasticSurgeryAndBurns.getScheduledSutureRemoval());
	form.qmbSurgeon().newRow(voPlasticSurgeryAndBurns.getSurgeon(), voPlasticSurgeryAndBurns.getSurgeon().getIMosName());
	form.qmbSurgeon().setValue(voPlasticSurgeryAndBurns.getSurgeon());
	form.chkComplete().setValue(voPlasticSurgeryAndBurns.getIsComplete());
		
}
 
Example 45
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * WDEV-12907
 * Function used to populate Over45 field
 * @param required
 * @param isOver45 - value to be set; if it is <b>null</b> then it will default accordingly to patient age (Yes when age is over 45, No when age is at most 45)
 */
private void populateOver45(Boolean required, Boolean isOver45)
{
	YesNoCollection lookup = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());

	DynamicGridRow over45Row = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
	DynamicGridCell typeNameCell = over45Row.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
	typeNameCell.setBackColor(Color.Gray);
	typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	typeNameCell.setValue("<b><p align=center>Over 45</p></b>");

	DynamicGridCell typeValueCell = over45Row.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
	for (int i = 0; i < lookup.size(); i++)
	{
		typeValueCell.getItems().newItem(lookup.get(i), lookup.get(i).getText());
	}

	if (Boolean.TRUE.equals(required))
	{
		if (isOver45 != null)
		{
			typeValueCell.setValue(Boolean.TRUE.equals(isOver45) ? YesNo.YES : YesNo.NO);
		}
		else
		{
			if (form.getGlobalContext().Core.getPatientShort().getAgeIsNotNull())
			{
				typeValueCell.setValue(form.getGlobalContext().Core.getPatientShort().getAge().intValue() >= 45 ? YesNo.YES : YesNo.NO);
			}
		}
	}

	typeValueCell.setAutoPostBack(true);
	typeValueCell.setIdentifier(OVER45);
}
 
Example 46
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void addDoseRow(BrachyTxTreatmentDetailsVo dose) 
{
	if(dose == null)
		return;
	
	grdDosesRow row = form.lyrDetails().tabBrachytherapy().grdDoses().getRows().newRow();
	
	row.setColDate(dose.getTreatmentDate());
	row.setColDose(dose.getDose());
	row.setColAnaesthetic(YesNo.YES.equals(dose.getGeneralAnaesthetic()) ? true : false);
	row.setReadOnly(true);
	
	row.setValue(dose);
}
 
Example 47
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateTeletherapyTabFromData(TeletherapyDetailsVo teletherapyDetails)
{
	if(teletherapyDetails == null)
		return;
	
	populatePhaseDetails(teletherapyDetails.getPhaseDetails());
	
	form.lyrDetails().tabTeletherapy().intPrescriptionPoint().setValue(teletherapyDetails.getPerscriptionPoint());
	form.lyrDetails().tabTeletherapy().decActualDose().setValue(teletherapyDetails.getActualDose());
	form.lyrDetails().tabTeletherapy().intActualFractions().setValue(teletherapyDetails.getActualFractions());
	form.lyrDetails().tabTeletherapy().intNoofPhases().setValue(teletherapyDetails.getActualPhases());
	form.lyrDetails().tabTeletherapy().SupraclavicularDetails().setValue(YesNo.YES.equals(teletherapyDetails.getAnterior()) ? SupraclavicularDetailsEnumeration.rdoSDYes : (YesNo.NO.equals(teletherapyDetails.getAnterior()) ? SupraclavicularDetailsEnumeration.rdoSDNo : null));
	form.lyrDetails().tabTeletherapy().decDose().setValue(teletherapyDetails.getAnteriorDose());
	form.lyrDetails().tabTeletherapy().intFractions().setValue(teletherapyDetails.getAnteriorFractions());
	form.lyrDetails().tabTeletherapy().AdjacentFields().setValue(YesNo.YES.equals(teletherapyDetails.getHasAdjacentFields()) ? AdjacentFieldsEnumeration.rdoAFYes : (YesNo.NO.equals(teletherapyDetails.getHasAdjacentFields()) ? AdjacentFieldsEnumeration.rdoAFNo : null));
	
	populateAdjacentDetails(teletherapyDetails.getAdjacentFieldDetails());
	
	form.lyrDetails().tabTeletherapy().Retreatment().setValue(YesNo.YES.equals(teletherapyDetails.getRetreatment()) ? RetreatmentEnumeration.rdoRYes : (YesNo.NO.equals(teletherapyDetails.getRetreatment()) ? RetreatmentEnumeration.rdoRNo : null));
	form.lyrDetails().tabTeletherapy().Hyperfractionation().setValue(YesNo.YES.equals(teletherapyDetails.getHyperfractionation()) ? HyperfractionationEnumeration.rdoHYes : (YesNo.NO.equals(teletherapyDetails.getHyperfractionation()) ? HyperfractionationEnumeration.rdoHNo : null));
	form.lyrDetails().tabTeletherapy().cmbSpecialTechnique().setValue(teletherapyDetails.getSpecialTechnique());
	form.lyrDetails().tabTeletherapy().PreOperative().setValue(YesNo.YES.equals(teletherapyDetails.getPreoperative()) ? PreOperativeEnumeration.rdoPOYes : (YesNo.NO.equals(teletherapyDetails.getPreoperative()) ? PreOperativeEnumeration.rdoPONo : null));
	form.lyrDetails().tabTeletherapy().GeneralAnaesthetic().setValue(YesNo.YES.equals(teletherapyDetails.getGeneralAnaesthetic()) ? GeneralAnaestheticEnumeration.rdoGAYes : (YesNo.NO.equals(teletherapyDetails.getGeneralAnaesthetic()) ? GeneralAnaestheticEnumeration.rdoGANo : null));
	form.lyrDetails().tabTeletherapy().cmbRadiationType().setValue(teletherapyDetails.getBeamType());
	form.lyrDetails().tabTeletherapy().cmbBeamEnergy().setValue(teletherapyDetails.getBeamEnergy());
	form.lyrDetails().tabTeletherapy().cmbNoFields().setValue(teletherapyDetails.getNoOfFields());
	form.lyrDetails().tabTeletherapy().cmbPlanningComplexity().setValue(teletherapyDetails.getComplexityGroup());
	form.lyrDetails().tabTeletherapy().MultiplePlanning().setValue(YesNo.YES.equals(teletherapyDetails.getMultiplePlanning()) ? MultiplePlanningEnumeration.rdoMPYes : (YesNo.NO.equals(teletherapyDetails.getMultiplePlanning()) ? MultiplePlanningEnumeration.rdoMPNo : null));
}
 
Example 48
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateDetailsTabFromData(RadiotherapyDetailsVo record) 
{
	form.lyrDetails().tabDetails().cmbRadiotherapyType().setValue(record.getRadiotherapyType());
	form.lyrDetails().tabDetails().cmbHospital().setValue(record.getTreatingHospital());
	form.lyrDetails().tabDetails().customConsultant().setValue(record.getTreatingConsultant());
	form.lyrDetails().tabDetails().dteDecisionTreat().setValue(record.getDateDecisionToTreat());
	form.lyrDetails().tabDetails().cmbPerformance().setValue(record.getPerformanceStatusAtDDT());
	form.lyrDetails().tabDetails().cmbAnatomicalSite().setValue(record.getAnatomicalTreatmentSite());
	form.lyrDetails().tabDetails().cmbTreatIntent().setValue(record.getTreatementIntent());
	form.lyrDetails().tabDetails().decPrescribedDose().setValue(record.getPrescribedDose());
	form.lyrDetails().tabDetails().intPrescribedFractions().setValue(record.getPrescribedFractions());
	form.lyrDetails().tabDetails().intPrescribedDuration().setValue(record.getPrescribedDuration());
	form.lyrDetails().tabDetails().ConcurrentChemotherapy().setValue(YesNo.YES.equals(record.getConcurrentChemotherapy()) ? ConcurrentChemotherapyEnumeration.rdoCChemotherapyYes : (YesNo.NO.equals(record.getConcurrentChemotherapy()) ? ConcurrentChemotherapyEnumeration.rdoCChemotherapyNo : null));
	
	//form.lyrDetails().tabDetails().ccPrescribing().setValue(record.getAuthoringInformation());
	form.lyrDetails().tabDetails().ccPrescribingHCP().setValue(record.getPrescribingHCP());	//wdev-	13110	
	form.lyrDetails().tabDetails().dtePrescribing().setValue(record.getPrescribedDate());	//wdev-13110
	
	form.lyrDetails().tabDetails().dteStart().setValue(record.getStartDate());
	form.lyrDetails().tabDetails().dteEnd().setValue(record.getEndDate());
	form.lyrDetails().tabDetails().intDuration().setValue(updateActualDuration());
	
	form.lyrDetails().tabDetails().intTreatmentCategory().setValue(record.getTreatmentCategory());
	form.lyrDetails().tabDetails().cmbDiseaseStatus().setValue(record.getDiseaseStatus());
	comboDiseaseStatusValueChanged();	//wdev-12756
	form.lyrDetails().tabDetails().cmbDiseaseTreatment().setValue(record.getDiseaseTreatment());
	form.lyrDetails().tabDetails().cmbReason1().setValue(record.getReasonDelay1());
	form.lyrDetails().tabDetails().cmbReason2().setValue(record.getReasonDelay2());
	form.lyrDetails().tabDetails().cmbCourseStatus().setValue(record.getTreatmentCourseStatus());
}
 
Example 49
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void initializeDynamicGrdMotor()
{
	form.dynQuestions().clear();
	
	DynamicGridColumn column = form.dynQuestions().getColumns().newColumn("Questions", QUESTIONS_COLUMN);
	column.setWidth(350);
	column.setReadOnly(true);

	DynamicGridColumn column2 = form.dynQuestions().getColumns().newColumn("Answers", ANSWERS_COLUMN);
	column2.setWidth(-1);
	column2.setReadOnly(false);
	
	AdmissionQuestionCollection admQuestions = new AdmissionQuestionCollection();
	admQuestions = LookupHelper.getAdmissionQuestion(domain.getLookupService());
	
	for (int i = 0; i < admQuestions.size(); i++)
	{
		AdmissionQuestion ar = admQuestions.get(i);
		DynamicGridRow row = form.dynQuestions().getRows().newRow();
		row.setValue(ar);
		row.setSelectable(false);
		
		DynamicGridCell cell = row.getCells().newCell(getColumn(QUESTIONS_COLUMN), DynamicCellType.WRAPTEXT);
		cell.setValue(ar.getText());
		cell.setTooltip(ar.getText());
		cell.setAutoPostBack(false);
		cell.setReadOnly(true);
		 
		DynamicGridCell cell2 = row.getCells().newCell(getColumn(ANSWERS_COLUMN), DynamicCellType.ANSWER);
		cell2.getItems().newItem(YesNo.NO,YesNo.NO.getImage());
		cell2.getItems().newItem(YesNo.YES,YesNo.YES.getImage());
		cell2.setValue(null);
		cell2.setAutoPostBack(false);			
		}		
	
}
 
Example 50
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateFamilySupportGrid()
{
	SupportNetworkFamilyCollection voCollFamily = domain.listSupportNetworkFamily(Boolean.TRUE, form.getGlobalContext().Core.getPatientShort());
	form.getLocalContext().setvoFamilySupportColl(voCollFamily);
	form.getLocalContext().setvoFamilySupportRemovedColl(new SupportNetworkFamilyCollection());
	
	SupportNetworkFamily voFamily = null;

	GenForm.grdFamilyRow row = null;
	if (voCollFamily == null)
		return;

	for (int i = 0; i < voCollFamily.size(); i++)
	{
		voFamily = voCollFamily.get(i);
		row = form.grdFamily().getRows().newRow();
		row.setColName(voFamily.getCarerName());
		row.setColContact(voFamily.getCarerHomePhone());
		
		if (voFamily.getCarerRelationship() != null)
			row.setColRelationship(voFamily.getCarerRelationship());
		 
			
		if (voFamily.getDiscussProgress() == null)
			row.setColProgress(YesNo.NO);				
		else if (voFamily.getDiscussProgress().equals(Boolean.FALSE))
			row.setColProgress(YesNo.NO);
		else if (voFamily.getDiscussProgress().equals(Boolean.TRUE))
			row.setColProgress(YesNo.YES);

		row.setValue(voFamily);
	}
}
 
Example 51
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void ansBoxValueChanged()
{
	if(form.ansYesNo().getValue() != null)
	{
		if(form.ansYesNo().getValue().equals(YesNo.YES))
		{
			form.cmbTemplates().setVisible(false);
			form.lblLayout().setVisible(false);
			form.grdLayouts().setEnabled(true);
			form.grdLayouts().setReadOnly(false);
			form.grdLayouts().setVisible(true);
			form.getContextMenus().Core.getWardBayConfigDialogADDItem().setVisible(true);
		}
		else if(form.ansYesNo().getValue().equals(YesNo.NO))
		{
			form.grdLayouts().setVisible(false);
			form.cmbTemplates().setVisible(true);
			form.lblLayout().setVisible(true);
		}
	}
	else
	{
		form.grdLayouts().setVisible(false);
		form.cmbTemplates().setVisible(false);
		form.lblLayout().setVisible(false);
	}
}
 
Example 52
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void activateTNM()
{
	if (form.lyrConfig().tabTNM().lyrTNM().tabTNMValues().dynTNM().getSelectedRow() == null)
		return;

	DynamicGridRow rowSelected = form.lyrConfig().tabTNM().lyrTNM().tabTNMValues().dynTNM().getSelectedRow();

	if (!form.lyrConfig().tabTNM().chkActiveTNM().getValue())
		rowSelected.getCells().get(getColumn(COLACTIVE)).setValue(YesNo.YES);

	rowSelected.setBackColor(Color.Default);
	
	//WDEV-17680
	if (rowSelected.getValue() instanceof TumourGroupSiteTNMValueVo && ((TumourGroupSiteTNMValueVo)rowSelected.getValue()).getID_TumourGroupSiteTNMValue() == null)
	{
		rowSelected.setReadOnly(false);
	}
	else
		rowSelected.setReadOnly(true);
	
	Object value = form.lyrConfig().tabTNM().lyrTNM().tabTNMValues().dynTNM().getSelectedRow().getValue();
	rowSelected.setValue(value);

	if (value instanceof TumourGroupSiteTNMValueVo)
	{
		TumourGroupSiteTNMValueVo vo = (TumourGroupSiteTNMValueVo) value;
		vo.setIsActive(Boolean.TRUE);
	}

	// rowSelected.setTooltip("This record was marked as inactive!");
}
 
Example 53
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean returnTypeOfRecord()
{
	DynamicGridRow rowSelected = form.lyrConfig().tabTNM().lyrTNM().tabTNMValues().dynTNM().getSelectedRow();

	if ((!form.lyrConfig().tabTNM().chkActiveTNM().getValue() && rowSelected.getCells().get(getColumn(COLACTIVE)).getValue().equals(YesNo.NO)) || (form.lyrConfig().tabTNM().chkActiveTNM().getValue() && !((TumourGroupSiteTNMValueVo) rowSelected.getValue()).getIsActive()))
	{
		return true;
	}

	return false;
}
 
Example 54
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateStatus(DynamicGridCell cellStatus) 
{
	cellStatus.getItems().newItem(YesNo.NO,YesNo.NO.getImage());
	cellStatus.getItems().newItem(YesNo.YES,YesNo.YES.getImage());
	cellStatus.setValue(null);
	cellStatus.setAutoPostBack(false);			
}
 
Example 55
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
@Override
protected void onCmbChartRequestedByReceptionValueChanged() throws PresentationLogicException
{
	if (YesNo.YES.equals(form.cmbChartRequestedByReception().getValue()))
			form.dtimDateTimeRequested().setValue(new DateTime());
	updateControlState();
}
 
Example 56
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
/**
 * Function used to populate phases to grid
 */
private void listICPStages(ICPStageListVoCollection stages)
{
	// Clear grid
	form.grdStages().getRows().clear();
	
	if (stages == null || stages.size() == 0)
	{
		engine.showMessage("No search results were found"); //WDEV-18046 
		return;
	}
	
	for (ICPStageListVo stage : stages)
	{
		grdStagesRow row = form.grdStages().getRows().newRow();
		
		row.setColStage(stage.getName());
		row.setTooltipForColStage(stage.getName());
		
		row.setColDescription(stage.getDescription());
		//WDEV-17155
		row.setTooltipForColDescription(Boolean.TRUE.equals(stage.getDescriptionIsNotNull()) ? stage.getDescription() : "");
		
		row.setColPhases(Boolean.TRUE.equals(stage.getHasPhase()) ? YesNo.YES : YesNo.NO);
		row.setColStatus(stage.getStatus());
		
		row.setColICP(stage.getICPName());
		row.setTooltipForColICP(stage.getICPName());
		
		row.setValue(stage);
	}
}
 
Example 57
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private boolean validateData() 
{
	StringBuffer sb = new StringBuffer();
	if (form.lyrDetail().tabOnwardReferral().ansComplete().getValue() != null
		&& form.lyrDetail().tabOnwardReferral().ansComplete().getValue().equals(YesNo.YES))
	{
		if (form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().getValue() == null)
			sb.append("'Secondary Care Provider' is mandatory.\n\n");

		if (form.lyrDetail().tabOnwardReferral().dtimReferred().getValue() == null)
			sb.append("'Onward Referral Date and Time' is mandatory.\n\n");
	}	
	
	if (form.lyrDetail().tabOnwardReferral().ansAgree().getValue() != null
		&& form.lyrDetail().tabOnwardReferral().ansAgree().getValue().equals(YesNo.NO))
	{
		if (form.lyrDetail().tabOnwardReferral().txtOnwardNotes().getValue() == null)
			sb.append("Notes are required when 'Agree With Decision' is NO.\n\n");
	}
	if (sb.length() > 0)
	{
		engine.showMessage(sb.toString());
		return false;
	}

	return true;
}
 
Example 58
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateOnwardReferralTabFromData(OnwardReferralFromTriageVo voOnwardReferral)
{
	clearOnwardReferralControls();
	
	if(voOnwardReferral == null)
		return;
	
	form.getLocalContext().setOnwardReferral(voOnwardReferral);
	form.lyrDetail().tabOnwardReferral().setHeaderVisible(true);

	form.lyrDetail().tabOnwardReferral().ansAgree().setValue(voOnwardReferral.getAgreeWithDecision());
	form.lyrDetail().tabOnwardReferral().ansRequestedByGP().setValue(voOnwardReferral.getRequestedByGP());
	form.lyrDetail().tabOnwardReferral().cmbReferredInto().setValue(voOnwardReferral.getServiceReferredInto());
	form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().setValue(voOnwardReferral.getSecondaryCareProvider());
	form.lyrDetail().tabOnwardReferral().dtimReferred().setValue(voOnwardReferral.getReferredDate());
	form.lyrDetail().tabOnwardReferral().txtOnwardNotes().setValue(voOnwardReferral.getNotes());
	form.lyrDetail().tabOnwardReferral().ansComplete().setValue(voOnwardReferral.getReferralComplete());
	
	form.lyrDetail().tabOnwardReferral().btnRemove().setVisible(false);
	if (voOnwardReferral.getReferralCompleteIsNotNull()
		&& voOnwardReferral.getReferralComplete().equals(YesNo.YES)
		&& form.getLocalContext().getSelectedRecordIsNotNull()
		&& form.getLocalContext().getSelectedRecord().getIsOnwardReferralTriageIsNotNull()
		&& form.getLocalContext().getSelectedRecord().getIsOnwardReferralTriage())
	{
		//if the IsOnwardReferralTriage is true in memory, double check with a domain call, cos could have been removed from worklist by another user
		form.getLocalContext().setSelectedRecord(domain.getCatsReferral(form.getGlobalContext().RefMan.getCatsReferral()));
		if( form.getLocalContext().getSelectedRecordIsNotNull()
			&& form.getLocalContext().getSelectedRecord().getIsOnwardReferralTriageIsNotNull()
			&& form.getLocalContext().getSelectedRecord().getIsOnwardReferralTriage())
			form.lyrDetail().tabOnwardReferral().btnRemove().setVisible(true);
	}
}
 
Example 59
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void updateMantaoryFields() 
{
	form.lyrDetail().tabOnwardReferral().dtimReferred().setRequired(false);
	form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().setRequired(false);
	if (form.lyrDetail().tabOnwardReferral().ansComplete().getValue() != null
		&& form.lyrDetail().tabOnwardReferral().ansComplete().getValue().equals(YesNo.YES))
	{
		form.lyrDetail().tabOnwardReferral().dtimReferred().setRequired(true);
		form.lyrDetail().tabOnwardReferral().cmbSecondaryCareProvider().setRequired(true);
	}
	form.lyrDetail().tabOnwardReferral().txtOnwardNotes().setRequired(false);
	if (form.lyrDetail().tabOnwardReferral().ansAgree().getValue() != null
		&& form.lyrDetail().tabOnwardReferral().ansAgree().getValue().equals(YesNo.NO))
		form.lyrDetail().tabOnwardReferral().txtOnwardNotes().setRequired(true);
}
 
Example 60
Project: AvoinApotti   File: Logic.java   Source Code and License 5 votes vote down vote up
private void populateInstanceControls(PatientDiagnosisEDischargeVo voPatDiag)
{
	clearInstanceControls();

	form.ctnDetails().ccClinicalTerm().setValue(voPatDiag);

	form.ctnDetails().cmbLaterality().setValue(voPatDiag.getDiagLateralityIsNotNull() ? voPatDiag.getDiagLaterality() : null);
	form.ctnDetails().txtSite().setValue(voPatDiag.getSiteTextIsNotNull() ? voPatDiag.getSiteText() : "");
	form.ctnDetails().dteOnset().setValue(voPatDiag.getDateOnsetIsNotNull() ? voPatDiag.getDateOnset() : null);
	form.ctnDetails().chkComplication().setValue(voPatDiag.getIsComplicationIsNotNull() ? voPatDiag.getIsComplication().booleanValue() : false);
	form.ctnDetails().chkPRD().setValue(voPatDiag.getIsPrevRelevantDiagnosisIsNotNull() ? voPatDiag.getIsPrevRelevantDiagnosis().booleanValue() : false);// wdev-3256

	form.ctnDetails().ccAuthoring().setValue(voPatDiag.getAuthoringInfo());

	form.ctnDetails().cmbCoMorb().setValue(voPatDiag.getIsComorbidityIsNotNull() && voPatDiag.getIsComorbidity().booleanValue() ? YesNo.YES : YesNo.NO);

	form.ctnDetails().chkPrimaryDiagnosis().setValue(false);
	if (voPatDiag.getPrimaryForCareSpellsIsNotNull())
	{
		for (int i = 0; i < voPatDiag.getPrimaryForCareSpells().size(); i++)
		{
			if ((voPatDiag.getPrimaryForCareSpells().get(i).getCareContextIsNotNull()) 
				&& (voPatDiag.getPrimaryForCareSpells().get(i).getCareContext().getEpisodeOfCareIsNotNull()) && (form.getGlobalContext().Core.getCurrentCareContextIsNotNull()) && (form.getGlobalContext().Core.getCurrentCareContext().getEpisodeOfCareIsNotNull()) && (voPatDiag.getPrimaryForCareSpells().get(i).getCareContext().getEpisodeOfCare().getID_EpisodeOfCare().equals(form.getGlobalContext().Core.getCurrentCareContext().getEpisodeOfCare().getID_EpisodeOfCare())))
				form.ctnDetails().chkPrimaryDiagnosis().setValue(true);
		}
	}

	form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag);

	updateContextMenus();
}