Procedure

TfrmGraphs.CheckToAddData

Module

fGraphs

Last Modified

7/15/2014 3:26:36 PM

Visibility

Private

Owner

TfrmGraphs

Declaration

procedure CheckToAddData(aListView: TListView; aSection, TypeToCheck: string);

Calls Hierarchy


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...

Called-By Hierarchy


                                          TfrmGraphs.CheckToAddData
                                           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...┘   │ 
                                         TfrmGraphs.ItemsClick...┘ 

Calls

Name Declaration Comments
TfrmGraphs.LabData procedure LabData(aItemType, aItemName, aSection: string; getdata: boolean); -
rpcGetItemData function rpcGetItemData(itemdata, timestamp: string; const PatientDFN: string): TStrings; -

Called-By

Name Declaration Comments
TfrmGraphs.AllTypeDate procedure AllTypeDate(aType, aTypeName, firstline, secondline: string; aDate, aDate2: double); -
TfrmGraphs.ItemsClick procedure ItemsClick(Sender: TObject; aListView, aOtherListView: TListView; aCheckBox: TCheckBox; aListBox: TORListBox; aList: TStrings; aSection: string); -


Source

5137  procedure TfrmGraphs.CheckToAddData(aListView: TListView; aSection, TypeToCheck: string);
5138  var
5139    done, ok, previous, singletype: boolean;
5140    i, j: integer;
5141    itemname, typeitem: string;
5142    aGraphItem: TGraphItem;
5143  begin
5144    if FFastTrack then
5145      exit;
5146    Application.ProcessMessages;
5147    TypeToCheck := UpperCase(TypeToCheck);
5148    if (TypeToCheck = 'SELECT') and (lvwItemsTop.SelCount = 0)
5149      and (lvwItemsBottom.SelCount = 0) then exit;
5150    singletype := length(Piece(TypeToCheck, '^', 2)) = 0;
5151    for i := 0 to aListView.Items.Count - 1 do
5152    begin
5153      ok := false;
5154      if (TypeToCheck = 'ALL') then ok := true;
5155      if (TypeToCheck = 'SELECT') and aListView.Items[i].Selected then ok := true;
5156      aGraphItem := TGraphItem(aListView.Items.Item[i].SubItems.Objects[3]);
5157      typeitem := UpperCase(Pieces(aGraphItem.Values, '^', 1, 2));
5158      if not ok then
5159        if TypeToCheck = typeitem then ok := true
5160        else if (TypeToCheck = Piece(typeitem, '^', 1)) and
5161          singletype then ok := true;
5162      if ok then
5163      begin
5164        previous := false;
5165        done := false;
5166        j := 0;
5167        while not done do
5168        begin
5169          if GtslCheck.Count = j then done := true
5170          else if Pieces(GtslCheck[j], '^', 1, 2) = typeitem then
5171          begin
5172            previous := true;
5173            done := true;
5174          end
5175          else j := j + 1;
5176        end;
5177        if not previous then
5178        begin
5179          GtslCheck.Add(typeitem);
5180          itemname := aListView.Items[i].Caption;
5181          if Piece(typeitem, '^', 1) = '63' then
5182            LabData(typeitem, itemname, aSection, true) // need to get lab data
5183          else
5184            FastAddStrings(rpcGetItemData(typeitem, FMTimeStamp, Patient.DFN), GtslData);
5185        end;
5186      end;
5187    end;
5188  end;