Exemple #1
0
  private void updateControlsState() {
    form.getContextMenus()
        .Emergency
        .getAreaWorkspaceConfigEditColumnsItem()
        .setVisible(FormMode.EDIT.equals(form.getMode()));
    form.getContextMenus()
        .Emergency
        .getAreaWorkspaceConfigPreviewItem()
        .setVisible(form.cmbArea().getValue() != null);
    form.getContextMenus()
        .Emergency
        .getAreaWorkspaceConfigMoveUpItem()
        .setVisible(
            FormMode.EDIT.equals(form.getMode())
                && form.grdAreaWorkspace().canMoveCurrentUp()); // latest changes 06.04.2012
    form.getContextMenus()
        .Emergency
        .getAreaWorkspaceConfigMoveDownItem()
        .setVisible(
            FormMode.EDIT.equals(form.getMode())
                && form.grdAreaWorkspace().canMoveCurrentDown()); // latest changes 06.04.2012

    // WDEV-14896
    form.getContextMenus()
        .Emergency
        .getAreaWorkspaceConfigCopyItem()
        .setVisible(FormMode.VIEW.equals(form.getMode()) && form.cmbArea().getValue() == null);
  }
  private void updateControlsState() {
    form.btnNew().setVisible(FormMode.VIEW.equals(form.getMode()));

    form.btnNew()
        .setEnabled(
            FormMode.VIEW.equals(form.getMode())
                && domain.isMostRecentRecordReturned(
                    form.getGlobalContext().Core.getCurrentCareContext()));

    form.btnEdit()
        .setVisible(
            FormMode.VIEW.equals(form.getMode()) && form.recbrSentToXRay().getValue() != null);

    form.ccAllocatedBy().isRequired(FormMode.EDIT.equals(form.getMode()));

    // state for Returned DateTime and SetCurrentStatus combo
    form.chkReturned().setVisible(form.recbrSentToXRay().getValue() != null);
    form.chkReturned()
        .setEnabled(
            FormMode.EDIT.equals(form.getMode()) && form.recbrSentToXRay().getValue() != null);

    form.lblReturnedDateTime().setVisible(form.chkReturned().getValue());
    form.dtimReturned().setVisible(form.chkReturned().getValue());
    form.lblSetCurrent().setVisible(form.chkReturned().getValue());
    form.lblStatusTo().setVisible(form.chkReturned().getValue());
    form.cmbSetCurrentStatus().setVisible(form.chkReturned().getValue());
    form.cmbSetCurrentStatus().setVisible(form.chkReturned().getValue());

    form.dtimReturned()
        .setEnabled(
            FormMode.EDIT.equals(form.getMode()) && form.recbrSentToXRay().getValue() != null);
    form.lblSetCurrent()
        .setEnabled(
            FormMode.EDIT.equals(form.getMode()) && form.recbrSentToXRay().getValue() != null);
    form.lblStatusTo()
        .setEnabled(
            FormMode.EDIT.equals(form.getMode()) && form.recbrSentToXRay().getValue() != null);
    form.cmbSetCurrentStatus()
        .setEnabled(
            FormMode.EDIT.equals(form.getMode()) && form.recbrSentToXRay().getValue() != null);

    form.dtimReturned().setRequired(form.chkReturned().getValue());

    // in view mode Label for statusCombo should be : "Current Status:", In Edit Mode it should be
    // "Set Current Status To:"
    form.lblSetCurrent()
        .setValue(FormMode.EDIT.equals(form.getMode()) ? "Set Current" : "     Current");
    form.lblStatusTo()
        .setValue(FormMode.EDIT.equals(form.getMode()) ? "Status to:" : "     Status:");

    // in edit mode it should not be a value for statusCombo
    if (FormMode.EDIT.equals(form.getMode())) {
      form.cmbSetCurrentStatus().setValue(null);
    }
  }
Exemple #3
0
  private void updatePcaEpiduralSpinalControlState() {

    boolean isEpiduralSelected =
        form.lyrPain()
            .tabPageACutePainRefDet()
            .GroupPCAEpidural()
            .getValue()
            .equals(GroupPCAEpiduralEnumeration.rdoEpidural);
    boolean isEpiSpinalSelected =
        form.lyrPain()
            .tabPageACutePainRefDet()
            .GroupPCAEpidural()
            .getValue()
            .equals(GroupPCAEpiduralEnumeration.rdoEpiSpinal);
    boolean isPCASelected =
        form.lyrPain()
            .tabPageACutePainRefDet()
            .GroupPCAEpidural()
            .getValue()
            .equals(GroupPCAEpiduralEnumeration.rdoPCA);
    boolean isSpinalSelected =
        form.lyrPain()
            .tabPageACutePainRefDet()
            .GroupPCAEpidural()
            .getValue()
            .equals(GroupPCAEpiduralEnumeration.rdoSpinal);
    boolean editMode = FormMode.EDIT.equals(form.getMode());

    // epidural

    form.lyrPain()
        .tabPageACutePainRefDet()
        .txtLevelInserted()
        .setEnabled((isEpiduralSelected || isEpiSpinalSelected) && editMode);

    form.lyrPain()
        .tabPageACutePainRefDet()
        .intCathInSpace()
        .setEnabled((isEpiduralSelected || isEpiSpinalSelected) && editMode);

    form.lyrPain()
        .tabPageACutePainRefDet()
        .intCathToSkin()
        .setEnabled((isEpiduralSelected || isEpiSpinalSelected) && editMode);

    form.lyrPain()
        .tabPageACutePainRefDet()
        .cmbMixType()
        .setEnabled((isEpiduralSelected || isEpiSpinalSelected) && editMode);

    // spinal

    form.lyrPain()
        .tabPageACutePainRefDet()
        .cmbSpinalMix()
        .setEnabled((isSpinalSelected || isEpiSpinalSelected) && editMode);

    // PCA
    form.lyrPain()
        .tabPageACutePainRefDet()
        .chklistPcaMorphine()
        .setEnabled(isPCASelected && editMode);

    form.lyrPain()
        .tabPageACutePainRefDet()
        .cmbPcaOtherOpiate()
        .setEnabled(isPCASelected && editMode);

    form.lyrPain()
        .tabPageACutePainRefDet()
        .txtRegionalBlock()
        .setEnabled(isPCASelected && editMode);

    form.lyrPain().tabPageACutePainRefDet().txtPainBuster().setEnabled(isPCASelected && editMode);
  }
Exemple #4
0
 private void updateControlState() {
   boolean isEditMode = FormMode.EDIT.equals(form.getMode());
   form.getContextMenus().Clinical.getPainTeamAssessmentAddItem().setVisible(isEditMode);
   updatePcaEpiduralSpinalControlState();
   form.lyrPain().tabPageACutePainRefDet().chk1().setEnabled(isEditMode);
 }