Java 类ims.clinical.vo.lookups.MedicationSnapShot 实例源码

项目:openMAXIMS    文件:Logic.java   
private void initialize() 
{
    form.setMode(FormMode.VIEW);

    MedicationDosesDynamicGridPopulation gridPopulation = getHelper();
    gridPopulation.initializeGrid();

    formatMedicationAndDosesGrids();

    if (isMedicationMultipleDosesPatientLevel())
        form.getLocalContext().setScreenType(MedicationSnapShot.PATIENT);

    if ( (form.getGlobalContext().Clinical.getReturnToFormNameIsNotNull())
        && (form.getGlobalContext().Clinical.getReturnToFormName().equals(engine.getPreviousNonDialogFormName())) )
    {
        isBtnCloseVisible(true);
        form.lnkReturn().setVisible(true);
    }
    else
    {
        isBtnCloseVisible(false);
        form.lnkReturn().setVisible(false);
    }

    displayOrHideEnableDisableScreenSpecificControls();
}
项目:openMAXIMS    文件:Logic.java   
private void displayOrHideEnableDisableScreenSpecificControls() 
{
    form.ctnDetails().lblIncludeinTTO().setVisible(false);
    form.ctnDetails().chkTTO().setVisible(false);
    form.ctnDetails().lblNumDays().setVisible(false);
    form.ctnDetails().intNumDays().setVisible(false);
    form.recbrOverviews().setVisible(false);

    MedicationSnapShot screenType = form.getLocalContext().getScreenType();
    if (screenType != null)
    {
        if (form.getMode().equals(FormMode.VIEW) )
        {
            form.chkFilter().setVisible(false);
            form.setcustomControlAuthoringInfoEnabled(false);
            if (form.getLocalContext().getCurrentOverViewIsNotNull()) 
                form.chkFilter().setVisible(true);
        }
        else
        {
            form.setcustomControlAuthoringInfoEnabled(true);
            if (isDialog())
                isBtnCloseVisible(true);
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void initialize() 
{
    form.setMode(FormMode.VIEW);

    MedicationDosesDynamicGridPopulation gridPopulation = getHelper();
    gridPopulation.initializeGrid();

    formatMedicationAndDosesGrids();

    if (isDialog())
        form.getLocalContext().setScreenType(MedicationSnapShot.ADMISSION);
    if (isMedicationMultipleDosesOnAdmission() || isDialog())
        form.getLocalContext().setScreenType(MedicationSnapShot.ADMISSION);
    else if (isMedicationMultipleDosesOnDischarge())
        form.getLocalContext().setScreenType(MedicationSnapShot.DISCHARGE);
    else if (isMedicationMultipleDosesOPD())
        form.getLocalContext().setScreenType(MedicationSnapShot.OPD);
    else if (isMedicationMultipleDosesPatientLevel())
        form.getLocalContext().setScreenType(MedicationSnapShot.PATIENT);

    if ( (form.getGlobalContext().Clinical.getReturnToFormNameIsNotNull())
        && (form.getGlobalContext().Clinical.getReturnToFormName().equals(engine.getPreviousNonDialogFormName())) )
    {
        isBtnCloseVisible(true);
        form.lnkReturn().setVisible(true);
    }
    else
    {
        isBtnCloseVisible(false);
        form.lnkReturn().setVisible(false);
    }

    displayOrHideEnableDisableScreenSpecificControls();
}
项目:openMAXIMS    文件:Logic.java   
private void initialize() 
{
    form.setMode(FormMode.VIEW);

    MedicationDosesDynamicGridPopulation gridPopulation = getHelper();
    gridPopulation.initializeGrid();

    formatMedicationAndDosesGrids();

    if (isDialog())
        form.getLocalContext().setScreenType(MedicationSnapShot.ADMISSION);
    if (isMedicationMultipleDosesOnAdmission() || isDialog())
        form.getLocalContext().setScreenType(MedicationSnapShot.ADMISSION);
    else if (isMedicationMultipleDosesOnDischarge())
        form.getLocalContext().setScreenType(MedicationSnapShot.DISCHARGE);
    else if (isMedicationMultipleDosesOPD())
        form.getLocalContext().setScreenType(MedicationSnapShot.OPD);
    else if (isMedicationMultipleDosesPatientLevel())
        form.getLocalContext().setScreenType(MedicationSnapShot.PATIENT);

    if ( (form.getGlobalContext().Clinical.getReturnToFormNameIsNotNull())
        && (form.getGlobalContext().Clinical.getReturnToFormName().equals(engine.getPreviousNonDialogFormName())) )
    {
        isBtnCloseVisible(true);
        form.lnkReturn().setVisible(true);
    }
    else
    {
        isBtnCloseVisible(false);
        form.lnkReturn().setVisible(false);
    }

    displayOrHideEnableDisableScreenSpecificControls();
}
项目:openMAXIMS    文件:Logic.java   
private void initialize() 
{
    form.setMode(FormMode.VIEW);

    MedicationDosesDynamicGridPopulation gridPopulation = getHelper();
    gridPopulation.initializeGrid();

    formatMedicationAndDosesGrids();

    if (isDialog())
        form.getLocalContext().setScreenType(MedicationSnapShot.ADMISSION);
    if (isMedicationMultipleDosesOnAdmission() || isDialog())
        form.getLocalContext().setScreenType(MedicationSnapShot.ADMISSION);
    else if (isMedicationMultipleDosesOnDischarge())
        form.getLocalContext().setScreenType(MedicationSnapShot.DISCHARGE);
    else if (isMedicationMultipleDosesOPD())
        form.getLocalContext().setScreenType(MedicationSnapShot.OPD);
    else if (isMedicationMultipleDosesPatientLevel())
        form.getLocalContext().setScreenType(MedicationSnapShot.PATIENT);

    if ( (form.getGlobalContext().Clinical.getReturnToFormNameIsNotNull())
        && (form.getGlobalContext().Clinical.getReturnToFormName().equals(engine.getPreviousNonDialogFormName())) )
    {
        isBtnCloseVisible(true);
        form.lnkReturn().setVisible(true);
    }
    else
    {
        isBtnCloseVisible(false);
        form.lnkReturn().setVisible(false);
    }

    displayOrHideEnableDisableScreenSpecificControls();
}
项目:openmaxims-linux    文件:Logic.java   
private void initialize() 
{
    form.setMode(FormMode.VIEW);

    MedicationDosesDynamicGridPopulation gridPopulation = getHelper();
    gridPopulation.initializeGrid();

    formatMedicationAndDosesGrids();

    if (isDialog())
        form.getLocalContext().setScreenType(MedicationSnapShot.ADMISSION);
    if (isMedicationMultipleDosesOnAdmission() || isDialog())
        form.getLocalContext().setScreenType(MedicationSnapShot.ADMISSION);
    else if (isMedicationMultipleDosesOnDischarge())
        form.getLocalContext().setScreenType(MedicationSnapShot.DISCHARGE);
    else if (isMedicationMultipleDosesOPD())
        form.getLocalContext().setScreenType(MedicationSnapShot.OPD);
    else if (isMedicationMultipleDosesPatientLevel())
        form.getLocalContext().setScreenType(MedicationSnapShot.PATIENT);

    if ( (form.getGlobalContext().Clinical.getReturnToFormNameIsNotNull())
        && (form.getGlobalContext().Clinical.getReturnToFormName().equals(engine.getPreviousNonDialogFormName())) )
    {
        isBtnCloseVisible(true);
        form.lnkReturn().setVisible(true);
    }
    else
    {
        isBtnCloseVisible(false);
        form.lnkReturn().setVisible(false);
    }

    displayOrHideEnableDisableScreenSpecificControls();
}
项目:AvoinApotti    文件:Logic.java   
protected void onlyrDetailsTabChanged(LayerBridge tab)
{
    if(tab.equals(form.lyrDetails().tabPreview()) && form.getLocalContext().getSelectedItem() != null && form.getLocalContext().getReportChangedIsNotNull() && form.getLocalContext().getReportChanged().booleanValue())
    {
        form.lyrDetails().tabPreview().htmReport().setHTML("");

        if(form.getLocalContext().getSelectedItem() != null && form.getLocalContext().getReportChangedIsNotNull() && form.getLocalContext().getReportChanged().booleanValue() && form.getLocalContext().getSelectedItem().getID_ClinicalCorrespondence() != null)
        {
            buildReport();
            form.getLocalContext().setReportChanged(Boolean.FALSE);
        }
    }  //WDEV-1039 - 3) We need to Display the Medication Overview record for this context, if the ClinicalCorrespondenceBo has not been saved for the context we are in we need to retrieve the Overview and display it. 
    else if(tab.equals(form.lyrDetails().tabServices()) && !isMedicationDataLoaded())
    {
        form.lyrDetails().tabServices().dyngrdMedication().clear();

        MedicationOverViewFilterVo voFilter = new MedicationOverViewFilterVo();

        voFilter.setType(MedicationSnapShot.DISCHARGE);
        voFilter.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
        voFilter.setPatientRef(form.getGlobalContext().Core.getPatientShort());

        MedicationOverViewVo voOverView = domain.getLatestMedicationOverViewVo(voFilter);

        if (voOverView != null && voOverView.getMedicationIsNotNull())
        {
            //WDEV-1039 - 2)We need to change the icons used in the medication preview to those used in the medication page 
            MedicationDosesDynamicGridPopulation gridPopulation = new MedicationDosesDynamicGridPopulation(form.lyrDetails().tabServices().dyngrdMedication(), form.getImages().Admin.Activity, form.getImages().ICP.Child);            
            gridPopulation.initializeGrid();
            gridPopulation.populate(voOverView);

            form.getLocalContext().setIsMedicationDataLoaded(Boolean.TRUE);
        }
    }
    else if(tab.equals(form.lyrDetails().tabCommentsOPD()) && form.getLocalContext().getOutpatientSummaryChanged().booleanValue() && form.getMode().equals(FormMode.EDIT))
    {
        if(form.getLocalContext().getSelectedItem() == null)
        {
            OutpatientNotesOutcomeVo voOPDSummary = domain.getOPDSummary(form.getGlobalContext().Core.getCurrentClinicalContact());

            if(voOPDSummary != null && form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().size() == 3)
            {
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(0).setColText(voOPDSummary.getClinicalNote().getObjectiveNote());
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(1).setColText(voOPDSummary.getClinicalNote().getPlanNote());
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(2).setColText(voOPDSummary.getInstructionNextClinic());

                form.lyrDetails().tabCommentsOPD().cmbOPFollowUp().setValue(voOPDSummary.getOutcome());
                form.lyrDetails().tabCommentsOPD().intOPReviewIn().setValue(voOPDSummary.getReviewIn());
                form.lyrDetails().tabCommentsOPD().cmbOPReviewIn().setValue(voOPDSummary.getReviewinUnits());

                form.getLocalContext().setOutpatientSummaryChanged(Boolean.FALSE);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void displayOrHideEnableDisableScreenSpecificControls() 
{
    form.ctnDetails().lblIncludeinTTO().setVisible(false);
    form.ctnDetails().chkTTO().setVisible(false);
    form.ctnDetails().lblNumDays().setVisible(false);
    form.ctnDetails().intNumDays().setVisible(false);
    form.recbrOverviews().setVisible(false);

    MedicationSnapShot screenType = form.getLocalContext().getScreenType();
    if (screenType != null)
    {
        if (screenType.equals(MedicationSnapShot.DISCHARGE) || screenType.equals(MedicationSnapShot.OPD))
        {
            form.ctnDetails().lblIncludeinTTO().setVisible(true);
            form.ctnDetails().chkTTO().setVisible(true);
            form.ctnDetails().lblNumDays().setVisible(true);
            form.ctnDetails().intNumDays().setVisible(true);

            form.ctnDetails().chkTTO().setEnabled(form.getMode().equals(FormMode.EDIT));
            form.ctnDetails().intNumDays().setEnabled(form.getMode().equals(FormMode.EDIT));
        }
        else if(screenType.equals(MedicationSnapShot.PATIENT))
        {
            form.recbrOverviews().setEnabled(true);
            form.recbrOverviews().setVisible(true);
            form.setcustomControlAuthoringInfoEnabled(false);
            form.setMode(FormMode.VIEW);
        }
    }
    if (form.getMode().equals(FormMode.VIEW) )
    {
        form.chkFilter().setVisible(false);
        form.setcustomControlAuthoringInfoEnabled(false);
        if (form.getLocalContext().getCurrentOverViewIsNotNull()) 
            form.chkFilter().setVisible(true);
    }
    else
    {
        form.setcustomControlAuthoringInfoEnabled(true);
        if (isDialog())
            isBtnCloseVisible(true);
    }
}
项目:AvoinApotti    文件:Logic.java   
public void updateControlsState()
{
    form.getContextMenus().hideAllMedicationMultipleMenuItems();
    form.getContextMenus().hideAllMedicationMultipleDosesMenuItems();
    boolean isRieMode = engine.isRIEMode();

    form.getContextMenus().getMedicationMultipleNEW_MEDICATIONItem().setVisible(form.getMode().equals(FormMode.VIEW) && !isRieMode);
    form.getContextMenus().getMedicationMultipleNEW_MEDICATIONItem().setEnabled(form.getMode().equals(FormMode.VIEW));

    form.getContextMenus().getMedicationMultipleUPDATE_MEDICATIONItem().setVisible( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) && !isRieMode);
    form.getContextMenus().getMedicationMultipleUPDATE_MEDICATIONItem().setEnabled( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) );

    form.getContextMenus().getMedicationMultipleDISCONTINUE_MEDICATIONItem().setVisible( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) && !isRieMode );
    form.getContextMenus().getMedicationMultipleDISCONTINUE_MEDICATIONItem().setEnabled( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) );


    form.getContextMenus().getMedicationMultipleDosesNEW_DOSEItem().setVisible(form.getMode().equals(FormMode.EDIT));
    form.getContextMenus().getMedicationMultipleDosesNEW_DOSEItem().setEnabled(form.getMode().equals(FormMode.EDIT));

    form.getContextMenus().getMedicationMultipleDosesDISCONTINUE_DOSEItem().setVisible( (form.getMode().equals(FormMode.EDIT)) 
            && (form.ctnDetails().dyngrdDoses().getSelectedRow() != null) );
    form.getContextMenus().getMedicationMultipleDosesDISCONTINUE_DOSEItem().setEnabled( (form.getMode().equals(FormMode.EDIT)) 
            && (form.ctnDetails().dyngrdDoses().getSelectedRow() != null) );


    if (form.getMode().equals(FormMode.EDIT))
    {
        form.ctnDetails().setcustomControlCodingItemEnabled(true);
        form.customControlAuthoringInfo().setIsRequiredPropertyToControls(true); //wdev-15369
        form.customControlAuthoringInfo().setEnabledAuthoringHCP(true);
    }
    else
    {
        form.customControlAuthoringInfo().setIsRequiredPropertyToControls(false);   //wdev-15369
        form.customControlAuthoringInfo().setEnabledAuthoringHCP(false);
    }

    form.ctnDetails().customControlCodingItem().setParentEditing(new Boolean(form.getMode().equals(FormMode.EDIT)));        


    if (form.getLocalContext().getScreenTypeIsNotNull() 
            && form.getLocalContext().getScreenType().equals(MedicationSnapShot.PATIENT) )
    {
        form.getContextMenus().hideAllMedicationMultipleMenuItems();
        form.getContextMenus().hideAllMedicationMultipleDosesMenuItems();
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onlyrDetailsTabChanged(LayerBridge tab)
{
    if(tab.equals(form.lyrDetails().tabPreview()) && form.getLocalContext().getSelectedItem() != null && form.getLocalContext().getReportChangedIsNotNull() && form.getLocalContext().getReportChanged().booleanValue())
    {
        form.lyrDetails().tabPreview().htmReport().setHTML("");

        if(form.getLocalContext().getSelectedItem() != null && form.getLocalContext().getReportChangedIsNotNull() && form.getLocalContext().getReportChanged().booleanValue() && form.getLocalContext().getSelectedItem().getID_ClinicalCorrespondence() != null)
        {
            buildReport();
            form.getLocalContext().setReportChanged(Boolean.FALSE);
        }
    }  //WDEV-1039 - 3) We need to Display the Medication Overview record for this context, if the ClinicalCorrespondenceBo has not been saved for the context we are in we need to retrieve the Overview and display it. 
    else if(tab.equals(form.lyrDetails().tabServices()) && !isMedicationDataLoaded())
    {
        form.lyrDetails().tabServices().dyngrdMedication().clear();

        MedicationOverViewFilterVo voFilter = new MedicationOverViewFilterVo();

        voFilter.setType(MedicationSnapShot.DISCHARGE);
        voFilter.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
        voFilter.setPatientRef(form.getGlobalContext().Core.getPatientShort());

        MedicationOverViewVo voOverView = domain.getLatestMedicationOverViewVo(voFilter);

        if (voOverView != null && voOverView.getMedicationIsNotNull())
        {
            //WDEV-1039 - 2)We need to change the icons used in the medication preview to those used in the medication page 
            MedicationDosesDynamicGridPopulation gridPopulation = new MedicationDosesDynamicGridPopulation(form.lyrDetails().tabServices().dyngrdMedication(), form.getImages().Admin.Activity, form.getImages().ICP.Child);            
            gridPopulation.initializeGrid();
            gridPopulation.populate(voOverView);

            form.getLocalContext().setIsMedicationDataLoaded(Boolean.TRUE);
        }
    }
    else if(tab.equals(form.lyrDetails().tabCommentsOPD()) && form.getLocalContext().getOutpatientSummaryChanged().booleanValue() && form.getMode().equals(FormMode.EDIT))
    {
        if(form.getLocalContext().getSelectedItem() == null)
        {
            OutpatientNotesOutcomeVo voOPDSummary = domain.getOPDSummary(form.getGlobalContext().Core.getCurrentClinicalContact());

            if(voOPDSummary != null && form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().size() == 3)
            {
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(0).setColText(voOPDSummary.getClinicalNote().getObjectiveNote());
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(1).setColText(voOPDSummary.getClinicalNote().getPlanNote());
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(2).setColText(voOPDSummary.getInstructionNextClinic());

                form.lyrDetails().tabCommentsOPD().cmbOPFollowUp().setValue(voOPDSummary.getOutcome());
                form.lyrDetails().tabCommentsOPD().intOPReviewIn().setValue(voOPDSummary.getReviewIn());
                form.lyrDetails().tabCommentsOPD().cmbOPReviewIn().setValue(voOPDSummary.getReviewinUnits());

                form.getLocalContext().setOutpatientSummaryChanged(Boolean.FALSE);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void displayOrHideEnableDisableScreenSpecificControls() 
    {
        form.ctnDetails().lblIncludeinTTO().setVisible(false);
        form.ctnDetails().chkTTO().setVisible(false);
        form.ctnDetails().lblNumDays().setVisible(false);
        form.ctnDetails().intNumDays().setVisible(false);
        form.recbrOverviews().setVisible(false);

        MedicationSnapShot screenType = form.getLocalContext().getScreenType();
        if (screenType != null)
        {
            //WDEV-20591
//          if (screenType.equals(MedicationSnapShot.DISCHARGE) || screenType.equals(MedicationSnapShot.OPD))
            if (screenType.equals(MedicationSnapShot.DISCHARGE))
            {
                form.ctnDetails().lblIncludeinTTO().setVisible(true);
                form.ctnDetails().chkTTO().setVisible(true);
                form.ctnDetails().lblNumDays().setVisible(true);
                form.ctnDetails().intNumDays().setVisible(true);

                form.ctnDetails().chkTTO().setEnabled(form.getMode().equals(FormMode.EDIT));
                form.ctnDetails().intNumDays().setEnabled(form.getMode().equals(FormMode.EDIT));
            }
            else if(screenType.equals(MedicationSnapShot.PATIENT))
            {
                form.recbrOverviews().setEnabled(true);
                form.recbrOverviews().setVisible(true);
                form.setcustomControlAuthoringInfoEnabled(false);
                form.setMode(FormMode.VIEW);
            }
        }
        if (form.getMode().equals(FormMode.VIEW) )
        {
            form.chkFilter().setVisible(false);
            form.setcustomControlAuthoringInfoEnabled(false);
            if (form.getLocalContext().getCurrentOverViewIsNotNull()) 
                form.chkFilter().setVisible(true);
        }
        else
        {
            form.setcustomControlAuthoringInfoEnabled(true);
            if (isDialog())
                isBtnCloseVisible(true);
        }
    }
项目:openMAXIMS    文件:Logic.java   
public void updateControlsState()
{
    form.getContextMenus().hideAllMedicationMultipleMenuItems();
    form.getContextMenus().hideAllMedicationMultipleDosesMenuItems();
    boolean isRieMode = engine.isRIEMode();

    form.getContextMenus().getMedicationMultipleNEW_MEDICATIONItem().setVisible(form.getMode().equals(FormMode.VIEW) && !isRieMode);
    form.getContextMenus().getMedicationMultipleNEW_MEDICATIONItem().setEnabled(form.getMode().equals(FormMode.VIEW));

    form.getContextMenus().getMedicationMultipleUPDATE_MEDICATIONItem().setVisible( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) && !isRieMode);
    form.getContextMenus().getMedicationMultipleUPDATE_MEDICATIONItem().setEnabled( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) );

    form.getContextMenus().getMedicationMultipleDISCONTINUE_MEDICATIONItem().setVisible( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) && !isRieMode );
    form.getContextMenus().getMedicationMultipleDISCONTINUE_MEDICATIONItem().setEnabled( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) );


    form.getContextMenus().getMedicationMultipleDosesNEW_DOSEItem().setVisible(form.getMode().equals(FormMode.EDIT));
    form.getContextMenus().getMedicationMultipleDosesNEW_DOSEItem().setEnabled(form.getMode().equals(FormMode.EDIT));

    form.getContextMenus().getMedicationMultipleDosesDISCONTINUE_DOSEItem().setVisible( (form.getMode().equals(FormMode.EDIT)) 
            && (form.ctnDetails().dyngrdDoses().getSelectedRow() != null) );
    form.getContextMenus().getMedicationMultipleDosesDISCONTINUE_DOSEItem().setEnabled( (form.getMode().equals(FormMode.EDIT)) 
            && (form.ctnDetails().dyngrdDoses().getSelectedRow() != null) );


    if (form.getMode().equals(FormMode.EDIT))
    {
        form.ctnDetails().setcustomControlCodingItemEnabled(true);
        form.customControlAuthoringInfo().setIsRequiredPropertyToControls(true); //wdev-15369
        form.customControlAuthoringInfo().setEnabledAuthoringHCP(true);
    }
    else
    {
        form.customControlAuthoringInfo().setIsRequiredPropertyToControls(false);   //wdev-15369
        form.customControlAuthoringInfo().setEnabledAuthoringHCP(false);
    }

    form.ctnDetails().customControlCodingItem().setParentEditing(new Boolean(form.getMode().equals(FormMode.EDIT)));        


    if (form.getLocalContext().getScreenTypeIsNotNull() 
            && form.getLocalContext().getScreenType().equals(MedicationSnapShot.PATIENT) )
    {
        form.getContextMenus().hideAllMedicationMultipleMenuItems();
        form.getContextMenus().hideAllMedicationMultipleDosesMenuItems();
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void onlyrDetailsTabChanged(LayerBridge tab)
{
    if(tab.equals(form.lyrDetails().tabPreview()) && form.getLocalContext().getSelectedItem() != null && form.getLocalContext().getReportChangedIsNotNull() && form.getLocalContext().getReportChanged().booleanValue())
    {
        form.lyrDetails().tabPreview().htmReport().setHTML("");

        if(form.getLocalContext().getSelectedItem() != null && form.getLocalContext().getReportChangedIsNotNull() && form.getLocalContext().getReportChanged().booleanValue() && form.getLocalContext().getSelectedItem().getID_ClinicalCorrespondence() != null)
        {
            buildReport();
            form.getLocalContext().setReportChanged(Boolean.FALSE);
        }
    }  //WDEV-1039 - 3) We need to Display the Medication Overview record for this context, if the ClinicalCorrespondenceBo has not been saved for the context we are in we need to retrieve the Overview and display it. 
    else if(tab.equals(form.lyrDetails().tabServices()) && !isMedicationDataLoaded())
    {
        form.lyrDetails().tabServices().dyngrdMedication().clear();

        MedicationOverViewFilterVo voFilter = new MedicationOverViewFilterVo();

        voFilter.setType(MedicationSnapShot.DISCHARGE);
        voFilter.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
        voFilter.setPatientRef(form.getGlobalContext().Core.getPatientShort());

        MedicationOverViewVo voOverView = domain.getLatestMedicationOverViewVo(voFilter);

        if (voOverView != null && voOverView.getMedicationIsNotNull())
        {
            //WDEV-1039 - 2)We need to change the icons used in the medication preview to those used in the medication page 
            MedicationDosesDynamicGridPopulation gridPopulation = new MedicationDosesDynamicGridPopulation(form.lyrDetails().tabServices().dyngrdMedication(), form.getImages().Admin.Activity, form.getImages().ICP.Child);            
            gridPopulation.initializeGrid();
            gridPopulation.populate(voOverView);

            form.getLocalContext().setIsMedicationDataLoaded(Boolean.TRUE);
        }
    }
    else if(tab.equals(form.lyrDetails().tabCommentsOPD()) && form.getLocalContext().getOutpatientSummaryChanged().booleanValue() && form.getMode().equals(FormMode.EDIT))
    {
        if(form.getLocalContext().getSelectedItem() == null)
        {
            OutpatientNotesOutcomeVo voOPDSummary = domain.getOPDSummary(form.getGlobalContext().Core.getCurrentClinicalContact());

            if(voOPDSummary != null && form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().size() == 3)
            {
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(0).setColText(voOPDSummary.getClinicalNote().getObjectiveNote());
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(1).setColText(voOPDSummary.getClinicalNote().getPlanNote());
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(2).setColText(voOPDSummary.getInstructionNextClinic());

                form.lyrDetails().tabCommentsOPD().cmbOPFollowUp().setValue(voOPDSummary.getOutcome());
                form.lyrDetails().tabCommentsOPD().intOPReviewIn().setValue(voOPDSummary.getReviewIn());
                form.lyrDetails().tabCommentsOPD().cmbOPReviewIn().setValue(voOPDSummary.getReviewinUnits());

                form.getLocalContext().setOutpatientSummaryChanged(Boolean.FALSE);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private void displayOrHideEnableDisableScreenSpecificControls() 
{
    form.ctnDetails().lblIncludeinTTO().setVisible(false);
    form.ctnDetails().chkTTO().setVisible(false);
    form.ctnDetails().lblNumDays().setVisible(false);
    form.ctnDetails().intNumDays().setVisible(false);
    form.recbrOverviews().setVisible(false);

    MedicationSnapShot screenType = form.getLocalContext().getScreenType();
    if (screenType != null)
    {
        if (screenType.equals(MedicationSnapShot.DISCHARGE) || screenType.equals(MedicationSnapShot.OPD))
        {
            form.ctnDetails().lblIncludeinTTO().setVisible(true);
            form.ctnDetails().chkTTO().setVisible(true);
            form.ctnDetails().lblNumDays().setVisible(true);
            form.ctnDetails().intNumDays().setVisible(true);

            form.ctnDetails().chkTTO().setEnabled(form.getMode().equals(FormMode.EDIT));
            form.ctnDetails().intNumDays().setEnabled(form.getMode().equals(FormMode.EDIT));
        }
        else if(screenType.equals(MedicationSnapShot.PATIENT))
        {
            form.recbrOverviews().setEnabled(true);
            form.recbrOverviews().setVisible(true);
            form.setcustomControlAuthoringInfoEnabled(false);
            form.setMode(FormMode.VIEW);
        }
    }
    if (form.getMode().equals(FormMode.VIEW) )
    {
        form.chkFilter().setVisible(false);
        form.setcustomControlAuthoringInfoEnabled(false);
        if (form.getLocalContext().getCurrentOverViewIsNotNull()) 
            form.chkFilter().setVisible(true);
    }
    else
    {
        form.setcustomControlAuthoringInfoEnabled(true);
        if (isDialog())
            isBtnCloseVisible(true);
    }
}
项目:openMAXIMS    文件:Logic.java   
public void updateControlsState()
{
    form.getContextMenus().hideAllMedicationMultipleMenuItems();
    form.getContextMenus().hideAllMedicationMultipleDosesMenuItems();
    boolean isRieMode = engine.isRIEMode();

    form.getContextMenus().getMedicationMultipleNEW_MEDICATIONItem().setVisible(form.getMode().equals(FormMode.VIEW) && !isRieMode);
    form.getContextMenus().getMedicationMultipleNEW_MEDICATIONItem().setEnabled(form.getMode().equals(FormMode.VIEW));

    form.getContextMenus().getMedicationMultipleUPDATE_MEDICATIONItem().setVisible( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) && !isRieMode);
    form.getContextMenus().getMedicationMultipleUPDATE_MEDICATIONItem().setEnabled( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) );

    form.getContextMenus().getMedicationMultipleDISCONTINUE_MEDICATIONItem().setVisible( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) && !isRieMode );
    form.getContextMenus().getMedicationMultipleDISCONTINUE_MEDICATIONItem().setEnabled( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) );


    form.getContextMenus().getMedicationMultipleDosesNEW_DOSEItem().setVisible(form.getMode().equals(FormMode.EDIT));
    form.getContextMenus().getMedicationMultipleDosesNEW_DOSEItem().setEnabled(form.getMode().equals(FormMode.EDIT));

    form.getContextMenus().getMedicationMultipleDosesDISCONTINUE_DOSEItem().setVisible( (form.getMode().equals(FormMode.EDIT)) 
            && (form.ctnDetails().dyngrdDoses().getSelectedRow() != null) );
    form.getContextMenus().getMedicationMultipleDosesDISCONTINUE_DOSEItem().setEnabled( (form.getMode().equals(FormMode.EDIT)) 
            && (form.ctnDetails().dyngrdDoses().getSelectedRow() != null) );


    if (form.getMode().equals(FormMode.EDIT))
    {
        form.ctnDetails().setcustomControlCodingItemEnabled(true);
        form.customControlAuthoringInfo().setIsRequiredPropertyToControls(true); //wdev-15369
        form.customControlAuthoringInfo().setEnabledAuthoringHCP(true);
    }
    else
    {
        form.customControlAuthoringInfo().setIsRequiredPropertyToControls(false);   //wdev-15369
        form.customControlAuthoringInfo().setEnabledAuthoringHCP(false);
    }

    form.ctnDetails().customControlCodingItem().setParentEditing(new Boolean(form.getMode().equals(FormMode.EDIT)));        


    if (form.getLocalContext().getScreenTypeIsNotNull() 
            && form.getLocalContext().getScreenType().equals(MedicationSnapShot.PATIENT) )
    {
        form.getContextMenus().hideAllMedicationMultipleMenuItems();
        form.getContextMenus().hideAllMedicationMultipleDosesMenuItems();
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void onlyrDetailsTabChanged(LayerBridge tab)
{
    if(tab.equals(form.lyrDetails().tabPreview()) && form.getLocalContext().getSelectedItem() != null && form.getLocalContext().getReportChangedIsNotNull() && form.getLocalContext().getReportChanged().booleanValue())
    {
        form.lyrDetails().tabPreview().htmReport().setHTML("");

        if(form.getLocalContext().getSelectedItem() != null && form.getLocalContext().getReportChangedIsNotNull() && form.getLocalContext().getReportChanged().booleanValue() && form.getLocalContext().getSelectedItem().getID_ClinicalCorrespondence() != null)
        {
            buildReport();
            form.getLocalContext().setReportChanged(Boolean.FALSE);
        }
    }  //WDEV-1039 - 3) We need to Display the Medication Overview record for this context, if the ClinicalCorrespondenceBo has not been saved for the context we are in we need to retrieve the Overview and display it. 
    else if(tab.equals(form.lyrDetails().tabServices()) && !isMedicationDataLoaded())
    {
        form.lyrDetails().tabServices().dyngrdMedication().clear();

        MedicationOverViewFilterVo voFilter = new MedicationOverViewFilterVo();

        voFilter.setType(MedicationSnapShot.DISCHARGE);
        voFilter.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
        voFilter.setPatientRef(form.getGlobalContext().Core.getPatientShort());

        MedicationOverViewVo voOverView = domain.getLatestMedicationOverViewVo(voFilter);

        if (voOverView != null && voOverView.getMedicationIsNotNull())
        {
            //WDEV-1039 - 2)We need to change the icons used in the medication preview to those used in the medication page 
            MedicationDosesDynamicGridPopulation gridPopulation = new MedicationDosesDynamicGridPopulation(form.lyrDetails().tabServices().dyngrdMedication(), form.getImages().Admin.Activity, form.getImages().ICP.Child);            
            gridPopulation.initializeGrid();
            gridPopulation.populate(voOverView);

            form.getLocalContext().setIsMedicationDataLoaded(Boolean.TRUE);
        }
    }
    else if(tab.equals(form.lyrDetails().tabCommentsOPD()) && form.getLocalContext().getOutpatientSummaryChanged().booleanValue() && form.getMode().equals(FormMode.EDIT))
    {
        if(form.getLocalContext().getSelectedItem() == null)
        {
            OutpatientNotesOutcomeVo voOPDSummary = domain.getOPDSummary(form.getGlobalContext().Core.getCurrentClinicalContact());

            if(voOPDSummary != null && form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().size() == 3)
            {
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(0).setColText(voOPDSummary.getClinicalNote().getObjectiveNote());
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(1).setColText(voOPDSummary.getClinicalNote().getPlanNote());
                form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(2).setColText(voOPDSummary.getInstructionNextClinic());

                form.lyrDetails().tabCommentsOPD().cmbOPFollowUp().setValue(voOPDSummary.getOutcome());
                form.lyrDetails().tabCommentsOPD().intOPReviewIn().setValue(voOPDSummary.getReviewIn());
                form.lyrDetails().tabCommentsOPD().cmbOPReviewIn().setValue(voOPDSummary.getReviewinUnits());

                form.getLocalContext().setOutpatientSummaryChanged(Boolean.FALSE);
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void displayOrHideEnableDisableScreenSpecificControls() 
{
    form.ctnDetails().lblIncludeinTTO().setVisible(false);
    form.ctnDetails().chkTTO().setVisible(false);
    form.ctnDetails().lblNumDays().setVisible(false);
    form.ctnDetails().intNumDays().setVisible(false);
    form.recbrOverviews().setVisible(false);

    MedicationSnapShot screenType = form.getLocalContext().getScreenType();
    if (screenType != null)
    {
        if (screenType.equals(MedicationSnapShot.DISCHARGE) || screenType.equals(MedicationSnapShot.OPD))
        {
            form.ctnDetails().lblIncludeinTTO().setVisible(true);
            form.ctnDetails().chkTTO().setVisible(true);
            form.ctnDetails().lblNumDays().setVisible(true);
            form.ctnDetails().intNumDays().setVisible(true);

            form.ctnDetails().chkTTO().setEnabled(form.getMode().equals(FormMode.EDIT));
            form.ctnDetails().intNumDays().setEnabled(form.getMode().equals(FormMode.EDIT));
        }
        else if(screenType.equals(MedicationSnapShot.PATIENT))
        {
            form.recbrOverviews().setEnabled(true);
            form.recbrOverviews().setVisible(true);
            form.setcustomControlAuthoringInfoEnabled(false);
            form.setMode(FormMode.VIEW);
        }
    }
    if (form.getMode().equals(FormMode.VIEW) )
    {
        form.chkFilter().setVisible(false);
        form.setcustomControlAuthoringInfoEnabled(false);
        if (form.getLocalContext().getCurrentOverViewIsNotNull()) 
            form.chkFilter().setVisible(true);
    }
    else
    {
        form.setcustomControlAuthoringInfoEnabled(true);
        if (isDialog())
            isBtnCloseVisible(true);
    }
}
项目:openmaxims-linux    文件:Logic.java   
public void updateControlsState()
{
    form.getContextMenus().hideAllMedicationMultipleMenuItems();
    form.getContextMenus().hideAllMedicationMultipleDosesMenuItems();
    boolean isRieMode = engine.isRIEMode();

    form.getContextMenus().getMedicationMultipleNEW_MEDICATIONItem().setVisible(form.getMode().equals(FormMode.VIEW) && !isRieMode);
    form.getContextMenus().getMedicationMultipleNEW_MEDICATIONItem().setEnabled(form.getMode().equals(FormMode.VIEW));

    form.getContextMenus().getMedicationMultipleUPDATE_MEDICATIONItem().setVisible( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) && !isRieMode);
    form.getContextMenus().getMedicationMultipleUPDATE_MEDICATIONItem().setEnabled( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) );

    form.getContextMenus().getMedicationMultipleDISCONTINUE_MEDICATIONItem().setVisible( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) && !isRieMode );
    form.getContextMenus().getMedicationMultipleDISCONTINUE_MEDICATIONItem().setEnabled( (form.getMode().equals(FormMode.VIEW)) 
            && (form.dyngrdMedication().getSelectedRow() != null) );


    form.getContextMenus().getMedicationMultipleDosesNEW_DOSEItem().setVisible(form.getMode().equals(FormMode.EDIT));
    form.getContextMenus().getMedicationMultipleDosesNEW_DOSEItem().setEnabled(form.getMode().equals(FormMode.EDIT));

    form.getContextMenus().getMedicationMultipleDosesDISCONTINUE_DOSEItem().setVisible( (form.getMode().equals(FormMode.EDIT)) 
            && (form.ctnDetails().dyngrdDoses().getSelectedRow() != null) );
    form.getContextMenus().getMedicationMultipleDosesDISCONTINUE_DOSEItem().setEnabled( (form.getMode().equals(FormMode.EDIT)) 
            && (form.ctnDetails().dyngrdDoses().getSelectedRow() != null) );


    if (form.getMode().equals(FormMode.EDIT))
    {
        form.ctnDetails().setcustomControlCodingItemEnabled(true);
        form.customControlAuthoringInfo().setIsRequiredPropertyToControls(true); //wdev-15369
        form.customControlAuthoringInfo().setEnabledAuthoringHCP(true);
    }
    else
    {
        form.customControlAuthoringInfo().setIsRequiredPropertyToControls(false);   //wdev-15369
        form.customControlAuthoringInfo().setEnabledAuthoringHCP(false);
    }

    form.ctnDetails().customControlCodingItem().setParentEditing(new Boolean(form.getMode().equals(FormMode.EDIT)));        


    if (form.getLocalContext().getScreenTypeIsNotNull() 
            && form.getLocalContext().getScreenType().equals(MedicationSnapShot.PATIENT) )
    {
        form.getContextMenus().hideAllMedicationMultipleMenuItems();
        form.getContextMenus().hideAllMedicationMultipleDosesMenuItems();
    }
}