Procedure

TfrmGraphs.ItemDateRange

Module

fGraphs

Last Modified

7/15/2014 3:26:36 PM

Visibility

Private

Owner

TfrmGraphs

Declaration

procedure ItemDateRange(Sender: TCustomChart);

Calls Hierarchy


TfrmGraphs.ItemDateRange
 ├TfrmGraphs.ValueText
 │ ├TfrmGraphs.NonNumText
 │ │ ├TfrmGraphs.FileNameX
 │ │ ├TfrmGraphs.ItemName
 │ │ └TfrmGraphs.SetRefNonNum
 │ │   └TfrmGraphs.RefUnits
 │ │     └TfrmGraphs.SelectRef
 │ │       └CheckRef
 │ ├TfrmGraphs.ItemCheck
 │ ├TfrmGraphs.CheckMedNum
 │ ├TfrmGraphs.FileNameX
 │ ├TfrmGraphs.ValueDates
 │ ├TfrmGraphs.ResultValue
 │ │ ├TfrmGraphs.serDatelineTopGetMarkText
 │ │ └TfrmGraphs.BPValue
 │ └TfrmGraphs.OtherInfo
 │   └TfrmGraphs.SetRef
 │     └TfrmGraphs.RefUnits...
 └ReportBox
   └CreateReportBox
     └TfrmBase508Form.Create
       ├TfrmBase508Form.UpdateAccessibilityActions
       ├UnfocusableControlEnter
       └AdjustControls
         ├TfrmBase508Form.ModifyUnfocusableControl
         └..(rec)..

Called-By Hierarchy


                                         TfrmGraphs.ItemDateRange
                                          TfrmGraphs.AllDetails┤ 
                           TfrmGraphs.mnuPopGraphDetailsClick┘ │ 
                                       TfrmGraphs.MakeChart┤   │ 
                             TfrmGraphs.MakeSeparateItems┤ │   │ 
                                TfrmGraphs.MakeSeparate┘ │ │   │ 
                               TfrmGraphs.DisplayData┤   │ │   │ 
                             TfrmFrame.ClearPatient┤ │   │ │   │ 
                           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.ClearPtData┤ │   │ │   │ 
                        TfrmFrame.ClearPatient...┘ │ │   │ │   │ 
                                  TfrmReports.Graph┤ │   │ │   │ 
                       TfrmReports.tvReportsClick┘ │ │   │ │   │ 
                TfrmFrame.lstCIRNLocationsClick┤   │ │   │ │   │ 
                          TfrmFrame.SetUpCIRN┘ │   │ │   │ │   │ 
                  TfrmFrame.SetupPatient...┘   │   │ │   │ │   │ 
                        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...┘   │ │   │ │   │ 
                        TfrmGraphs.chkItemsTopClick┤ │   │ │   │ 
                     TfrmGraphs.chkItemsBottomClick┤ │   │ │   │ 
                 TfrmGraphs.mnuPopGraphIsolateClick┤ │   │ │   │ 
                      TfrmGraphs.cboDateRangeChange┤ │   │ │   │ 
                    TfrmReports.lstDateRangeClick┤ │ │   │ │   │ 
                         TfrmReports.GraphPanel┘ │ │ │   │ │   │ 
                         TfrmReports.Graph...┤   │ │ │   │ │   │ 
                TfrmReports.tvReportsClick...┘   │ │ │   │ │   │ 
                            TfrmGraphs.Initialize┤ │ │   │ │   │ 
                      TfrmFrame.ClearPatient...┤ │ │ │   │ │   │ 
                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...┤ │ │ │   │ │   │ 
                           TfrmReports.Graph...┘ │ │ │   │ │   │ 
                              TfrmGraphs.FormShow┤ │ │   │ │   │ 
                TfrmGraphs.btnChangeSettingsClick┤ │ │   │ │   │ 
                 TfrmReports.btnChangeViewClick┘ │ │ │   │ │   │ 
                     TfrmGraphs.CheckExpandedLabs┤ │ │   │ │   │ 
                          TfrmGraphs.ItemsClick┘ │ │ │   │ │   │ 
                    TfrmGraphs.DisplayData...┤   │ │ │   │ │   │ 
               TfrmGraphs.lvwItemsBottomClick┤   │ │ │   │ │   │ 
                   TfrmGraphs.Initialize...┤ │   │ │ │   │ │   │ 
                    TfrmGraphs.CheckContext┤ │   │ │ │   │ │   │ 
                      TfrmGraphs.FormShow┘ │ │   │ │ │   │ │   │ 
               TfrmGraphs.chkDualViewsClick┤ │   │ │ │   │ │   │ 
                 TfrmGraphs.Initialize...┤ │ │   │ │ │   │ │   │ 
                      TfrmGraphs.FormShow┤ │ │   │ │ │   │ │   │ 
                                   Layout┤ │ │   │ │ │   │ │   │ 
                     TfrmGraphs.GetSize┘ │ │ │   │ │ │   │ │   │ 
                  TfrmGraphs.FormShow┘   │ │ │   │ │ │   │ │   │ 
     TfrmGraphs.mnuPopGraphDualViewsClick┤ │ │   │ │ │   │ │   │ 
                TfrmGraphs.ViewSelections┘ │ │   │ │ │   │ │   │ 
          TfrmReports.tvReportsClick...┤   │ │   │ │ │   │ │   │ 
     TfrmGraphs.btnGraphSelectionsClick┘   │ │   │ │ │   │ │   │ 
  TfrmReports.btnGraphSelectionsClick┘     │ │   │ │ │   │ │   │ 
                     TfrmGraphs.GraphSwitch┤ │   │ │ │   │ │   │ 
                     TfrmGraphs.GraphSwap┘ │ │   │ │ │   │ │   │ 
        TfrmGraphs.mnuPopGraphSwapClick┘   │ │   │ │ │   │ │   │ 
                      TfrmGraphs.SplitClick┤ │   │ │ │   │ │   │ 
         TfrmGraphs.mnuPopGraphSplitClick┘ │ │   │ │ │   │ │   │ 
           TfrmGraphs.mnuPopGraphClearClick┤ │   │ │ │   │ │   │ 
                      TfrmGraphs.AutoSelect┤ │   │ │ │   │ │   │ 
                   TfrmGraphs.ViewsChange┘ │ │   │ │ │   │ │   │ 
           TfrmGraphs.lstViewsTopChange┤   │ │   │ │ │   │ │   │ 
             TfrmGraphs.Initialize...┤ │   │ │   │ │ │   │ │   │ 
            TfrmGraphs.GraphSwitch...┤ │   │ │   │ │ │   │ │   │ 
     TfrmGraphs.cboDateRangeChange...┤ │   │ │   │ │ │   │ │   │ 
         TfrmGraphs.ViewSelections...┘ │   │ │   │ │ │   │ │   │ 
        TfrmGraphs.lstViewsBottomChange┘   │ │   │ │ │   │ │   │ 
             TfrmGraphs.Initialize...┤     │ │   │ │ │   │ │   │ 
            TfrmGraphs.GraphSwitch...┤     │ │   │ │ │   │ │   │ 
     TfrmGraphs.cboDateRangeChange...┤     │ │   │ │ │   │ │   │ 
         TfrmGraphs.ViewSelections...┘     │ │   │ │ │   │ │   │ 
            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┘ │ │   │ │   │ 
                           TfrmGraphs.ItemsClick...┤ │   │ │   │ 
                          TfrmGraphs.ViewsChange...┤ │   │ │   │ 
                  TfrmGraphs.mnuPopGraphRemoveClick┘ │   │ │   │ 
                         TfrmGraphs.MakeTogetherMaybe┘   │ │   │ 
                          TfrmGraphs.DisplayData...┘     │ │   │ 
                                  TfrmGraphs.MakeTogether┘ │   │ 
                        TfrmGraphs.MakeTogetherMaybe...┘   │   │ 
                                     TfrmGraphs.LabelClicks┘   │ 
                                   TfrmGraphs.MouseClicks┘     │ 
                          TfrmGraphs.chartBaseMouseDown┘       │ 
                          TfrmGraphs.chkItemsTopClick┤         │ 
                       TfrmGraphs.chkItemsBottomClick┤         │ 
                              TfrmGraphs.MakeChart...┘         │ 
                                TfrmGraphs.chartBaseClickLegend┘ 
                                      TfrmGraphs.MakeChart...┘   

Calls

Name Declaration Comments
ReportBox procedure ReportBox(ReportText: TStrings; ReportTitle: string; AllowPrint: boolean); -
TfrmGraphs.ValueText function ValueText(Sender: TCustomChart; aSeries: TChartSeries; ValueIndex: Integer): string; -

Called-By

Name Declaration Comments
TfrmGraphs.AllDetails procedure AllDetails(aDate1, aDate2: TFMDateTime; aTempList: TStrings); -
TfrmGraphs.chartBaseClickLegend procedure chartBaseClickLegend(Sender: TCustomChart; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -


Source

3941  procedure TfrmGraphs.ItemDateRange(Sender: TCustomChart);
3942  var
3943    bpnotdone, ok: boolean;
3944    i, j: integer;
3945    prevtype, results, seriestitle, seriestype, spacer, textvalue, typenum: string;
3946    datadate, labdate, labflag, labname, labunit, labvalue, newline, refrange, specimen, testnum: string;
3947    tmpOtherList: TStringList;
3948  begin
3949    Screen.Cursor := crHourGlass;
3950    prevtype := '';
3951    tmpOtherList := TStringList.Create;
3952    with tmpOtherList do
3953    begin
3954      Add('Date Range: ' + cboDateRange.Text);
3955      Add('Selected Items from ' +
3956        FormatDateTime('mm/dd/yy', FGraphSetting.LowTime) + ' to ' +
3957        FormatDateTime('mm/dd/yy', FGraphSetting.HighTime));
3958      Add('');
3959    end;
3960    bpnotdone := true;
3961    for i := 0 to Sender.SeriesCount - 1 do
3962    begin
3963      if Sender.Series[i].Count > 0 then
3964      begin
3965        textvalue := ValueText(Sender, Sender.Series[i], 0);
3966        seriestype := Piece(textvalue, '^', 2);
3967        if (seriestype <> '') and (seriestype <> prevtype) then
3968        begin
3969          tmpOtherList.Add('     ' + seriestype);    // type
3970          prevtype := seriestype;
3971        end;
3972      end;
3973      ok := true;
3974      seriestitle := Sender.Series[i].Title;
3975      if seriestitle = 'Blood Pressure' then
3976        if not bpnotdone then ok := false;
3977      if ok then
3978      begin
3979        for j := 0 to Sender.Series[i].Count - 1 do
3980        begin
3981          textvalue := ValueText(Sender, Sender.Series[i], j);
3982          seriestitle := Piece(textvalue, '^', 4);
3983          typenum := trim(Piece(textvalue, '^', 1));
3984          if (typenum = '120.5') and (seriestitle = 'Blood Pressure') then bpnotdone := false;
3985          if length(typenum) > 0 then
3986          begin
3987            if typenum = '63' then
3988            begin
3989              testnum := Piece(textvalue, '^', 7);
3990              labvalue := Piece(textvalue, '^', 9);
3991              labdate := Piece(textvalue, '^', 6);
3992              labname := Piece(textvalue, '^', 4);
3993              labflag := Piece(textvalue, '^', 10);
3994              specimen := lowercase(Piece(textvalue, '^', 11));
3995              refrange := Piece(textvalue, '^', 12);
3996              labunit := Piece(textvalue, '^', 13);
3997              if refrange = '!' then
3998                refrange := ''
3999              else
4000                refrange := Piece(refrange, '!', 1) + ' - ' + Piece(refrange, '!', 2);
4001              if Piece(testnum, '.', 2) = '0' then
4002                labname := Piece(labname, '*', 1) + ' (' + specimen + ')';
4003              newline := labname;
4004              spacer := Copy(BIG_SPACES, 1, 29 - length(newline) - length(labvalue));
4005              newline := newline + spacer + ' ' + labvalue + ' ' + labflag;
4006              spacer := Copy(BIG_SPACES, 1, 34 - length(newline));
4007              newline := newline + spacer + ' ' + labunit;
4008              spacer := Copy(BIG_SPACES, 1, 44 - length(newline));
4009              newline := newline + spacer + ' ' + refrange;
4010              spacer := Copy(BIG_SPACES, 1, 58 - length(newline));
4011              newline := newline + spacer + ' ' + labdate;
4012              if length(labdate)= 0 then   // in case of duplicate names in listview
4013                newline := newline + ' ' + TXT_WARNING_CHECK_RESULTS;
4014              tmpOtherList.Add(newline);                 // item occurrence
4015            end
4016            else
4017            begin
4018              if typenum = '120.5' then
4019                datadate := Piece(textvalue, '^', 6)
4020              else
4021                datadate := Piece(textvalue, '^', 8);
4022              spacer := Copy(BIG_SPACES, 1, 30 - length(seriestitle));
4023              results := seriestitle + ':  ' + //spacer +
4024              Piece(textvalue, '^', 5); //LowerCase(Piece(textvalue, '^', 5));
4025              spacer := Copy(BIG_SPACES, 1, 54 - length(results));
4026              results := results + ' ' + spacer + datadate;
4027              results := StringReplace(results, ' 00:00', '', [rfReplaceAll]);
4028              if length(datadate)= 0 then   // in case of duplicate names in listview
4029                results := results + ' ' + TXT_WARNING_CHECK_RESULTS;
4030              tmpOtherList.Add(results);                 // item occurrence
4031            end;
4032          end;
4033        end;
4034      end;
4035    end;                               // same items are not being sorted by date
4036    if tmpOtherList.Count > 0 then
4037    begin
4038      tmpOtherList.Insert(0, TXT_REPORT_DISCLAIMER);
4039      tmpOtherList.Insert(1, '');
4040      ReportBox(tmpOtherList, 'Selected Items from Graph', true);
4041    end;
4042    tmpOtherList.Free;
4043    FMouseDown := false;
4044    Screen.Cursor := crDefault;
4045  end;