Procedure

TfrmGraphs.DateRangeItems

Module

fGraphs

Last Modified

7/15/2014 3:26:36 PM

Visibility

Private

Owner

TfrmGraphs

Declaration

procedure DateRangeItems(oldestdate, newestdate: double; filenum: string);

Calls Hierarchy


TfrmGraphs.DateRangeItems
 ├rpcDateItem
 │ └onoff
 ├TfrmGraphs.FileNameX
 ├TfrmGraphs.UpdateView
 └TfrmGraphs.DateRangeMultiItems

Called-By Hierarchy


                                      TfrmGraphs.DateRangeItems
                                    TfrmGraphs.FilterListView┘ 
                              TfrmGraphs.cboDateRangeChange┘   
                            TfrmReports.lstDateRangeClick┤     
                                 TfrmReports.GraphPanel┘ │     
                                    TfrmReports.Graph┤   │     
                         TfrmReports.tvReportsClick┘ │   │     
                  TfrmFrame.lstCIRNLocationsClick┤   │   │     
                            TfrmFrame.SetUpCIRN┘ │   │   │     
                       TfrmFrame.SetupPatient┘   │   │   │     
                  UpdatePatientInfoForAlert┤     │   │   │     
               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.AllowCCOWContextChange┤     │   │   │     
            TfrmFrame.mnuFileNextClick...┤ │     │   │   │     
            TfrmFrame.mnuFileOpenClick...┤ │     │   │   │     
   TfrmFrame.mnuFileResumeContextSetClick┘ │     │   │   │     
                TfrmFrame.UpdateCCOWContext┤     │   │   │     
            TfrmFrame.mnuFileOpenClick...┤ │     │   │   │     
          TfrmFrame.ctxContextorCommitted┤ │     │   │   │     
           TfrmFrame.StartCCOWContextor┘ │ │     │   │   │     
                 TfrmFrame.FormCreate┘   │ │     │   │   │     
   TfrmFrame.mnuFileResumeContextGetClick┘ │     │   │   │     
     TfrmFrame.mnuFileResumeContextSetClick┘     │   │   │     
                          TfrmReports.DisplayPage┤   │   │     
                         TfrmReports.LoadTreeView┤   │   │     
                        TfrmReports.DisplayPage┤ │   │   │     
           TfrmOptionsReportsDefault.btnOKClick┤ │   │   │     
        TfrmOptionsReportsDefault.btnResetClick┤ │   │   │     
         TfrmOptionsReportsCustom.btnApplyClick┘ │   │   │     
          TfrmOptionsReportsCustom.btnOKClick┘   │   │   │     
                 TfrmReports.ProcessNotifications┤   │   │     
                        TfrmReports.DisplayPage┘ │   │   │     
                     TfrmReports.tvReportsKeyDown┤   │   │     
                  TfrmReports.tvProceduresKeyDown┤   │   │     
                      TfrmReports.chkMaxFreqClick┤   │   │     
             TfrmOptionsReportsDefault.btnOKClick┤   │   │     
          TfrmOptionsReportsDefault.btnResetClick┤   │   │     
        TfrmOptionsReportsCustom.btnApplyClick...┘   │   │     
                        TfrmReports.tvReportsClick...┘   │     
                                    TfrmGraphs.Initialize┤     
                                 TfrmFrame.ClearPatient┤ │     
                            TfrmFrame.SetupPatient...┘ │ │     
                        TfrmFrame.mnuToolsGraphingClick┤ │     
                                 TfrmLabs.grdLabClick┤ │ │     
                              TfrmLabs.tvReportsClick┤ │ │     
                               TfrmLabs.DisplayPage┤ │ │ │     
                              TfrmLabs.LoadTreeView┤ │ │ │     
                             TfrmLabs.DisplayPage┤ │ │ │ │     
        TfrmOptionsReportsCustom.btnApplyClick...┘ │ │ │ │     
                        TfrmLabs.cmdOtherTestsClick┤ │ │ │     
                           TfrmLabs.chkMaxFreqClick┤ │ │ │     
                      TfrmLabs.ProcessNotifications┤ │ │ │     
                             TfrmLabs.DisplayPage┘ │ │ │ │     
                                          ..(rec)..┤ │ │ │     
                          TfrmLabs.tvReportsKeyDown┤ │ │ │     
                 TfrmFrame.lstCIRNLocationsClick...┘ │ │ │     
                                            ..(rec)..┘ │ │     
                                TfrmReports.ClearPtData┤ │     
                            TfrmFrame.ClearPatient...┘ │ │     
                                   TfrmReports.Graph...┘ │     
                                      TfrmGraphs.FormShow┤     
                        TfrmGraphs.btnChangeSettingsClick┤     
                         TfrmReports.btnChangeViewClick┘ │     
                             TfrmGraphs.CheckExpandedLabs┤     
                                  TfrmGraphs.ItemsClick┘ │     
                               TfrmGraphs.DisplayData┤   │     
                          TfrmFrame.ClearPatient...┤ │   │     
                         TfrmReports.ClearPtData...┤ │   │     
                               TfrmReports.Graph...┤ │   │     
                        TfrmGraphs.chkItemsTopClick┤ │   │     
                     TfrmGraphs.chkItemsBottomClick┤ │   │     
                 TfrmGraphs.mnuPopGraphIsolateClick┤ │   │     
                   TfrmGraphs.cboDateRangeChange...┤ │   │     
                           TfrmGraphs.ItemsClick...┤ │   │     
                             TfrmGraphs.ViewsChange┤ │   │     
                     TfrmGraphs.lstViewsTopChange┤ │ │   │     
                       TfrmGraphs.Initialize...┤ │ │ │   │     
                         TfrmGraphs.GraphSwitch┤ │ │ │   │     
                         TfrmGraphs.GraphSwap┘ │ │ │ │   │     
            TfrmGraphs.mnuPopGraphSwapClick┘   │ │ │ │   │     
               TfrmGraphs.cboDateRangeChange...┤ │ │ │   │     
                      TfrmGraphs.ViewSelections┘ │ │ │   │     
                TfrmReports.tvReportsClick...┤   │ │ │   │     
           TfrmGraphs.btnGraphSelectionsClick┘   │ │ │   │     
        TfrmReports.btnGraphSelectionsClick┘     │ │ │   │     
                  TfrmGraphs.lstViewsBottomChange┘ │ │   │     
                       TfrmGraphs.Initialize...┤   │ │   │     
                      TfrmGraphs.GraphSwitch...┤   │ │   │     
               TfrmGraphs.cboDateRangeChange...┤   │ │   │     
                   TfrmGraphs.ViewSelections...┘   │ │   │     
                  TfrmGraphs.mnuPopGraphRemoveClick┘ │   │     
                       TfrmGraphs.lvwItemsBottomClick┤   │     
                           TfrmGraphs.Initialize...┤ │   │     
                            TfrmGraphs.CheckContext┤ │   │     
                              TfrmGraphs.FormShow┘ │ │   │     
                       TfrmGraphs.chkDualViewsClick┤ │   │     
                         TfrmGraphs.Initialize...┤ │ │   │     
                              TfrmGraphs.FormShow┤ │ │   │     
                                           Layout┤ │ │   │     
                             TfrmGraphs.GetSize┘ │ │ │   │     
                          TfrmGraphs.FormShow┘   │ │ │   │     
             TfrmGraphs.mnuPopGraphDualViewsClick┤ │ │   │     
                     TfrmGraphs.ViewSelections...┘ │ │   │     
                          TfrmGraphs.GraphSwitch...┤ │   │     
                              TfrmGraphs.SplitClick┤ │   │     
                 TfrmGraphs.mnuPopGraphSplitClick┘ │ │   │     
                   TfrmGraphs.mnuPopGraphClearClick┤ │   │     
                              TfrmGraphs.AutoSelect┤ │   │     
                        TfrmGraphs.ViewsChange...┘ │ │   │     
                    TfrmGraphs.lvwItemsBottomChange┘ │   │     
                          TfrmGraphs.lvwItemsTopClick┘   │     
                           TfrmGraphs.Initialize...┤     │     
                                TfrmGraphs.FormShow┤     │     
                    TfrmGraphs.chkDualViewsClick...┤     │     
                          TfrmGraphs.GraphSwitch...┤     │     
                           TfrmGraphs.SplitClick...┤     │     
                   TfrmGraphs.mnuPopGraphClearClick┤     │     
                           TfrmGraphs.AutoSelect...┤     │     
                   TfrmGraphs.mnuPopGraphResetClick┤     │     
                              TfrmGraphs.FormShow┤ │     │     
            TfrmGraphs.mnuPopGraphHorizontalClick┤ │     │     
              TfrmGraphs.mnuPopGraphVerticalClick┤ │     │     
                TfrmGraphs.mnuPopGraphRemoveClick┤ │     │     
              TfrmGraphs.mnuPopGraphZoomBackClick┘ │     │     
                       TfrmGraphs.lvwItemsTopChange┘     │     
                                TfrmGraphs.ViewsChange...┤     
                     TfrmGraphs.mnuPopGraphMergeLabsClick┘     

Calls

Name Declaration Comments
TfrmGraphs.DateRangeMultiItems function DateRangeMultiItems(aOldDate, aNewDate: double; aMultiItem: string): boolean; -
TfrmGraphs.FileNameX function FileNameX(filenum: string): string; -
rpcDateItem function rpcDateItem(oldestdate, newestdate: double; filenum: string; const PatientDFN: string): TStrings; -
TfrmGraphs.UpdateView procedure UpdateView(filename, filenum, itemnum, aString: string; aListView: TListView); -

Called-By

Name Declaration Comments
TfrmGraphs.FilterListView procedure FilterListView(oldestdate, newestdate: double); -


Source

1215  procedure TfrmGraphs.DateRangeItems(oldestdate, newestdate: double; filenum: string);
1216  var
1217    i, j: integer;
1218    meddate: double;
1219    filename, iteminfo, itemnum, oldtempiteminfo, tempiteminfo, tempitemnum: string;
1220  begin
1221    FastAssign(rpcDateItem(oldestdate, newestdate, filenum, Patient.DFN), GtslScratchTemp);
1222    filename := FileNameX(filenum);
1223    lvwItemsTop.Items.BeginUpdate;
1224    oldtempiteminfo := '';
1225    with lvwItemsTop do
1226    for i := 0 to GtslScratchTemp.Count - 1 do
1227    begin
1228      tempiteminfo := GtslScratchTemp[i];
1229      tempitemnum := UpperCase(Piece(tempiteminfo, '^',2));
1230      for j := 0 to GtslItems.Count - 1 do
1231      begin
1232        iteminfo := GtslItems[j];
1233        if filenum = UpperCase(Piece(iteminfo, '^', 1)) then
1234        begin
1235          if filenum = '690' then  // recheck medicine dates & duplicates
1236          begin
1237            meddate := strtofloatdef(Piece(iteminfo, '^', 6), -BIG_NUMBER);
1238            if tempiteminfo <> oldtempiteminfo then
1239              if (meddate <> -BIG_NUMBER) and (meddate > oldestdate) and (meddate < newestdate) then
1240                if tempitemnum = UpperCase(Piece(iteminfo, '^', 2)) then
1241                begin
1242                  UpdateView(filename, filenum, tempitemnum, iteminfo, lvwItemsTop);
1243                  oldtempiteminfo := tempiteminfo;
1244                end;
1245          end
1246          else if tempitemnum = UpperCase(Piece(iteminfo, '^', 2)) then
1247            UpdateView(filename, filenum, tempitemnum, iteminfo, lvwItemsTop)
1248          else
1249            if filenum = '63' then
1250            begin
1251              itemnum := UpperCase(Piece(iteminfo, '^', 2));
1252              if tempitemnum = Piece(itemnum, '.', 1) then
1253                if DateRangeMultiItems(oldestdate, newestdate, itemnum) then
1254                  UpdateView(filename, filenum, itemnum, iteminfo, lvwItemsTop);
1255            end;
1256        end;
1257      end;
1258    end;
1259    lvwItemsTop.Items.EndUpdate;
1260  end;