Procedure

TfrmConsults.SetActionMenus

Module

fConsults

Last Modified

7/15/2014 3:26:34 PM

Comments

Set available menu actions based on consult status and user access to consult's service

Visibility

Private

Owner

TfrmConsults

Declaration

procedure SetActionMenus ;

Calls Hierarchy


TfrmConsults.SetActionMenus
 ├GetActionMenuLevel
 │ └ConsultCanBeResubmitted
 └TNotifications.GetFollowUp

Called-By Hierarchy


                                                     TfrmConsults.SetActionMenus
                                                 TfrmConsults.lstConsultsClick┘ 
                                               TfrmConsults.tvConsultsChange┘   
                                TfrmConsults.mnuActDetachFromIDParentClick┤     
                                                  TfrmConsults.NotifyOrder┤     
                                                    TfrmFrame.UMNewOrder┘ │     
                                    TfrmConsults.mnuActDisplayDetailsClick┤     
                               TfrmConsults.mnuActIdentifyAddlSignersClick┤     
                                   TfrmConsults.popNoteMemoAddlSignClick┘ │     
                                         TfrmConsults.ProcessNotifications┤     
                                                TfrmConsults.DisplayPage┘ │     
                                                 TfrmConsults.LoadConsults┤     
                                                 TfrmConsults.UpdateList┤ │     
                                             TfrmConsults.mnuViewClick┤ │ │     
                                         TfrmConsults.SetViewContext┘ │ │ │     
                                          TfrmConsults.DisplayPage┤   │ │ │     
                          TfrmConsults.mnuViewReturntoDefaultClick┘   │ │ │     
                                    TfrmConsults.mnuActNoteDeleteClick┤ │ │     
                                      TfrmConsults.SaveEditedConsult┘ │ │ │     
                                      TfrmConsults.SaveCurrentNote┘   │ │ │     
                                 TfrmConsults.AllowContextChange┤     │ │ │     
                               TfrmFrame.AllowContextChangeAll┘ │     │ │ │     
                                    TfrmFrame.FormCloseQuery┤   │     │ │ │     
                                  TfrmFrame.mnuFileNextClick┤   │     │ │ │     
                                TfrmFrame.mnuFileOpenClick┤ │   │     │ │ │     
                                    TfrmFrame.UMInitiate┤ │ │   │     │ │ │     
                           TfrmFrame.mnuFileNextClick...┤ │ │   │     │ │ │     
                           TfrmFrame.mnuFileRefreshClick┤ │ │   │     │ │ │     
                           TfrmOrders.CheckOrderStatus┤ │ │ │   │     │ │ │     
                       TfrmOrders.mnuActChgEvntClick┤ │ │ │ │   │     │ │ │     
                          TfrmOrders.mnuActHoldClick┤ │ │ │ │   │     │ │ │     
                        TfrmOrders.mnuActUnholdClick┤ │ │ │ │   │     │ │ │     
                         TfrmOrders.mnuActRenewClick┤ │ │ │ │   │     │ │ │     
                        TfrmOrders.mnuActChangeClick┤ │ │ │ │   │     │ │ │     
                          TfrmOrders.mnuActCopyClick┘ │ │ │ │   │     │ │ │     
                                TfrmMeds.mnuActDCClick┤ │ │ │   │     │ │ │     
                               TfrmMeds.CheckMedStatus┘ │ │ │   │     │ │ │     
                            TfrmMeds.mnuActHoldClick┤   │ │ │   │     │ │ │     
                           TfrmMeds.mnuActRenewClick┤   │ │ │   │     │ │ │     
                          TfrmMeds.mnuActUnholdClick┤   │ │ │   │     │ │ │     
                          TfrmMeds.mnuActChangeClick┤   │ │ │   │     │ │ │     
                            TfrmMeds.mnuActCopyClick┤   │ │ │   │     │ │ │     
                          TfrmMeds.mnuActRefillClick┘   │ │ │   │     │ │ │     
                                      TfrmFrame.ViewInfo┘ │ │   │     │ │ │     
                                   TfrmDCSumm.ViewInfo┤   │ │   │     │ │ │     
                                 TfrmConsults.ViewInfo┤   │ │   │     │ │ │     
                         TfrmFrame.pnlRemindersMouseUp┤   │ │   │     │ │ │     
                          TfrmFrame.RemindersChanged┘ │   │ │   │     │ │ │     
                              TfrmFrame.FormCreate┘   │   │ │   │     │ │ │     
                                TfrmFrame.pnlCIRNClick┤   │ │   │     │ │ │     
                          TfrmFrame.pnlVistaWebClick┤ │   │ │   │     │ │ │     
                               TfrmFrame.FormKeyDown┘ │   │ │   │     │ │ │     
                             TfrmFrame.pnlPatientClick┤   │ │   │     │ │ │     
                               TfrmFrame.pnlVisitClick┤   │ │   │     │ │ │     
                         TfrmFrame.pnlPrimaryCareClick┤   │ │   │     │ │ │     
                           TfrmFrame.pnlRemindersClick┤   │ │   │     │ │ │     
                            TfrmFrame.pnlPostingsClick┤   │ │   │     │ │ │     
                                TfrmFrame.pnlFlagClick┤   │ │   │     │ │ │     
                                  TfrmFrame.laMHVClick┤   │ │   │     │ │ │     
                                 TfrmFrame.laVAA2Click┤   │ │   │     │ │ │     
                                   TfrmOrders.ViewInfo┤   │ │   │     │ │ │     
                                     TfrmMeds.ViewInfo┤   │ │   │     │ │ │     
                                  TfrmSurgery.ViewInfo┤   │ │   │     │ │ │     
                                    TfrmNotes.ViewInfo┤   │ │   │     │ │ │     
                                 TfrmProblems.ViewInfo┘   │ │   │     │ │ │     
                         TfrmFrame.mnuFileNotifRemoveClick┤ │   │     │ │ │     
                                 TfrmFrame.NextButtonClick┘ │   │     │ │ │     
                               TfrmFrame.SetUpNextButton┘   │   │     │ │ │     
                         TfrmFrame.mnuFileOpenClick...┤     │   │     │ │ │     
                                  TfrmFrame.FormResize┘     │   │     │ │ │     
                                TfrmFrame.ChangeFont┘       │   │     │ │ │     
                        TfrmFrame.LoadSizesForUser┤         │   │     │ │ │     
                   TfrmFrame.LoadUserPreferences┘ │         │   │     │ │ │     
                          TfrmFrame.UMInitiate┘   │         │   │     │ │ │     
                        TfrmFrame.mnuFontSizeClick┘         │   │     │ │ │     
                               TfrmFrame.mnuFileOpenClick...┤   │     │ │ │     
                               TfrmFrame.ctxContextorPending┤   │     │ │ │     
                              TfrmFrame.StartCCOWContextor┘ │   │     │ │ │     
                                    TfrmFrame.FormCreate┘   │   │     │ │ │     
                             TfrmFrame.ctxContextorCommitted┤   │     │ │ │     
                           TfrmFrame.StartCCOWContextor...┘ │   │     │ │ │     
                      TfrmFrame.mnuFileResumeContextGetClick┤   │     │ │ │     
                      TfrmFrame.mnuFileResumeContextSetClick┘   │     │ │ │     
                                  TfrmConsults.SetViewContext...┤     │ │ │     
                                    TfrmConsults.mnuViewClick...┤     │ │ │     
                      TfrmConsults.mnuActDetachFromIDParentClick┤     │ │ │     
                           TfrmConsults.mnuActNoteDeleteClick...┤     │ │ │     
                           TfrmConsults.mnuActSignatureSaveClick┤     │ │ │     
                           TfrmConsults.mnuActSignatureSignClick┤     │ │ │     
                                       TfrmConsults.SaveSignItem┤     │ │ │     
                                         TfrmReview.cmdOKClick┘ │     │ │ │     
                                               ReviewChanges┘   │     │ │ │     
                        TfrmFrame.AllowContextChangeAll...┤     │     │ │ │     
                                  TfrmFrame.FormCloseQuery┤     │     │ │ │     
                              TfrmFrame.mnuFileReviewClick┤     │     │ │ │     
                                           UpdateEncounter┘     │     │ │ │     
                         TfrmFrame.mnuFileEncounterClick┤       │     │ │ │     
                                 TfrmFrame.ViewInfo...┤ │       │     │ │ │     
                    TfrmODMedIV.SetValuesFromResponses┤ │       │     │ │ │     
                             TfrmODMedIV.SetupDialog┤ │ │       │     │ │ │     
                   TfrmODMedIV.cboSolutionMouseClick┘ │ │       │     │ │ │     
                       TfrmODMedIV.cboSolutionExit┘   │ │       │     │ │ │     
                  TfrmODMedIV.cboSolutionMouseClick...┤ │       │     │ │ │     
                     TfrmODMedIV.cboAdditiveMouseClick┤ │       │     │ │ │     
                         TfrmODMedIV.cboAdditiveExit┘ │ │       │     │ │ │     
                                TfrmODAuto.SetupDialog┤ │       │     │ │ │     
                                   ActivateOrderDialog┤ │       │     │ │ │     
                           TfrmRemDlg.btnFinishClick┤ │ │       │     │ │ │     
           TfrmConsults.mnuActNewConsultRequestClick┤ │ │       │     │ │ │     
                   TfrmConsults.cmdNewConsultClick┘ │ │ │       │     │ │ │     
                TfrmConsults.mnuActNewProcedureClick┤ │ │       │     │ │ │     
                      TfrmConsults.cmdNewProcClick┘ │ │ │       │     │ │ │     
                                        ChangeOrders┤ │ │       │     │ │ │     
                      TfrmOrders.mnuActChangeClick┤ │ │ │       │     │ │ │     
                        TfrmMeds.mnuActChangeClick┘ │ │ │       │     │ │ │     
                                     ChangeOrdersEvt┤ │ │       │     │ │ │     
                                          CopyOrders┤ │ │       │     │ │ │     
                        TfrmOrders.mnuActCopyClick┤ │ │ │       │     │ │ │     
                          TfrmMeds.mnuActCopyClick┤ │ │ │       │     │ │ │     
                           TfrmODActive.btnOKClick┘ │ │ │       │     │ │ │     
                                      TransferOrders┤ │ │       │     │ │ │     
                        TfrmOrders.mnuActCopyClick┤ │ │ │       │     │ │ │     
                          TfrmMeds.mnuActCopyClick┤ │ │ │       │     │ │ │     
                           TfrmODActive.btnOKClick┘ │ │ │       │     │ │ │     
                            TfrmOrders.lstWriteClick┤ │ │       │     │ │ │     
               TfrmOrders.PlaceOrderForDefaultDialog┤ │ │       │     │ │ │     
                  TfrmOrders.DisplayDefaultDlgList┤ │ │ │       │     │ │ │     
                       TfrmOrders.ResetOrderPage┘ │ │ │ │       │     │ │ │     
               TfrmOrders.btnDelayedOrderClick┘   │ │ │ │       │     │ │ │     
                                 DisplayEvntDialog┤ │ │ │       │     │ │ │     
                             SetDelayEventForMed┘ │ │ │ │       │     │ │ │     
                      TfrmMeds.mnuActCopyClick┘   │ │ │ │       │     │ │ │     
                                 DisplayEvntDialog┤ │ │ │       │     │ │ │     
                                  SetViewForCopy┘ │ │ │ │       │     │ │ │     
                    TfrmOrders.mnuActCopyClick┘   │ │ │ │       │     │ │ │     
                                 DisplayEvntDialog┘ │ │ │       │     │ │ │     
                                ExecuteChangeEvt┘   │ │ │       │     │ │ │     
                 TfrmOrders.mnuActChgEvntClick┘     │ │ │       │     │ │ │     
                             TfrmMeds.mnuActNewClick┤ │ │       │     │ │ │     
                           TfrmOMNavA.ActivateDialog┤ │ │       │     │ │ │     
                         TfrmOMNavA.grdMenuKeyDown┤ │ │ │       │     │ │ │     
                         TfrmOMNavA.grdMenuMouseUp┘ │ │ │       │     │ │ │     
                                TfrmOMSet.DoNextItem┘ │ │       │     │ │ │     
                              TfrmOMSet.InsertList┤   │ │       │     │ │ │     
                               ActivateOrderList┘ │   │ │       │     │ │ │     
                     TfrmRemDlg.btnFinishClick┤   │   │ │       │     │ │ │     
                             ActivateOrderHTML┤   │   │ │       │     │ │ │     
                    TfrmOrders.lstWriteClick┤ │   │   │ │       │     │ │ │     
    TfrmOrders.PlaceOrderForDefaultDialog...┘ │   │   │ │       │     │ │ │     
                              ActivateOrderSet┤   │   │ │       │     │ │ │     
                   TfrmRemDlg.btnFinishClick┤ │   │   │ │       │     │ │ │     
TfrmConsults.mnuActNewConsultRequestClick...┤ │   │   │ │       │     │ │ │     
     TfrmConsults.mnuActNewProcedureClick...┤ │   │   │ │       │     │ │ │     
                    TfrmOrders.lstWriteClick┤ │   │   │ │       │     │ │ │     
    TfrmOrders.PlaceOrderForDefaultDialog...┤ │   │   │ │       │     │ │ │     
                     TfrmMeds.mnuActNewClick┤ │   │   │ │       │     │ │ │     
                TfrmOMNavA.ActivateDialog...┤ │   │   │ │       │     │ │ │     
                     TfrmOMSet.DoNextItem...┘ │   │   │ │       │     │ │ │     
                       TfrmOMNavA.DoSelectList┘   │   │ │       │     │ │ │     
                     TfrmOMNavA.grdMenuKeyUp┤     │   │ │       │     │ │ │     
                   TfrmOMNavA.grdMenuMouseUp┘     │   │ │       │     │ │ │     
                                        SkipToNext┤   │ │       │     │ │ │     
                         TfrmOMSet.DoNextItem...┘ │   │ │       │     │ │ │     
                            TfrmOMSet.UMDelayEvent┘   │ │       │     │ │ │     
                               TfrmOMSet.InsertList...┤ │       │     │ │ │     
                                TfrmODMeds.SetupDialog┤ │       │     │ │ │     
                             TfrmODMeds.btnSelectClick┤ │       │     │ │ │     
                             TfrmODMeds.UMDelayClick┘ │ │       │     │ │ │     
                                    ExecuteRenewOrders┘ │       │     │ │ │     
                         TfrmOrders.mnuActRenewClick┤   │       │     │ │ │     
                           TfrmMeds.mnuActRenewClick┘   │       │     │ │ │     
                                        EncounterPresent┤       │     │ │ │     
                                      ReadyForNewOrder┤ │       │     │ │ │     
                           TfrmRemDlg.btnFinishClick┤ │ │       │     │ │ │     
        TfrmConsults.mnuActNewConsultRequestClick...┤ │ │       │     │ │ │     
             TfrmConsults.mnuActNewProcedureClick...┤ │ │       │     │ │ │     
                                     ChangeOrders...┤ │ │       │     │ │ │     
                                     ChangeOrdersEvt┤ │ │       │     │ │ │     
                                       CopyOrders...┤ │ │       │     │ │ │     
                                   TransferOrders...┤ │ │       │     │ │ │     
                            TfrmOrders.lstWriteClick┤ │ │       │     │ │ │     
                             TfrmMeds.mnuActNewClick┘ │ │       │     │ │ │     
                                     ReadyForNewOrder1┤ │       │     │ │ │     
            TfrmOrders.PlaceOrderForDefaultDialog...┘ │ │       │     │ │ │     
                              TfrmOrders.mnuActDCClick┤ │       │     │ │ │     
                             TfrmOrders.mnuActRelClick┤ │       │     │ │ │     
                            TfrmOrders.mnuActHoldClick┤ │       │     │ │ │     
                          TfrmOrders.mnuActUnholdClick┤ │       │     │ │ │     
                           TfrmOrders.mnuActRenewClick┤ │       │     │ │ │     
                         TfrmOrders.mnuActReleaseClick┤ │       │     │ │ │     
                         TfrmOrders.mnuActOnChartClick┤ │       │     │ │ │     
                            TfrmOrders.mnuActSignClick┤ │       │     │ │ │     
                                TfrmMeds.mnuActDCClick┤ │       │     │ │ │     
                              TfrmMeds.mnuActHoldClick┤ │       │     │ │ │     
                             TfrmMeds.mnuActRenewClick┤ │       │     │ │ │     
                            TfrmMeds.mnuActUnholdClick┤ │       │     │ │ │     
                              TfrmMeds.mnuActCopyClick┤ │       │     │ │ │     
                            TfrmMeds.mnuActRefillClick┘ │       │     │ │ │     
                                     EncounterPresentEDO┤       │     │ │ │     
                                   ReadyForNewOrder...┤ │       │     │ │ │     
                         TfrmOrders.mnuActChgEvntClick┤ │       │     │ │ │     
                          TfrmOrders.mnuActChangeClick┤ │       │     │ │ │     
                            TfrmOrders.mnuActCopyClick┤ │       │     │ │ │     
                       TfrmOrders.btnDelayedOrderClick┤ │       │     │ │ │     
                            TfrmMeds.mnuActChangeClick┤ │       │     │ │ │     
                              TfrmMeds.mnuActCopyClick┘ │       │     │ │ │     
                                             UpdateVisit┤       │     │ │ │     
                                           EditPCEData┤ │       │     │ │ │     
                             TfrmSurgery.cmdPCEClick┤ │ │       │     │ │ │     
                                 UpdateEncounterInfo┘ │ │       │     │ │ │     
                             TfrmNotes.cmdPCEClick┘   │ │       │     │ │ │     
                        TfrmVitals.btnEnterVitalsClick┘ │       │     │ │ │     
                                             UpdateVisit┤       │     │ │ │     
                                        EncounterPresent┘       │     │ │ │     
                         TfrmProblems.lstProbActsClick┘         │     │ │ │     
                     TfrmProblems.wgProbDataDblClick┤           │     │ │ │     
                           TfrmProblems.lstViewClick┘           │     │ │ │     
                   TfrmProblems.HighlightDuplicate┘             │     │ │ │     
                         TfrmProblems.AddProblem┤               │     │ │ │     
              TfrmProblems.lstProbActsClick...┤ │               │     │ │ │     
                 TfrmProblems.lstProbPickClick┤ │               │     │ │ │     
              TfrmProblems.lstProbPickDblClick┤ │               │     │ │ │     
              TfrmProblems.edProbEntKeyPress┘ │ │               │     │ │ │     
                      TfrmProblems.UMPLLexicon┘ │               │     │ │ │     
                   TfrmdlgProb.bbChangeProbClick┘               │     │ │ │     
                                 TfrmConsults.mnuActConsultClick┤     │ │ │     
                                       TfrmConsults.RequestPrint┤     │ │ │     
                            TfrmConsults.mnuActPrintSF513Click┤ │     │ │ │     
                                   TfrmFrame.mnuFilePrintClick┘ │     │ │ │     
                          TfrmConsults.mnuActDisplayResultsClick┤     │ │ │     
                          TfrmConsults.ProcessNotifications...┘ │     │ │ │     
                            TfrmConsults.mnuActDisplaySF513Click┤     │ │ │     
                              TfrmConsults.mnuActPrintSF513Click┤     │ │ │     
                          TfrmConsults.mnuActDisplayDetailsClick┤     │ │ │     
                                          TfrmConsults.FormClose┤     │ │ │     
                  TfrmConsults.mnuActIdentifyAddlSignersClick...┤     │ │ │     
                            TfrmConsults.ProcessNotifications...┤     │ │ │     
                               TfrmConsults.mnuActNotePrintClick┤     │ │ │     
                            TfrmConsults.popNoteMemoPrintClick┘ │     │ │ │     
                                       TfrmConsults.StartNewEdit┤     │ │ │     
                              TfrmConsults.mnuActCompleteClick┤ │     │ │ │     
                            TfrmConsults.mnuActAddIDEntryClick┤ │     │ │ │     
                          TfrmConsults.mnuActMakeAddendumClick┤ │     │ │ │     
                              TfrmConsults.mnuActNoteEditClick┘ │     │ │ │     
                            TfrmConsults.mnuActCompleteClick┘   │     │ │ │     
                                TfrmConsults.tvCsltNotesDragDrop┤     │ │ │     
                               TfrmConsults.tvCsltNotesStartDrag┤     │ │ │     
                        TfrmConsults.mnuActAttachtoIDParentClick┤     │ │ │     
                                 TfrmConsults.LstConsultsToPrint┘     │ │ │     
                      TfrmFrame.mnuFilePrintSelectedItemsClick┘       │ │ │     
                                 TfrmConsults.mnuActSignatureSaveClick┤ │ │     
                                 TfrmConsults.mnuActSignatureSignClick┤ │ │     
                                          TfrmConsults.SaveSignItem...┤ │ │     
                                       TfrmConsults.mnuActConsultClick┤ │ │     
                                           TfrmConsults.NotifyOrder...┤ │ │     
                                               TfrmConsults.UMNewOrder┤ │ │     
                                        TfrmConsults.ProcessMedResults┘ │ │     
                                   TfrmConsults.mnuActAttachMedClick┤   │ │     
                                   TfrmConsults.mnuActRemoveMedClick┘   │ │     
                                    TfrmConsults.mnuActEditResubmitClick┤ │     
                                     TfrmConsults.cmdEditResubmitClick┘ │ │     
                                      TfrmConsults.LstConsultsToPrint...┘ │     
                                              TfrmConsults.tvConsultsClick┤     
                                            TfrmConsults.mnuViewClick...┤ │     
                              TfrmConsults.mnuActDetachFromIDParentClick┤ │     
                                   TfrmConsults.mnuActNoteDeleteClick...┤ │     
                                   TfrmConsults.mnuActSignatureSaveClick┤ │     
                                   TfrmConsults.mnuActSignatureSignClick┤ │     
                                            TfrmConsults.SaveSignItem...┤ │     
                                         TfrmConsults.mnuActConsultClick┤ │     
                                 TfrmConsults.mnuActEditResubmitClick...┤ │     
                                            TfrmConsults.StartNewEdit...┤ │     
                                       TfrmConsults.ProcessMedResults...┤ │     
                                TfrmConsults.mnuActAttachtoIDParentClick┘ │     
                                              TfrmConsults.DoAttachIDChild┤     
                                        TfrmConsults.tvCsltNotesDragDrop┤ │     
                                TfrmConsults.mnuActAttachtoIDParentClick┘ │     
                                              TfrmConsults.tvConsultsKeyUp┘     

Calls

Name Declaration Comments
GetActionMenuLevel function GetActionMenuLevel(ConsultIEN: integer): TMenuAccessRec ; -
TNotifications.GetFollowUp function GetFollowUp: Integer; -

Called-By

Name Declaration Comments
TfrmConsults.lstConsultsClick procedure lstConsultsClick(Sender: TObject); -


Source

2321  procedure TfrmConsults.SetActionMenus ;
2322  {Set available menu actions based on consult status and user access to consult's service}
2323  var
2324     status: integer ;
2325  begin
2326  
2327       FillChar(MenuAccessRec, SizeOf(MenuAccessRec), 0);
2328       if (lstConsults.ItemIndex < 0) then
2329        begin
2330          mnuAct.Enabled := False ;
2331          exit ;
2332        end
2333       else
2334        begin
2335         MenuAccessRec  := GetActionMenuLevel(ConsultRec.IEN) ;
2336         status  := ConsultRec.ORStatus ;
2337        end ;
2338  
2339  
2340       with MenuAccessRec do
2341         begin
2342            //     mnuAct.Enabled := (UserLevel > 1) ;    {'User Review'    menu level = 1 }
2343                                               {'Service Action' menu level = 2 }
2344  
2345           mnuActConsultRequest.Enabled :=  (lstConsults.ItemIEN > 0);
2346           mnuActReceive.Enabled        :=  (UserLevel > UL_REVIEW)
2347                                                            and (status=ST_PENDING);
2348           mnuActSchedule.Enabled       :=  (UserLevel > UL_REVIEW)
2349                                                            and ((status=ST_PENDING)
2350                                                            or   (status=ST_ACTIVE));
2351           mnuActDeny.Enabled           :=  (UserLevel > UL_REVIEW)
2352                                                            and ((status<>ST_DISCONTINUED)
2353                                                            and (status<>ST_COMPLETE)
2354                                                            and (status<>ST_CANCELLED)
2355                                                            and (status<>ST_PARTIAL_RESULTS))   ;
2356  (*         mnuActEditResubmit.Enabled   :=  {(UserLevel > 1) and }(Notifications.Active)
2357              {if the user received the alert,}          and (lstConsults.ItemIEN = CurrNotifIEN)
2358              { this menu should be available }          and (status = ST_CANCELLED)
2359                                                         and (not User.NoOrdering);*)
2360          {if processing an alert - NO CHANGE HERE}
2361           if Notifications.Active and (lstConsults.ItemIEN = CurrNotifIEN) then
2362             mnuActEditResubmit.Enabled := (*(lstConsults.ItemIEN = CurrNotifIEN) and*)
2363                                           (status = ST_CANCELLED) and
2364                                           (not User.NoOrdering)
2365          {if not processing an alert, check other stuff}
2366           else
2367             mnuActEditResubmit.Enabled :=  AllowResubmit and
2368                                            (status = ST_CANCELLED) and
2369                                            (not User.NoOrdering);
2370           mnuActForward.Enabled        :=  (UserLevel > UL_REVIEW)
2371                                                         and ((status<>ST_DISCONTINUED)
2372                                                         and (status<>ST_COMPLETE)
2373                                                         and (status<>ST_CANCELLED))   ;
2374           mnuActDiscontinue.Enabled    :=  (UserLevel > UL_REVIEW)
2375                                                         and ((status<>ST_DISCONTINUED)
2376                                                         and (status<>ST_COMPLETE)
2377                                                         and (status<>ST_CANCELLED)
2378                                                         and (status<>ST_PARTIAL_RESULTS))   ;
2379           mnuActSigFindings.Enabled    :=  (UserLevel > UL_REVIEW)
2380                                                         and ((status<>ST_DISCONTINUED)
2381                                                         and (status<>ST_CANCELLED));
2382           mnuActAdminComplete.Enabled  :=  ((UserLevel = UL_ADMIN) or (UserLevel = UL_UPDATE_AND_ADMIN))
2383                                                         and ((status<>ST_DISCONTINUED)
2384                                                         and (status<>ST_COMPLETE)
2385                                                         and (status<>ST_CANCELLED));
2386  
2387           mnuActAddComment.Enabled     :=  True;
2388           mnuActDisplayDetails.Enabled :=  True;
2389           mnuActDisplayResults.Enabled :=  True;
2390           mnuActDisplaySF513.Enabled   :=  True;
2391           mnuActPrintSF513.Enabled     :=  True;
2392           mnuActConsultResults.Enabled :=  (lstConsults.ItemIEN > 0) and
2393                                            (((UserLevel = UL_UPDATE) or (UserLevel = UL_UPDATE_AND_ADMIN) or (UserLevel = UL_UNRESTRICTED)) and
2394                                            ((status<>ST_DISCONTINUED) and
2395                                             (status<>ST_CANCELLED)))
2396                                            or
2397                                             (lstConsults.ItemIEN > 0) and
2398                                            ((AllowMedResulting) and
2399                                            ((status<>ST_DISCONTINUED) and
2400                                             (status<>ST_CANCELLED)))
2401                                            or
2402                                             (lstConsults.ItemIEN > 0) and
2403                                            ((AllowMedDissociate) and
2404                                            ((status = ST_COMPLETE)))
2405                                            or
2406                                             ((Notifications.Active) and
2407                                             (lstConsults.ItemIEN = CurrNotifIEN) and
2408                                             (Notifications.FollowUp = NF_CONSULT_UNSIGNED_NOTE) and
2409                                             (lstNotes.ItemIndex > -1));
2410           cmdEditResubmit.Visible      :=  mnuActEditResubmit.Enabled;
2411         end;
2412  end ;