Procedure

TfrmGraphs.FilterListView

Module

fGraphs

Last Modified

7/15/2014 3:26:36 PM

Visibility

Private

Owner

TfrmGraphs

Declaration

procedure FilterListView(oldestdate, newestdate: double);

Calls Hierarchy


TfrmGraphs.FilterListView
 ├TfrmGraphs.TypeIsDisplayed
 ├TfrmGraphs.DateRangeItems
 │ ├rpcDateItem
 │ │ └onoff
 │ ├TfrmGraphs.FileNameX
 │ ├TfrmGraphs.UpdateView
 │ └TfrmGraphs.DateRangeMultiItems
 ├TfrmGraphs.FileNameX
 ├TfrmGraphs.UpdateView
 └TfrmGraphs.SortListView
   ├TfrmGraphs.lvwItemsTopColumnClick
   ├TfrmGraphs.lvwItemsBottomColumnClick
   └TfrmGraphs.AssignProfile
     └TfrmGraphs.SetProfile
       └TfrmGraphs.ProfileName
         └TfrmGraphs.DCName
           └rpcClass
             └onoff

Called-By Hierarchy


                                    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.DateRangeItems procedure DateRangeItems(oldestdate, newestdate: double; filenum: string); -
TfrmGraphs.FileNameX function FileNameX(filenum: string): string; -
TfrmGraphs.SortListView procedure SortListView; -
TfrmGraphs.TypeIsDisplayed function TypeIsDisplayed(itemtype: string): boolean; -
TfrmGraphs.UpdateView procedure UpdateView(filename, filenum, itemnum, aString: string; aListView: TListView); -

Called-By

Name Declaration Comments
TfrmGraphs.cboDateRangeChange procedure cboDateRangeChange(Sender: TObject); -


Source

1109  procedure TfrmGraphs.FilterListView(oldestdate, newestdate: double);
1110  var
1111    i: integer;
1112    lastdate: double;
1113    filename, filenum, itemnum: string;
1114  begin
1115    lvwItemsTop.Scroll(-BIG_NUMBER, -BIG_NUMBER);      //faster to set scroll at top
1116    lvwItemsBottom.Scroll(-BIG_NUMBER, -BIG_NUMBER);
1117    lvwItemsTop.Items.Clear;
1118    lvwItemsBottom.Items.Clear;
1119    lvwItemsTop.SortType := stNone; // if Sorting during load then potential error
1120    lvwItemsBottom.SortType := stNone; // if Sorting during load then potential error
1121    if (cboDateRange.ItemIndex > 0) and (cboDateRange.ItemIndex < 9) then
1122    begin
1123      if TypeIsDisplayed('405') then
1124        DateRangeItems(oldestdate, newestdate, '405');  // does not matter for all results ******************
1125      if TypeIsDisplayed('52') then
1126        DateRangeItems(oldestdate, newestdate, '52');  // does not matter for all results ******************
1127      if TypeIsDisplayed('55') then
1128        DateRangeItems(oldestdate, newestdate, '55');
1129      if TypeIsDisplayed('55NVA') then
1130        DateRangeItems(oldestdate, newestdate, '55NVA');
1131      if TypeIsDisplayed('9999911') then
1132        DateRangeItems(oldestdate, newestdate, '9999911');
1133      for i := 0 to GtslItems.Count - 1 do
1134      begin
1135        filenum := UpperCase(Piece(GtslItems[i], '^', 1));
1136        if filenum <> '405' then
1137        if filenum <> '52' then
1138        if filenum <> '55' then
1139        if filenum <> '55NVA' then
1140        if filenum <> '9999911' then
1141        if TypeIsDisplayed(filenum) then
1142        begin
1143          lastdate := strtofloatdef(Piece(GtslItems[i], '^', 6), -BIG_NUMBER);
1144          if (lastdate > oldestdate) and (lastdate < newestdate) then
1145          begin
1146            filename := FileNameX(filenum);
1147            itemnum := Piece(GtslItems[i], '^', 2);
1148            UpdateView(filename, filenum, itemnum, GtslItems[i], lvwItemsTop);
1149          end;
1150        end;
1151      end;
1152    end
1153    else if (cboDateRange.ItemIndex = 0) or (cboDateRange.ItemIndex > 8) then
1154    begin     // manual date range selection
1155      for i := 0 to GtslAllTypes.Count - 1 do
1156      begin
1157        filenum := Piece(GtslAllTypes[i], '^', 1);
1158        if TypeIsDisplayed(filenum) then
1159        begin
1160          DateRangeItems(oldestdate, newestdate, filenum);
1161        end;
1162      end;
1163    end;
1164    lvwItemsBottom.Items.Assign(lvwItemsTop.Items);
1165    SortListView;
1166  end;