Procedure

TfrmGraphs.LabData

Module

fGraphs

Last Modified

7/15/2014 3:26:36 PM

Visibility

Private

Owner

TfrmGraphs

Declaration

procedure LabData(aItemType, aItemName, aSection: string; getdata: boolean);

Calls Hierarchy


TfrmGraphs.LabData
 ├rpcGetItemData
 │ └onoff
 ├TfrmGraphs.SpecRefCheck
 │ └TfrmGraphs.RefUnits
 │   └TfrmGraphs.SelectRef
 │     └CheckRef
 ├TfrmGraphs.SpecRefSet
 │ └MultiRef
 ├TfrmGraphs.FileNameX
 ├TfrmGraphs.LabCheck
 ├TfrmGraphs.DateRangeMultiItems
 └TfrmGraphs.LabAdd

Called-By Hierarchy


                                             TfrmGraphs.LabData
                                      TfrmGraphs.SaveTestData┤ 
                                         TfrmGraphs.FastLab┘ │ 
                                        TfrmGraphs.Switch┘   │ 
                                 TfrmGraphs.InitialData┤     │ 
                                TfrmGraphs.Initialize┘ │     │ 
                             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┘   │   │     │ 
                    TfrmFrame.mnuToolsGraphingClick┤   │     │ 
                             TfrmLabs.grdLabClick┤ │   │     │ 
                          TfrmLabs.tvReportsClick┤ │   │     │ 
                           TfrmLabs.DisplayPage┤ │ │   │     │ 
                          TfrmLabs.LoadTreeView┤ │ │   │     │ 
                         TfrmLabs.DisplayPage┤ │ │ │   │     │ 
       TfrmOptionsReportsCustom.btnApplyClick┘ │ │ │   │     │ 
        TfrmOptionsReportsCustom.btnOKClick┘   │ │ │   │     │ 
                    TfrmLabs.cmdOtherTestsClick┤ │ │   │     │ 
                       TfrmLabs.chkMaxFreqClick┤ │ │   │     │ 
                  TfrmLabs.ProcessNotifications┤ │ │   │     │ 
                         TfrmLabs.DisplayPage┘ │ │ │   │     │ 
                                      ..(rec)..┤ │ │   │     │ 
                      TfrmLabs.tvReportsKeyDown┤ │ │   │     │ 
                TfrmFrame.lstCIRNLocationsClick┘ │ │   │     │ 
                          TfrmFrame.SetUpCIRN┘   │ │   │     │ 
                  TfrmFrame.SetupPatient...┘     │ │   │     │ 
                                        ..(rec)..┘ │   │     │ 
                            TfrmReports.ClearPtData┤   │     │ 
                        TfrmFrame.ClearPatient...┘ │   │     │ 
                                  TfrmReports.Graph┘   │     │ 
                       TfrmReports.tvReportsClick┘     │     │ 
             TfrmFrame.lstCIRNLocationsClick...┤       │     │ 
                        TfrmReports.DisplayPage┤       │     │ 
                       TfrmReports.LoadTreeView┤       │     │ 
                      TfrmReports.DisplayPage┤ │       │     │ 
         TfrmOptionsReportsDefault.btnOKClick┤ │       │     │ 
      TfrmOptionsReportsDefault.btnResetClick┤ │       │     │ 
    TfrmOptionsReportsCustom.btnApplyClick...┘ │       │     │ 
               TfrmReports.ProcessNotifications┤       │     │ 
                      TfrmReports.DisplayPage┘ │       │     │ 
                   TfrmReports.tvReportsKeyDown┤       │     │ 
                TfrmReports.tvProceduresKeyDown┤       │     │ 
                    TfrmReports.chkMaxFreqClick┤       │     │ 
           TfrmOptionsReportsDefault.btnOKClick┤       │     │ 
        TfrmOptionsReportsDefault.btnResetClick┤       │     │ 
      TfrmOptionsReportsCustom.btnApplyClick...┘       │     │ 
                         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┤ │   │ │     │ 
                TfrmReports.lstDateRangeClick┤ │ │   │ │     │ 
                     TfrmReports.GraphPanel┘ │ │ │   │ │     │ 
                     TfrmReports.Graph...┤   │ │ │   │ │     │ 
            TfrmReports.tvReportsClick...┘   │ │ │   │ │     │ 
                     TfrmGraphs.Initialize...┤ │ │   │ │     │ 
                          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.mnuPopGraphRemoveClick┘ │   │ │ │   │ │     │ 
        TfrmGraphs.lvwItemsBottomClick...┤   │ │ │   │ │     │ 
              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.ViewSelections...┘ │   │ │     │ 
                  TfrmGraphs.lstViewsBottomChange┘   │ │     │ 
                       TfrmGraphs.Initialize...┤     │ │     │ 
                      TfrmGraphs.GraphSwitch...┤     │ │     │ 
               TfrmGraphs.cboDateRangeChange...┤     │ │     │ 
                   TfrmGraphs.ViewSelections...┘     │ │     │ 
                      TfrmGraphs.lvwItemsBottomChange┘ │     │ 
                         TfrmGraphs.lvwItemsTopClick...┘     │ 
                                    TfrmGraphs.CheckToAddData┘ 
                                     TfrmGraphs.AllTypeDate┤   
                                  TfrmGraphs.SeriesClicks┤ │   
                        TfrmGraphs.chartBaseClickSeries┘ │ │   
                                 TfrmGraphs.MakeChart┘   │ │   
                       TfrmGraphs.MakeSeparateItems┤     │ │   
                          TfrmGraphs.MakeSeparate┘ │     │ │   
                      TfrmGraphs.DisplayData...┤   │     │ │   
                   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.DateRangeMultiItems function DateRangeMultiItems(aOldDate, aNewDate: double; aMultiItem: string): boolean; -
TfrmGraphs.FileNameX function FileNameX(filenum: string): string; -
TfrmGraphs.LabAdd procedure LabAdd(aListView: TListView; filename: string; aIndex, oldlisting: integer; selectlab: boolean); -
TfrmGraphs.LabCheck procedure LabCheck(aListView: TListView; aItemType: string; var oldlisting: integer); -
rpcGetItemData function rpcGetItemData(itemdata, timestamp: string; const PatientDFN: string): TStrings; -
TfrmGraphs.SpecRefCheck procedure SpecRefCheck(aItemType, aItemName: string; var singlespec: boolean); -
TfrmGraphs.SpecRefSet procedure SpecRefSet(aItemType, aItemName: string); -

Called-By

Name Declaration Comments
TfrmGraphs.CheckToAddData procedure CheckToAddData(aListView: TListView; aSection, TypeToCheck: string); -
TfrmGraphs.SaveTestData procedure SaveTestData(typeitem: string); -


Source

5673  procedure TfrmGraphs.LabData(aItemType, aItemName, aSection: string; getdata: boolean);
5674  var
5675    selectlab, singlespec: boolean;
5676    i, j, oldlisting: integer;
5677    checktest, checktypeitem, filename, newline, newtest: string;
5678  begin
5679    if getdata then
5680      FastAssign(rpcGetItemData(aItemType, FMTimeStamp, Patient.DFN), GtslScratchLab);
5681    SpecRefCheck(aItemType, aItemName, singlespec);
5682    if singlespec then
5683      FastAddStrings(GtslScratchLab, GtslData)
5684    else
5685    begin
5686      for i := 0 to GtslScratchLab.Count - 1 do
5687      begin
5688        newline := GtslScratchLab[i];
5689        newtest := Piece(newline, '^', 2) + '.0';
5690        SetPiece(newline, '^', 2, newtest);
5691        GtslScratchLab[i] := newline;
5692      end;  
5693      FastAddStrings(GtslScratchLab, GtslData);    //&&&&&
5694      SpecRefSet(aItemType, aItemName);
5695      filename := FileNameX('63');
5696  
5697      LabCheck(lvwItemsTop, aItemType, oldlisting);
5698      selectlab := aSection = 'top';
5699      lvwItemsTop.Items.BeginUpdate;
5700      for i := 0 to GtslMultiSpec.Count - 1 do
5701      begin
5702        checktest := UpperCase(Pieces(GtslMultiSpec[i], '^', 1, 2));
5703        if Piece(checktest, '.', 2) = '0' then      // flag expanded test
5704        begin
5705          checktypeitem := Piece(checktest, '.', 1);
5706          for j := 0 to GtslCheck.Count - 1 do
5707          begin
5708            if GtslCheck[j] = checktypeitem then
5709            begin
5710              GtslCheck[j] := checktypeitem + '^*';
5711              break;
5712            end;
5713          end;
5714        end;
5715        GtslCheck.Add(checktest);
5716        if (FGraphSetting.FMStartDate = FM_START_DATE) or
5717            DateRangeMultiItems(FGraphSetting.FMStartDate, FGraphSetting.FMStopDate, Piece(GtslMultiSpec[i], '^', 2)) then
5718          LabAdd(lvwItemsTop, filename, i, oldlisting, selectlab);
5719      end;
5720      lvwItemsTop.SortType := stBoth;
5721      lvwItemsTop.Items.EndUpdate;
5722  
5723      LabCheck(lvwItemsBottom, aItemType, oldlisting);
5724      selectlab := aSection = 'bottom';
5725      lvwItemsBottom.Items.BeginUpdate;
5726      for i := 0 to GtslMultiSpec.Count - 1 do
5727        LabAdd(lvwItemsBottom, filename, i, oldlisting, selectlab);
5728      lvwItemsBottom.SortType := stBoth;
5729      lvwItemsBottom.Items.EndUpdate;
5730    end;
5731  end;