Procedure

TfrmGraphs.AllTypeDate

Module

fGraphs

Last Modified

7/15/2014 3:26:36 PM

Visibility

Private

Owner

TfrmGraphs

Declaration

procedure AllTypeDate(aType, aTypeName, firstline, secondline: string; aDate, aDate2: double);

Calls Hierarchy


TfrmGraphs.AllTypeDate
 ├TfrmGraphs.CheckToAddData
 │ ├TfrmGraphs.LabData
 │ │ ├rpcGetItemData
 │ │ │ └onoff
 │ │ ├TfrmGraphs.SpecRefCheck
 │ │ │ └TfrmGraphs.RefUnits
 │ │ │   └TfrmGraphs.SelectRef
 │ │ │     └CheckRef
 │ │ ├TfrmGraphs.SpecRefSet
 │ │ │ └MultiRef
 │ │ ├TfrmGraphs.FileNameX
 │ │ ├TfrmGraphs.LabCheck
 │ │ ├TfrmGraphs.DateRangeMultiItems
 │ │ └TfrmGraphs.LabAdd
 │ └rpcGetItemData...
 ├TfrmGraphs.TempData
 │ ├TfrmGraphs.ItemName
 │ └TfrmGraphs.SetRef
 │   └TfrmGraphs.RefUnits...
 └ReportBox
   └CreateReportBox
     └TfrmBase508Form.Create
       ├TfrmBase508Form.UpdateAccessibilityActions
       ├UnfocusableControlEnter
       └AdjustControls
         ├TfrmBase508Form.ModifyUnfocusableControl
         └..(rec)..

Called-By Hierarchy


                                           TfrmGraphs.AllTypeDate
                                        TfrmGraphs.SeriesClicks┤ 
                              TfrmGraphs.chartBaseClickSeries┘ │ 
                                       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.mnuPopGraphDetailsClick┘ 
                                      TfrmGraphs.MakeChart...┤   
                                    TfrmGraphs.LabelClicks...┘   

Calls

Name Declaration Comments
TfrmGraphs.CheckToAddData procedure CheckToAddData(aListView: TListView; aSection, TypeToCheck: string); -
ReportBox procedure ReportBox(ReportText: TStrings; ReportTitle: string; AllowPrint: boolean); -
TfrmGraphs.TempData procedure TempData(aStringList: TStringList; aType: string; dt1, dt2: double); -

Called-By

Name Declaration Comments
TfrmGraphs.LabelClicks procedure LabelClicks(aChart: TChart; aSeries: TChartSeries; lbutton: boolean; tmp: integer); -
TfrmGraphs.mnuPopGraphDetailsClick procedure mnuPopGraphDetailsClick(Sender: TObject); -
TfrmGraphs.SeriesClicks procedure SeriesClicks(aChart: TChart; aSeries: TChartSeries; aIndex: integer; lbutton: boolean); -


Source

3740  procedure TfrmGraphs.AllTypeDate(aType, aTypeName, firstline, secondline: string; aDate, aDate2: double);
3741  var
3742    i: integer;
3743    datex1, datex2, newline, oldline, spacer, titlemsg: string;
3744    labdate, labflag, labname, labunit, labvalue, refrange, specimen, testnum: string;
3745    dt1, dt2: double;
3746    tmpOtherList, templist: TStringList;
3747  begin
3748    Screen.Cursor := crHourGlass;
3749    FPointClick := true;
3750    tmpOtherList := TStringList.Create;
3751    templist := TStringList.Create;
3752    datex1 := floattostr(DateTimeToFMDateTime(aDate));
3753    datex1 := Piece(datex1, '.', 1);
3754    if aDate <> aDate2 then
3755      datex2 := Piece(floattostr(DateTimeToFMDateTime(aDate2)), '.', 1) + '.23595959'
3756    else
3757      datex2 := datex1 + '.23595959';
3758    dt1 := strtofloatdef(datex1, BIG_NUMBER);
3759    dt2 := strtofloatdef(datex2, BIG_NUMBER);
3760    CheckToAddData(lvwItemsTop, 'top', aType);    // if type is not loaded - load data
3761    TempData(tmpOtherList, aType, dt1, dt2);
3762    with tmpOtherList do
3763    begin
3764      Sort;
3765      for i := Count - 1 downto 0 do
3766      begin
3767        newline := '';
3768        oldline := tmpOtherList[i];
3769        if aType = '63' then
3770        begin
3771          testnum := Piece(oldline, '^', 2);
3772          labvalue := Piece(oldline, '^', 3);
3773          labdate := Piece(oldline, '^', 4);
3774          labname := Piece(oldline, '^', 5);
3775          labflag := Piece(oldline, '^', 6);
3776          specimen := lowercase(Piece(oldline, '^', 8));
3777          refrange := Piece(oldline, '^', 10);
3778          labunit := Piece(oldline, '^', 11);
3779          if refrange = '!' then
3780            refrange := ''
3781          else
3782            refrange := Piece(refrange, '!', 1) + ' - ' + Piece(refrange, '!', 2);
3783          if Piece(testnum, '.', 2) = '0' then
3784            labname := Piece(labname, '*', 1) + ' (' + specimen + ')';
3785          newline := labdate + '   ' + labname;
3786          spacer := Copy(BIG_SPACES, 1, 42 - length(newline) - length(labvalue));
3787          newline := newline + spacer + ' ' + labvalue + ' ' + labflag;
3788          spacer := Copy(BIG_SPACES, 1, 47 - length(newline));
3789          newline := newline + spacer + ' ' + labunit;
3790          spacer := Copy(BIG_SPACES, 1, 57 - length(newline));
3791          newline := newline + spacer + ' ' + refrange;
3792        end
3793        else
3794        begin
3795          newline := Piece(oldline, '^', 4) + '   ' + Piece(oldline, '^', 5);
3796          spacer := Copy(BIG_SPACES, 1, 40 - length(newline));
3797          newline := newline + spacer + ' ' + Piece(oldline, '^', 3);
3798        end;
3799        templist.Add(newline);
3800      end;
3801      Clear;
3802      FastAssign(templist, tmpOtherList);
3803      if Copy(aTypeName, length(aTypeName) - 2, 3) = 'ies' then
3804        aTypeName := Copy(aTypeName, 1, length(aTypeName) - 3) + 'y'
3805      else if Copy(aTypeName, length(aTypeName), 1) = 's' then
3806        aTypeName := Copy(aTypeName, 1, length(aTypeName) - 1);
3807      //Assign(templist);
3808      if aDate <> aDate2 then
3809        titlemsg := aTypeName + ' occurrences for ' + FormatDateTime('mmm d, yyyy', aDate) +
3810          ' - ' + FormatDateTime('mmm d, yyyy', aDate2)
3811      else
3812        titlemsg := aTypeName + ' occurrences for ' + FormatDateTime('mmm d, yyyy', aDate);
3813      Insert(0, firstline);
3814      Insert(1, secondline);
3815      Insert(2, '');
3816      Insert(3, 'All ' + titlemsg + ':');
3817      Insert(4, '');
3818      Insert(0, TXT_REPORT_DISCLAIMER);
3819      Insert(1, '');
3820      ReportBox(tmpOtherList, titlemsg, true);
3821    end;
3822    tmpOtherList.Free;
3823    templist.Free;
3824    FPointClick := false;
3825    Screen.Cursor := crDefault;
3826  end;