Procedure

TfrmGraphs.DateSteps

Module

fGraphs

Last Modified

7/15/2014 3:26:36 PM

Visibility

Public/Published

Owner

TfrmGraphs

Declaration

procedure DateSteps(dateranges: string);

Called-By Hierarchy


                                         TfrmGraphs.DateSteps
                              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┘   

Called-By

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


Source

4729  procedure TfrmGraphs.DateSteps(dateranges: string);
4730  var
4731    datetag: integer;
4732    endofday: double;
4733    manualstart, manualstop: string;
4734  begin
4735    endofday := FMDateTimeOffsetBy(FMToday, 1);
4736    datetag := cboDateRange.ItemIEN;
4737    FGraphSetting.FMStopDate := endofday;
4738    with FGraphSetting do
4739    case datetag of
4740    0:  begin
4741          if cboDateRange.ItemIndex > 8 then    // selected date range
4742          begin
4743            if dateranges = '' then dateranges := cboDateRange.Items[cboDateRange.ItemIndex];
4744            manualstart := Piece(dateranges, '^' , 6);
4745            manualstop := Piece(dateranges, '^' , 7);
4746            if (manualstop <> '') and (length(Piece(manualstop, '.', 2)) = 0) then
4747              manualstop := manualstop + '.2359';
4748            FMStartDate := MakeFMDateTime(manualstart);
4749            FMStopDate := MakeFMDateTime(manualstop);
4750            if (manualstart <> '') and (length(Piece(manualstart, '.', 2)) = 0) then
4751            begin
4752              FMStartDate := FMDateTimeOffsetBy(FMStartDate, -1);
4753              manualstart := floattostr(FMStartDate) + '.2359';
4754              FMStartDate := MakeFMDateTime(manualstart);
4755            end;
4756          end;
4757        end;
4758    1:  FMStartDate := FMToday;
4759    2:  FMStartDate := FMDateTimeOffsetBy(FMToday, -7);
4760    3:  FMStartDate := FMDateTimeOffsetBy(FMToday, -14);
4761    4:  FMStartDate := FMDateTimeOffsetBy(FMToday, -30);
4762    5:  FMStartDate := FMDateTimeOffsetBy(FMToday, -183);
4763    6:  FMStartDate := FMDateTimeOffsetBy(FMToday, -365);
4764    7:  FMStartDate := FMDateTimeOffsetBy(FMToday, -730);
4765    8:  FMStartDate := FM_START_DATE;   // earliest recorded values
4766    else
4767        begin
4768          if dateranges = '' then dateranges := cboDateRange.Items[cboDateRange.ItemIndex];
4769          manualstart := Piece(dateranges, '^' , 6);
4770          manualstop := Piece(dateranges, '^' , 7);
4771          if (manualstop <> '') and (length(Piece(manualstop, '.', 2)) = 0) then manualstop := manualstop + '.2359';
4772          FMStartDate := MakeFMDateTime(manualstart);
4773          FMStopDate := MakeFMDateTime(manualstop);
4774          if (manualstart <> '') and (length(Piece(manualstart, '.', 2)) = 0) then
4775          begin
4776            FMStartDate := FMDateTimeOffsetBy(FMStartDate, -1);
4777            manualstart := floattostr(FMStartDate) + '.2359';
4778            FMStartDate := MakeFMDateTime(manualstart);
4779          end;
4780        end;
4781    end;
4782  end;