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

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

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

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

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

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

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

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

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

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

}