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();
		}
	}
	
}