Procedure

TfrmLabs.GraphChart

Module

fLabs

Last Modified

7/15/2014 3:26:38 PM

Visibility

Private

Owner

TfrmLabs

Declaration

procedure GraphChart(test: string; aitems: TStrings);

Calls Hierarchy


TfrmLabs.GraphChart
 └TfrmLabs.FMToDateTime

Called-By Hierarchy


                                    TfrmLabs.GraphChart
                           TfrmLabs.lstQualifierClick┤ 
                            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┘       │ 
                  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┘         │ 
                               TfrmLabs.lstDatesClick┘ 
                         TfrmLabs.tvReportsClick...┘   

Calls

Name Declaration Comments
TfrmLabs.FMToDateTime function FMToDateTime(FMDateTime: string): TDateTime; -

Called-By

Name Declaration Comments
TfrmLabs.lstDatesClick procedure lstDatesClick(Sender: TObject); -
TfrmLabs.lstQualifierClick procedure lstQualifierClick(Sender: TObject); -


Source

2426  procedure TfrmLabs.GraphChart(test: string; aitems: TStrings);
2427  var
2428    datevalue: TDateTime;
2429    labvalue: double;
2430    i, numvalues: integer;
2431    high, low, start, stop, value, units, specimen: string;
2432  begin
2433    numvalues := strtoint(Piece(aitems[0], '^', 1));
2434    specimen := Piece(aitems[0], '^', 2);
2435    high := Piece(aitems[0], '^', 3);
2436    low := Piece(aitems[0], '^', 4);
2437    units := Piece(aitems[0], '^', 5);
2438    if numvalues > 0 then
2439    begin
2440      start := Piece(aitems[1], '^', 1);
2441      stop := Piece(aitems[numvalues], '^', 1);
2442      chtChart.Legend.Color := grdLab.Color;
2443      serHigh.Clear;  serLow.Clear;  serTest.Clear;
2444      if high <> '' then
2445      begin
2446        serHigh.AddXY(FMToDateTime(start), strtofloat(high), '',clTeeColor);
2447        serHigh.AddXY(FMToDateTime(stop), strtofloat(high), '',clTeeColor);
2448      end;
2449      if low <> '' then
2450      begin
2451        serLow.AddXY(FMToDateTime(start), strtofloat(low), '',clTeeColor);
2452        serLow.AddXY(FMToDateTime(stop), strtofloat(low), '',clTeeColor);
2453      end;
2454      chtChart.LeftAxis.Title.Caption := units;
2455      serTest.Title := Piece(test, '^', 2) + '  (' + MixedCase(specimen) + ')';
2456      serHigh.Title := 'Ref High ' + high;
2457      serLow.Title := 'Ref Low ' + low;
2458      for i := 1 to numvalues do
2459      begin
2460        value := Piece(aitems[i], '^', 2);
2461        labvalue := strtofloat(value);
2462        datevalue := FMToDateTime(Piece(aitems[i], '^', 1));
2463        serTest.AddXY(datevalue, labvalue, '', clTeeColor);
2464      end;
2465    end;
2466  end;