Java 类ims.core.vo.lookups.YesNoUnknown 实例源码

项目:AvoinApotti    文件:Logic.java   
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);
}
项目:AvoinApotti    文件:Logic.java   
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);
    }
}
项目:AvoinApotti    文件:Logic.java   
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);             
    }   
}
项目:AvoinApotti    文件:Logic.java   
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);
        }
    }

}
项目:AvoinApotti    文件:Logic.java   
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);
    }
}
项目:AvoinApotti    文件:Logic.java   
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);
      }
}
项目:AvoinApotti    文件:Logic.java   
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);
    }
}
项目:AvoinApotti    文件:Logic.java   
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);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
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);
    }
}
项目:AvoinApotti    文件:Logic.java   
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();
}
项目:AvoinApotti    文件:Logic.java   
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();

}
项目:AvoinApotti    文件:Logic.java   
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);
    }   

}
项目:AvoinApotti    文件:Logic.java   
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);
    }
}
项目:AvoinApotti    文件:Logic.java   
/**
 * 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
        }
    }   
}
项目:openMAXIMS    文件:Logic.java   
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);
}
项目:openMAXIMS    文件:Logic.java   
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);
    }
}
项目:openMAXIMS    文件:Logic.java   
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);             
    }   
}
项目:openMAXIMS    文件:Logic.java   
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);
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
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);
      }
}
项目:openMAXIMS    文件:Logic.java   
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);
    }
}
项目:openMAXIMS    文件:Logic.java   
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);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
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);
    }
}
项目:openMAXIMS    文件:Logic.java   
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();
}
项目:openmaxims-linux    文件:Logic.java   
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);
    }
}
项目:openMAXIMS    文件:Logic.java   
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);
    }
}
项目:openmaxims-linux    文件:Logic.java   
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);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
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]);

}
项目:openmaxims-linux    文件:Logic.java   
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();
}
项目:openMAXIMS    文件:Logic.java   
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()));
}
项目:openMAXIMS    文件:Logic.java   
/**
 * 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
        }
    }   
}
项目:openMAXIMS    文件:Logic.java   
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);
}
项目:openMAXIMS    文件:Logic.java   
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);             
    }   
}
项目:openMAXIMS    文件:Logic.java   
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);
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
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);
      }
}
项目:openMAXIMS    文件:Logic.java   
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);
    }
}
项目:openMAXIMS    文件:Logic.java   
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);
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
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);
    }
}
项目:openMAXIMS    文件:Logic.java   
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();
}
项目:openMAXIMS    文件:Logic.java   
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();

}
项目:openMAXIMS    文件:Logic.java   
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);
    }   

}