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

The following are top voted examples for showing how to use ims.core.vo.lookups.YesNoUnknown. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onGrdTreatmentGridComboBoxSelectionChanged(int column, grdTreatmentRow row, Object value) throws PresentationLogicException
{
	// Modify column index for tried if the grid gets changed
	final int COL_TRIED_INDEX = 1;
	
	if ((column == COL_TRIED_INDEX && value == null) || (value != null && (value.equals(YesNoUnknown.NO) || value.equals(YesNoUnknown.UNKNOWN))))
	{
		row.setcolScore(null);
	}
	
	if (column == COL_TRIED_INDEX && value == null)
	{
		row.setcolDetails(null);
	}
	
	row.setcolScoreReadOnly((value != null && (value.equals(YesNoUnknown.NO) || value.equals(YesNoUnknown.UNKNOWN))) || (column == COL_TRIED_INDEX && value == null));
	row.setcolDetailsReadOnly(column == COL_TRIED_INDEX && value == null);
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onCmbAdviceLitGivenValueChanged() throws PresentationLogicException
{
	if (form.cmbAdviceLitGiven().getValue() != null)
	{
		if (form.cmbAdviceLitGiven().getValue().equals(YesNoUnknown.YES))
			form.grdLeafletsGiven().setReadOnly(!form.getMode().equals(FormMode.EDIT));
		else
		{
			clearLeafletsGrid();
			form.grdLeafletsGiven().setReadOnly(true);
		}
	}
	else
	{
		clearLeafletsGrid();
		form.grdLeafletsGiven().setReadOnly(true);
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void populateSummaryInformation()
{		
	CareContextShortVo currentCareContext = form.getGlobalContext().Core.getCurrentCareContext();
	if(currentCareContext == null)
		return;
	
	if(currentCareContext.getStartDateTimeIsNotNull() && currentCareContext.getStartDateTime().getDate() != null)
		form.dteCurrentAdmissionDate().setValue(currentCareContext.getStartDateTime().getDate());
	
	AdmisSummary summary = domain.getAdmissionSummary(currentCareContext);
	if(summary != null)
	{
		form.txtClassification1().setValue(summary.getOverallNeuro());
		form.txtClassification1().setValue(summary.getCompleteIncomplete());
		
		if(summary.getDateOfInjuryIsNotNull())
			form.txtDateOfInjury().setValue(summary.getDateOfInjury().toString());
		
		form.txtCause().setValue(summary.getCauseOfInjury());			
		form.dteFirstAdmission().setValue(summary.getFirstAdmissionDate());
						
		if(summary.getMRSAStatusIsNotNull())
			form.ansMRSAStatus().setValue(summary.getMRSAStatus().booleanValue() ? YesNoUnknown.YES : YesNoUnknown.NO); 			
	}	
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnsPropertyBookCompletedValueChanged()	throws PresentationLogicException 
{
	if(form.getMode().equals(FormMode.EDIT))
	{
		if(YesNoUnknown.NO.equals(form.ansPropertyBookCompleted().getValue()))
		{
			form.txtSerialNumber().setEnabled(false);
			form.txtSerialNumber().setValue(null);
		}
		else
		{
			form.txtSerialNumber().setEnabled(true);
		}
	}
	
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onCopyPrevAssessmentValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
	if (form.getLocalContext().getPrevAssessBreath() == null)
		return;
	
	form.getLocalContext().getPrevAssessBreath().setIsComplete(new Boolean(false));			//???????????
	form.getLocalContext().getPrevAssessBreath().setCarePlanTemplate(null);
	populateInstanceControl(form.getLocalContext().getPrevAssessBreath());
	form.chkCopyPrev().setValue(true);
	form.chkCopyPrev().setEnabled(false);
	
	if (form.ansDifficulty().getValue() != null)
	{
		if (form.ansDifficulty().getValue().equals(YesNoUnknown.YES))
			form.gridDyspnoea().setReadOnly(false);
	}
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnsSputumValueChanged() throws PresentationLogicException 
{
	  if(form.ansSputum().getValue() != null && form.ansSputum().getValue().equals(YesNoUnknown.YES))
	  {
		  form.gridSputum().setReadOnly(false);
		  form.comboBoxSputum().setEnabled(true);
	  }
	  else
	  {
		for(int i=0; i< form.gridSputum().getRows().size();i++)
		{
			form.gridSputum().getRows().get(i).setColSelected(false);
		}
	    
		form.gridSputum().setReadOnly(true);
		form.comboBoxSputum().setValue(null);
		form.comboBoxSputum().setEnabled(false);
	  }
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnsDifficultyValueChanged() throws PresentationLogicException
{
	if(form.ansDifficulty().getValue() == null || !form.ansDifficulty().getValue().equals(YesNoUnknown.YES))
	{
		for(int i = 0; i < form.gridDyspnoea().getRows().size(); i++)
			form.gridDyspnoea().getRows().get(i).setColSelected(false);
		
		form.gridDyspnoea().setReadOnly(true);
		form.comboBoxDyspnoea().setValue(null);
		form.comboBoxDyspnoea().setEnabled(false);
	}
	else
	{
		form.gridDyspnoea().setReadOnly(false);
		form.comboBoxDyspnoea().setEnabled(true);
	}
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void beliefOrFaith() 
{
	if(form.answerBoxBeliefOrFaith().getValue() == null || !form.answerBoxBeliefOrFaith().getValue().equals(YesNoUnknown.YES))
	{
		form.answerBoxContinuePracticing().setValue(null);
		form.answerBoxPracticingMember().setValue(null);

		if (form.getMode().equals(FormMode.EDIT))
		{
			form.answerBoxContinuePracticing().setEnabled(false);
			form.answerBoxPracticingMember().setEnabled(false);
		}
	}
	else
	{
		if (form.getMode().equals(FormMode.EDIT))
		{
			form.answerBoxContinuePracticing().setEnabled(true);
			form.answerBoxPracticingMember().setEnabled(true);
		}
	}
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnsMedValueChanged() throws PresentationLogicException 
{
	if(form.ansMed().getValue() != null && form.ansMed().getValue().equals(YesNoUnknown.YES))
	{
		form.bAdd().setEnabled(true);
	}
	else
	{
		if(form.gMed().getRows().size() > 0)
		{
			engine.showMessage("Please remove all medications from grid.");
			form.ansMed().setValue(YesNoUnknown.YES);
			form.bAdd().setEnabled(true);
			return;
		}
		form.bAdd().setEnabled(false);
	}
}
 
Example 10
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
private void checkLaxatives()
{
	if (form.container1().gridMedication().getRows().size() > 0)
	{
		if (form.container1().answerBoxLaxatives().getValue() != null && !form.container1().answerBoxLaxatives().getValue().equals(YesNoUnknown.YES))
		{
			if ((form.container1().answerBoxProneToCons().getValue() == null && form.container1().answerBoxProneDiarr().getValue() == null)   ||
			 	(form.container1().answerBoxProneToCons().getValue() != null && !form.container1().answerBoxProneToCons().getValue().equals(YesNoUnknown.YES)) &&
			  	(form.container1().answerBoxProneDiarr().getValue() != null && !form.container1().answerBoxProneDiarr().getValue().equals(YesNoUnknown.YES)))
			{
				engine.showMessage("Cannot set to No or Unknown as a medication record exists.");
				form.container1().answerBoxLaxatives().setValue(YesNoUnknown.YES);
				return;
			}
		}
	}

	enableNewMedication();
}
 
Example 11
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnswerBoxProneToConsValueChanged() throws PresentationLogicException 
{
	if (form.container1().gridMedication().getRows().size() > 0)
	{
		if (form.container1().answerBoxProneToCons().getValue() != null && !form.container1().answerBoxProneToCons().getValue().equals(YesNoUnknown.YES))
		{
			if ((form.container1().answerBoxProneDiarr().getValue() == null && form.container1().answerBoxLaxatives().getValue() == null)   ||
				(form.container1().answerBoxProneDiarr().getValue() != null && !form.container1().answerBoxProneDiarr().getValue().equals(YesNoUnknown.YES)) &&
				(form.container1().answerBoxLaxatives().getValue() != null && !form.container1().answerBoxLaxatives().getValue().equals(YesNoUnknown.YES)))
			{
				engine.showMessage("Cannot set to No or Unknown as a medication record exists.");
				form.container1().answerBoxProneToCons().setValue(YesNoUnknown.YES);
				return;
			}
		} 
	}
	enableNewMedication();
		
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnswerBoxDrinkSociallyValueChanged() throws PresentationLogicException
{
	if(form.answerBoxDrinkSocially().getValue() == null || !form.answerBoxDrinkSocially().getValue().equals(YesNoUnknown.YES))
	{
		form.intBoxUnits().setValue(null);
		form.intBoxUnits().setEnabled(false);
	}
	else
		form.intBoxUnits().setEnabled(true);
	
	if(form.getLocalContext().getAssessLeisure() != null)
	{
		if(form.getLocalContext().getAssessLeisure().getIsComplete().booleanValue() == true)
			form.intBoxUnits().setEnabled(false);
	}	
	
}
 
Example 13
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnswerBoxTakeMedsValueChanged() throws PresentationLogicException 
{
	//27/08/04 - Enable AddMedicine button if checked 
	if(form.answerBoxTakeMeds().getValue() != null && form.answerBoxTakeMeds().getValue().equals(YesNoUnknown.YES))
	{
		form.bPainRelief().setEnabled(true);
	}
	else
	{
		if(form.gridPainRelief().getRows().size() > 0)
		{
			engine.showMessage("Please remove all medications from grid.");
			form.answerBoxTakeMeds().setValue(YesNoUnknown.YES);
			form.bPainRelief().setEnabled(true);
			return;
		}
		form.bPainRelief().setEnabled(false);
	}
}
 
Example 14
Project: AvoinApotti   File: Logic.java   View source code 6 votes vote down vote up
/**
 * sets the age of death control enabled status
 * @return      void
 */
private void setAgeDeathEnableStatus() 
{
	if (form.getMode().equals(FormMode.EDIT))
	{
		if ((form.ctnFamilyHistory().cbLiving().getValue() != null) && (form.ctnFamilyHistory().cbLiving().getValue().equals(YesNoUnknown.YES)))
		{
			form.ctnFamilyHistory().intAgeDeath().setEnabled(false);
			form.ctnFamilyHistory().intAgeDeath().setValue(null);
			form.ctnFamilyHistory().intAgeDeath().setRequired(false); //wdev-13396
		}
		else if((form.ctnFamilyHistory().cbLiving().getValue() != null) && (form.ctnFamilyHistory().cbLiving().getValue().equals(YesNoUnknown.NO))) //wdev-13396 
		{
			form.ctnFamilyHistory().intAgeDeath().setEnabled(true);
			form.ctnFamilyHistory().intAgeDeath().setRequired(true);
		}
		else
		{
			form.ctnFamilyHistory().intAgeDeath().setEnabled(false);  //wdev-15365
			
			form.ctnFamilyHistory().intAgeDeath().setValue(null);	  //wdev-15365
			form.ctnFamilyHistory().intAgeDeath().setRequired(false); //wdev-13396
		}
	}	
}
 
Example 15
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onGrdTreatmentGridComboBoxSelectionChanged(int column, grdTreatmentRow row, Object value) throws PresentationLogicException
{
	// Modify column index for tried if the grid gets changed
	final int COL_TRIED_INDEX = 1;
	
	if ((column == COL_TRIED_INDEX && value == null) || (value != null && (value.equals(YesNoUnknown.NO) || value.equals(YesNoUnknown.UNKNOWN))))
	{
		row.setcolScore(null);
	}
	
	if (column == COL_TRIED_INDEX && value == null)
	{
		row.setcolDetails(null);
	}
	
	row.setcolScoreReadOnly((value != null && (value.equals(YesNoUnknown.NO) || value.equals(YesNoUnknown.UNKNOWN))) || (column == COL_TRIED_INDEX && value == null));
	row.setcolDetailsReadOnly(column == COL_TRIED_INDEX && value == null);
}
 
Example 16
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onCmbAdviceLitGivenValueChanged() throws PresentationLogicException
{
	if (form.cmbAdviceLitGiven().getValue() != null)
	{
		if (form.cmbAdviceLitGiven().getValue().equals(YesNoUnknown.YES))
			form.grdLeafletsGiven().setReadOnly(!form.getMode().equals(FormMode.EDIT));
		else
		{
			clearLeafletsGrid();
			form.grdLeafletsGiven().setReadOnly(true);
		}
	}
	else
	{
		clearLeafletsGrid();
		form.grdLeafletsGiven().setReadOnly(true);
	}
}
 
Example 17
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateSummaryInformation()
{		
	CareContextShortVo currentCareContext = form.getGlobalContext().Core.getCurrentCareContext();
	if(currentCareContext == null)
		return;
	
	if(currentCareContext.getStartDateTimeIsNotNull() && currentCareContext.getStartDateTime().getDate() != null)
		form.dteCurrentAdmissionDate().setValue(currentCareContext.getStartDateTime().getDate());
	
	AdmisSummary summary = domain.getAdmissionSummary(currentCareContext);
	if(summary != null)
	{
		form.txtClassification1().setValue(summary.getOverallNeuro());
		form.txtClassification1().setValue(summary.getCompleteIncomplete());
		
		if(summary.getDateOfInjuryIsNotNull())
			form.txtDateOfInjury().setValue(summary.getDateOfInjury().toString());
		
		form.txtCause().setValue(summary.getCauseOfInjury());			
		form.dteFirstAdmission().setValue(summary.getFirstAdmissionDate());
						
		if(summary.getMRSAStatusIsNotNull())
			form.ansMRSAStatus().setValue(summary.getMRSAStatus().booleanValue() ? YesNoUnknown.YES : YesNoUnknown.NO); 			
	}	
}
 
Example 18
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnsPropertyBookCompletedValueChanged()	throws PresentationLogicException 
{
	if(form.getMode().equals(FormMode.EDIT))
	{
		if(YesNoUnknown.NO.equals(form.ansPropertyBookCompleted().getValue()))
		{
			form.txtSerialNumber().setEnabled(false);
			form.txtSerialNumber().setValue(null);
		}
		else
		{
			form.txtSerialNumber().setEnabled(true);
		}
	}
	
}
 
Example 19
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnsSputumValueChanged() throws PresentationLogicException 
{
	  if(form.ansSputum().getValue() != null && form.ansSputum().getValue().equals(YesNoUnknown.YES))
	  {
		  form.gridSputum().setReadOnly(false);
		  form.comboBoxSputum().setEnabled(true);
	  }
	  else
	  {
		for(int i=0; i< form.gridSputum().getRows().size();i++)
		{
			form.gridSputum().getRows().get(i).setColSelected(false);
		}
	    
		form.gridSputum().setReadOnly(true);
		form.comboBoxSputum().setValue(null);
		form.comboBoxSputum().setEnabled(false);
	  }
}
 
Example 20
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnsDifficultyValueChanged() throws PresentationLogicException
{
	if(form.ansDifficulty().getValue() == null || !form.ansDifficulty().getValue().equals(YesNoUnknown.YES))
	{
		for(int i = 0; i < form.gridDyspnoea().getRows().size(); i++)
			form.gridDyspnoea().getRows().get(i).setColSelected(false);
		
		form.gridDyspnoea().setReadOnly(true);
		form.comboBoxDyspnoea().setValue(null);
		form.comboBoxDyspnoea().setEnabled(false);
	}
	else
	{
		form.gridDyspnoea().setReadOnly(false);
		form.comboBoxDyspnoea().setEnabled(true);
	}
}
 
Example 21
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void beliefOrFaith() 
{
	if(form.answerBoxBeliefOrFaith().getValue() == null || !form.answerBoxBeliefOrFaith().getValue().equals(YesNoUnknown.YES))
	{
		form.answerBoxContinuePracticing().setValue(null);
		form.answerBoxPracticingMember().setValue(null);

		if (form.getMode().equals(FormMode.EDIT))
		{
			form.answerBoxContinuePracticing().setEnabled(false);
			form.answerBoxPracticingMember().setEnabled(false);
		}
	}
	else
	{
		if (form.getMode().equals(FormMode.EDIT))
		{
			form.answerBoxContinuePracticing().setEnabled(true);
			form.answerBoxPracticingMember().setEnabled(true);
		}
	}
}
 
Example 22
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnsMedValueChanged() throws PresentationLogicException 
{
	if(form.ansMed().getValue() != null && form.ansMed().getValue().equals(YesNoUnknown.YES))
	{
		form.bAdd().setEnabled(true);
	}
	else
	{
		if(form.gMed().getRows().size() > 0)
		{
			engine.showMessage("Please remove all medications from grid.");
			form.ansMed().setValue(YesNoUnknown.YES);
			form.bAdd().setEnabled(true);
			return;
		}
		form.bAdd().setEnabled(false);
	}
}
 
Example 23
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void checkLaxatives()
{
	if (form.container1().gridMedication().getRows().size() > 0)
	{
		if (form.container1().answerBoxLaxatives().getValue() != null && !form.container1().answerBoxLaxatives().getValue().equals(YesNoUnknown.YES))
		{
			if ((form.container1().answerBoxProneToCons().getValue() == null && form.container1().answerBoxProneDiarr().getValue() == null)   ||
			 	(form.container1().answerBoxProneToCons().getValue() != null && !form.container1().answerBoxProneToCons().getValue().equals(YesNoUnknown.YES)) &&
			  	(form.container1().answerBoxProneDiarr().getValue() != null && !form.container1().answerBoxProneDiarr().getValue().equals(YesNoUnknown.YES)))
			{
				engine.showMessage("Cannot set to No or Unknown as a medication record exists.");
				form.container1().answerBoxLaxatives().setValue(YesNoUnknown.YES);
				return;
			}
		}
	}

	enableNewMedication();
}
 
Example 24
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnswerBoxTakeMedsValueChanged() throws PresentationLogicException 
{
	//27/08/04 - Enable AddMedicine button if checked 
	if(form.answerBoxTakeMeds().getValue() != null && form.answerBoxTakeMeds().getValue().equals(YesNoUnknown.YES))
	{
		form.bPainRelief().setEnabled(true);
	}
	else
	{
		if(form.gridPainRelief().getRows().size() > 0)
		{
			engine.showMessage("Please remove all medications from grid.");
			form.answerBoxTakeMeds().setValue(YesNoUnknown.YES);
			form.bPainRelief().setEnabled(true);
			return;
		}
		form.bPainRelief().setEnabled(false);
	}
}
 
Example 25
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnswerBoxTakeMedsValueChanged() throws PresentationLogicException 
{
	//27/08/04 - Enable AddMedicine button if checked 
	if(form.answerBoxTakeMeds().getValue() != null && form.answerBoxTakeMeds().getValue().equals(YesNoUnknown.YES))
	{
		form.bPainRelief().setEnabled(true);
	}
	else
	{
		if(form.gridPainRelief().getRows().size() > 0)
		{
			engine.showMessage("Please remove all medications from grid.");
			form.answerBoxTakeMeds().setValue(YesNoUnknown.YES);
			form.bPainRelief().setEnabled(true);
			return;
		}
		form.bPainRelief().setEnabled(false);
	}
}
 
Example 26
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void beliefOrFaith() 
{
	if(form.answerBoxBeliefOrFaith().getValue() == null || !form.answerBoxBeliefOrFaith().getValue().equals(YesNoUnknown.YES))
	{
		form.answerBoxContinuePracticing().setValue(null);
		form.answerBoxPracticingMember().setValue(null);

		if (form.getMode().equals(FormMode.EDIT))
		{
			form.answerBoxContinuePracticing().setEnabled(false);
			form.answerBoxPracticingMember().setEnabled(false);
		}
	}
	else
	{
		if (form.getMode().equals(FormMode.EDIT))
		{
			form.answerBoxContinuePracticing().setEnabled(true);
			form.answerBoxPracticingMember().setEnabled(true);
		}
	}
}
 
Example 27
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private String[] validateUI(NAESReferralVo referral)
{
	String[] valErrors = null;
	List<String> errors = new ArrayList<String>();

	if (referral.getInterpreterRequired() != null)
	{
		if (referral.getInterpreterRequired().equals(YesNoUnknown.YES) && referral.getLanguage() == null)
		{
			errors.add("Please select a language for which an interpreter is required.");
		}
	}

	return valErrors = errors.toArray(new String[0]);

}
 
Example 28
Project: openmaxims-linux   File: Logic.java   View source code 6 votes vote down vote up
private void checkLaxatives()
{
	if (form.container1().gridMedication().getRows().size() > 0)
	{
		if (form.container1().answerBoxLaxatives().getValue() != null && !form.container1().answerBoxLaxatives().getValue().equals(YesNoUnknown.YES))
		{
			if ((form.container1().answerBoxProneToCons().getValue() == null && form.container1().answerBoxProneDiarr().getValue() == null)   ||
			 	(form.container1().answerBoxProneToCons().getValue() != null && !form.container1().answerBoxProneToCons().getValue().equals(YesNoUnknown.YES)) &&
			  	(form.container1().answerBoxProneDiarr().getValue() != null && !form.container1().answerBoxProneDiarr().getValue().equals(YesNoUnknown.YES)))
			{
				engine.showMessage("Cannot set to No or Unknown as a medication record exists.");
				form.container1().answerBoxLaxatives().setValue(YesNoUnknown.YES);
				return;
			}
		}
	}

	enableNewMedication();
}
 
Example 29
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateEndoscopyTabFromPreassessment(PreAssessmentOutcomeForElectiveListDetailsVo preAssessmentOutcome)
{
	if(preAssessmentOutcome == null)
		return;
	
	form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().chkPacemakerDefibrilatorEndoscopy().setValue(getPacemakerDefibrilatorValueFromPreassessment(preAssessmentOutcome.getPaceMakerDefib()));
	
	if(YesNoUnknown.YES.equals(preAssessmentOutcome.getReceivingAntiCoag()))
		form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().GroupAnticoagulantReceiving().setValue(GroupAnticoagulantReceivingEnumeration.rdoYesAnticoagulantReceiving);
	else if(YesNoUnknown.NO.equals(preAssessmentOutcome.getReceivingAntiCoag()))
		form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().GroupAnticoagulantReceiving().setValue(GroupAnticoagulantReceivingEnumeration.rdoNoAnticoagulantReceiving);
	else if(YesNoUnknown.UNKNOWN.equals(preAssessmentOutcome.getReceivingAntiCoag()))
		form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().GroupAnticoagulantReceiving().setValue(GroupAnticoagulantReceivingEnumeration.rdoUnknownAnticoagulantReceiving);
	
	form.ctnDetails().lyrWaitingListDetails().tabPageEndoscopy().GroupGeneralAnaesthetic().setValue(getGeneralAnaestheticValueFromPreassessment(preAssessmentOutcome.getAnaestheticType()));
}
 
Example 30
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
/**
 * sets the age of death control enabled status
 * @return      void
 */
private void setAgeDeathEnableStatus() 
{
	if (form.getMode().equals(FormMode.EDIT))
	{
		if ((form.ctnFamilyHistory().cbLiving().getValue() != null) && (form.ctnFamilyHistory().cbLiving().getValue().equals(YesNoUnknown.YES)))
		{
			form.ctnFamilyHistory().intAgeDeath().setEnabled(false);
			form.ctnFamilyHistory().intAgeDeath().setValue(null);
			form.ctnFamilyHistory().intAgeDeath().setRequired(false); //wdev-13396
		}
		else if((form.ctnFamilyHistory().cbLiving().getValue() != null) && (form.ctnFamilyHistory().cbLiving().getValue().equals(YesNoUnknown.NO))) //wdev-13396 
		{
			form.ctnFamilyHistory().intAgeDeath().setEnabled(true);
			form.ctnFamilyHistory().intAgeDeath().setRequired(true);
		}
		else
		{
			form.ctnFamilyHistory().intAgeDeath().setEnabled(false);  //wdev-15365
			
			form.ctnFamilyHistory().intAgeDeath().setValue(null);	  //wdev-15365
			form.ctnFamilyHistory().intAgeDeath().setRequired(false); //wdev-13396
		}
	}	
}
 
Example 31
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onGrdTreatmentGridComboBoxSelectionChanged(int column, grdTreatmentRow row, Object value) throws PresentationLogicException
{
	// Modify column index for tried if the grid gets changed
	final int COL_TRIED_INDEX = 1;
	
	if ((column == COL_TRIED_INDEX && value == null) || (value != null && (value.equals(YesNoUnknown.NO) || value.equals(YesNoUnknown.UNKNOWN))))
	{
		row.setcolScore(null);
	}
	
	if (column == COL_TRIED_INDEX && value == null)
	{
		row.setcolDetails(null);
	}
	
	row.setcolScoreReadOnly((value != null && (value.equals(YesNoUnknown.NO) || value.equals(YesNoUnknown.UNKNOWN))) || (column == COL_TRIED_INDEX && value == null));
	row.setcolDetailsReadOnly(column == COL_TRIED_INDEX && value == null);
}
 
Example 32
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void populateSummaryInformation()
{		
	CareContextShortVo currentCareContext = form.getGlobalContext().Core.getCurrentCareContext();
	if(currentCareContext == null)
		return;
	
	if(currentCareContext.getStartDateTimeIsNotNull() && currentCareContext.getStartDateTime().getDate() != null)
		form.dteCurrentAdmissionDate().setValue(currentCareContext.getStartDateTime().getDate());
	
	AdmisSummary summary = domain.getAdmissionSummary(currentCareContext);
	if(summary != null)
	{
		form.txtClassification1().setValue(summary.getOverallNeuro());
		form.txtClassification1().setValue(summary.getCompleteIncomplete());
		
		if(summary.getDateOfInjuryIsNotNull())
			form.txtDateOfInjury().setValue(summary.getDateOfInjury().toString());
		
		form.txtCause().setValue(summary.getCauseOfInjury());			
		form.dteFirstAdmission().setValue(summary.getFirstAdmissionDate());
						
		if(summary.getMRSAStatusIsNotNull())
			form.ansMRSAStatus().setValue(summary.getMRSAStatus().booleanValue() ? YesNoUnknown.YES : YesNoUnknown.NO); 			
	}	
}
 
Example 33
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnsPropertyBookCompletedValueChanged()	throws PresentationLogicException 
{
	if(form.getMode().equals(FormMode.EDIT))
	{
		if(YesNoUnknown.NO.equals(form.ansPropertyBookCompleted().getValue()))
		{
			form.txtSerialNumber().setEnabled(false);
			form.txtSerialNumber().setValue(null);
		}
		else
		{
			form.txtSerialNumber().setEnabled(true);
		}
	}
	
}
 
Example 34
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnsSputumValueChanged() throws PresentationLogicException 
{
	  if(form.ansSputum().getValue() != null && form.ansSputum().getValue().equals(YesNoUnknown.YES))
	  {
		  form.gridSputum().setReadOnly(false);
		  form.comboBoxSputum().setEnabled(true);
	  }
	  else
	  {
		for(int i=0; i< form.gridSputum().getRows().size();i++)
		{
			form.gridSputum().getRows().get(i).setColSelected(false);
		}
	    
		form.gridSputum().setReadOnly(true);
		form.comboBoxSputum().setValue(null);
		form.comboBoxSputum().setEnabled(false);
	  }
}
 
Example 35
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnsDifficultyValueChanged() throws PresentationLogicException
{
	if(form.ansDifficulty().getValue() == null || !form.ansDifficulty().getValue().equals(YesNoUnknown.YES))
	{
		for(int i = 0; i < form.gridDyspnoea().getRows().size(); i++)
			form.gridDyspnoea().getRows().get(i).setColSelected(false);
		
		form.gridDyspnoea().setReadOnly(true);
		form.comboBoxDyspnoea().setValue(null);
		form.comboBoxDyspnoea().setEnabled(false);
	}
	else
	{
		form.gridDyspnoea().setReadOnly(false);
		form.comboBoxDyspnoea().setEnabled(true);
	}
}
 
Example 36
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void beliefOrFaith() 
{
	if(form.answerBoxBeliefOrFaith().getValue() == null || !form.answerBoxBeliefOrFaith().getValue().equals(YesNoUnknown.YES))
	{
		form.answerBoxContinuePracticing().setValue(null);
		form.answerBoxPracticingMember().setValue(null);

		if (form.getMode().equals(FormMode.EDIT))
		{
			form.answerBoxContinuePracticing().setEnabled(false);
			form.answerBoxPracticingMember().setEnabled(false);
		}
	}
	else
	{
		if (form.getMode().equals(FormMode.EDIT))
		{
			form.answerBoxContinuePracticing().setEnabled(true);
			form.answerBoxPracticingMember().setEnabled(true);
		}
	}
}
 
Example 37
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnsMedValueChanged() throws PresentationLogicException 
{
	if(form.ansMed().getValue() != null && form.ansMed().getValue().equals(YesNoUnknown.YES))
	{
		form.bAdd().setEnabled(true);
	}
	else
	{
		if(form.gMed().getRows().size() > 0)
		{
			engine.showMessage("Please remove all medications from grid.");
			form.ansMed().setValue(YesNoUnknown.YES);
			form.bAdd().setEnabled(true);
			return;
		}
		form.bAdd().setEnabled(false);
	}
}
 
Example 38
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
private void checkLaxatives()
{
	if (form.container1().gridMedication().getRows().size() > 0)
	{
		if (form.container1().answerBoxLaxatives().getValue() != null && !form.container1().answerBoxLaxatives().getValue().equals(YesNoUnknown.YES))
		{
			if ((form.container1().answerBoxProneToCons().getValue() == null && form.container1().answerBoxProneDiarr().getValue() == null)   ||
			 	(form.container1().answerBoxProneToCons().getValue() != null && !form.container1().answerBoxProneToCons().getValue().equals(YesNoUnknown.YES)) &&
			  	(form.container1().answerBoxProneDiarr().getValue() != null && !form.container1().answerBoxProneDiarr().getValue().equals(YesNoUnknown.YES)))
			{
				engine.showMessage("Cannot set to No or Unknown as a medication record exists.");
				form.container1().answerBoxLaxatives().setValue(YesNoUnknown.YES);
				return;
			}
		}
	}

	enableNewMedication();
}
 
Example 39
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnswerBoxProneToConsValueChanged() throws PresentationLogicException 
{
	if (form.container1().gridMedication().getRows().size() > 0)
	{
		if (form.container1().answerBoxProneToCons().getValue() != null && !form.container1().answerBoxProneToCons().getValue().equals(YesNoUnknown.YES))
		{
			if ((form.container1().answerBoxProneDiarr().getValue() == null && form.container1().answerBoxLaxatives().getValue() == null)   ||
				(form.container1().answerBoxProneDiarr().getValue() != null && !form.container1().answerBoxProneDiarr().getValue().equals(YesNoUnknown.YES)) &&
				(form.container1().answerBoxLaxatives().getValue() != null && !form.container1().answerBoxLaxatives().getValue().equals(YesNoUnknown.YES)))
			{
				engine.showMessage("Cannot set to No or Unknown as a medication record exists.");
				form.container1().answerBoxProneToCons().setValue(YesNoUnknown.YES);
				return;
			}
		} 
	}
	enableNewMedication();
		
}
 
Example 40
Project: openMAXIMS   File: Logic.java   View source code 6 votes vote down vote up
protected void onAnswerBoxDrinkSociallyValueChanged() throws PresentationLogicException
{
	if(form.answerBoxDrinkSocially().getValue() == null || !form.answerBoxDrinkSocially().getValue().equals(YesNoUnknown.YES))
	{
		form.intBoxUnits().setValue(null);
		form.intBoxUnits().setEnabled(false);
	}
	else
		form.intBoxUnits().setEnabled(true);
	
	if(form.getLocalContext().getAssessLeisure() != null)
	{
		if(form.getLocalContext().getAssessLeisure().getIsComplete().booleanValue() == true)
			form.intBoxUnits().setEnabled(false);
	}	
	
}