Function

TfrmProblems.AllowContextChange

Directives

Override

Module

fProbs

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public

Overrides

TfrmPage.AllowContextChange

Owner

TfrmProblems

Declaration

function  AllowContextChange(var WhyNot: string): Boolean; override;

Calls Hierarchy


TfrmProblems.AllowContextChange
 └TfrmdlgProb.bbQuitClick
   └TfrmdlgProb.OkToQuit

Called-By Hierarchy


              TfrmProblems.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┘   

Calls

Name Declaration Comments
TfrmdlgProb.bbQuitClick procedure bbQuitClick(Sender: TObject); -

Called-By

Name Declaration Comments
TfrmFrame.AllowContextChangeAll function AllowContextChangeAll(var Reason: string): Boolean; -


Source

229   function TfrmProblems.AllowContextChange(var WhyNot: string): Boolean;
230   begin
231     Result := inherited AllowContextChange(WhyNot);  // sets result = true
232     //if dlgProbs <> nil then Result := dlgProbs.OkToQuit;
233     //if dlgProbs <> nil then dlgProbs.bbQuitClick(Self);
234     //need to check here and set to false if quit was cancelled or true if accepted
235   
236     if dlgProbs <> nil then
237       case BOOLCHAR[frmFrame.CCOWContextChanging] of
238       '1': begin
239              WhyNot := 'Changes to current problem will be discarded.';
240              Result := False;
241            end;
242       '0': begin
243              if WhyNot = 'COMMIT' then
244                begin
245                  FSilent := True;
246                  dlgProbs.Silent := True;
247                  dlgProbs.bbQuitClick(Self);
248                end
249              else
250                begin
251                  dlgProbs.bbQuitClick(Self);
252                  Result := dlgProbs.CanQuit;
253                end;
254            end;
255       end;
256   end;