Function

TfrmLabs.AllowContextChange

Directives

Override

Module

fLabs

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public

Overrides

TfrmPage.AllowContextChange

Owner

TfrmLabs

Declaration

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

Calls Hierarchy


TfrmLabs.AllowContextChange
 └TRemoteSite.ReportClear

Called-By Hierarchy


                  TfrmLabs.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
TRemoteSite.ReportClear procedure ReportClear; -

Called-By

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


Source

446   function TfrmLabs.AllowContextChange(var WhyNot: string): Boolean;
447   var
448     i: integer;
449   begin
450     Result := inherited AllowContextChange(WhyNot);  // sets result = true
451     if Timer1.Enabled = true then
452       case BOOLCHAR[frmFrame.CCOWContextChanging] of
453         '1': begin
454                WhyNot := 'A remote data query in progress will be aborted.';
455                Result := False;
456              end;
457         '0': if WhyNot = 'COMMIT' then
458                begin
459                  with RemoteSites.SiteList do for i := 0 to Count - 1 do
460                    if TRemoteSite(Items[i]).Selected then
461                    if Length(TRemoteSite(Items[i]).LabRemoteHandle) > 0 then
462                      begin
463                        TRemoteSite(Items[i]).ReportClear;
464                        TRemoteSite(Items[i]).LabQueryStatus := '-1^Aborted';
465                        TabControl1.OnChange(nil);
466                      end;
467                  Timer1.Enabled := false;
468                  Result := True;
469                end;
470       end;
471   end;