Procedure

LoadReminderData

Module

uReminders

Last Modified

10/8/2014 2:49:30 PM

Scope

Interfaced

Declaration

procedure LoadReminderData(ProcessingInBackground: boolean = FALSE);

Calls Hierarchy


LoadReminderData
 ├BeginReminderUpdate
 ├GetCurrentReminders
 ├CheckReminders
 │ ├EvaluateReminders
 │ └ReminderEvaluated
 ├GetOtherReminders
 └EndReminderUpdate

Called-By Hierarchy


                          LoadReminderData
                        StartupReminders┤ 
       TfrmFrame.pnlRemindersMouseDown┤ │ 
          TfrmFrame.RemindersChanged┘ │ │ 
              TfrmFrame.FormCreate┘   │ │ 
          TfrmDrawers.sbRemindersClick┤ │ 
                      ViewReminderTree┘ │ 
                  TfrmFrame.ViewInfo┘   │ 
               TfrmDCSumm.ViewInfo┤     │ 
             TfrmConsults.ViewInfo┤     │ 
     TfrmFrame.pnlRemindersMouseUp┤     │ 
   TfrmFrame.RemindersChanged...┘ │     │ 
            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┘     │ 
                       ResetReminderLoad┤ 
            EditCoverSheetReminderList┘ │ 
 TfrmReminderTree.mnuCoverSheetClick┤   │ 
              DialogOptionsReminders┘   │ 
TfrmOptions.btnCoverRemindersClick┘     │ 
                         LocationChanged┤ 
                   InitReminderObjects┘ │ 
           uReminders.initialization┘   │ 
                   TfrmCover.DisplayPage┘ 
              TfrmCover.CoverItemClick┘   

Calls

Name Declaration Comments
BeginReminderUpdate procedure BeginReminderUpdate; -
CheckReminders procedure CheckReminders; -
EndReminderUpdate procedure EndReminderUpdate(Force: boolean = FALSE); -
GetCurrentReminders procedure GetCurrentReminders; -
GetOtherReminders procedure GetOtherReminders(Dest: TStrings); -

Called-By

Name Declaration Comments
TfrmCover.DisplayPage procedure DisplayPage; override; -
LocationChanged procedure LocationChanged(Sender: TObject); -
ResetReminderLoad procedure ResetReminderLoad; -
StartupReminders procedure StartupReminders; -


Source

1001  procedure LoadReminderData(ProcessingInBackground: boolean = FALSE);
1002  var
1003    i, idx: integer;
1004    RemID: string;
1005    TempList: TORStringList;
1006  
1007  begin
1008    if(RemindersStarted and (LastReminderLocation <> Encounter.Location)) then
1009    begin
1010      LastReminderLocation := Encounter.Location;
1011      BeginReminderUpdate;
1012      try
1013        GetCurrentReminders;
1014        TempList := TORStringList.Create;
1015        try
1016          if(RPCBrokerV.Results.Count > 0) then
1017          begin
1018            for i := 0 to RPCBrokerV.Results.Count-1 do
1019            begin
1020              RemID := RPCBrokerV.Results[i];
1021              idx := EvaluatedReminders.IndexOfPiece(RemID);
1022              if(idx < 0) then
1023              begin
1024                TempList.Add(RemID);
1025                if(not ProcessingInBackground) then
1026                  ReminderCallList.Add(RemID);
1027              end
1028              else
1029                TempList.Add(EvaluatedReminders[idx]);
1030            end;
1031          end;
1032          // FastAssign(TempList,ActiveReminders);
1033          for i := 0 to TempList.Count-1 do
1034          begin
1035            RemID := Piece(TempList[i],U,1);
1036            if(ActiveReminders.indexOfPiece(RemID) < 0) then
1037              ActiveReminders.Add(TempList[i]);
1038          end;
1039        finally
1040          TempList.Free;
1041        end;
1042        CheckReminders;
1043        GetOtherReminders(OtherReminders);
1044      finally
1045        EndReminderUpdate;
1046      end;
1047    end;
1048  end;