Procedure

TfrmLabs.HGrid

Module

fLabs

Last Modified

7/15/2014 3:26:38 PM

Visibility

Private

Owner

TfrmLabs

Declaration

procedure HGrid(griddata: TStrings);

Calls Hierarchy


TfrmLabs.HGrid
 └LabPatchInstalled
   └ServerHasPatch

Called-By Hierarchy


                                         TfrmLabs.HGrid
                           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...┘ │ 
                                TfrmLabs.ragHorVClick┘ 

Calls

Name Declaration Comments
LabPatchInstalled function LabPatchInstalled: boolean; -

Called-By

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


Source

1784  procedure TfrmLabs.HGrid(griddata: TStrings);
1785  var
1786    testcnt, datecnt, datacnt, linecnt, offset, x, y, i: integer;
1787    DisplayDateTime: string;
1788  begin
1789    offset := 0;
1790    testcnt := strtoint(Piece(griddata[offset], '^', 1));
1791    datecnt := strtoint(Piece(griddata[offset], '^', 2));
1792    datacnt := strtoint(Piece(griddata[offset], '^', 3));
1793    linecnt := testcnt + datecnt + datacnt;
1794    if chkAbnormals.Checked and (linecnt > 0) then
1795    begin
1796      offset := linecnt + 1;
1797      testcnt := strtoint(Piece(griddata[offset], '^', 1));
1798      datecnt := strtoint(Piece(griddata[offset], '^', 2));
1799      datacnt := strtoint(Piece(griddata[offset], '^', 3));
1800      linecnt := testcnt + datecnt + datacnt;
1801    end;
1802    with grdLab do
1803    begin
1804      if testcnt = 0 then ColCount := 3 else ColCount := testcnt + 2;
1805      if datecnt = 0 then RowCount := 2 else RowCount := datecnt + 1;
1806      DefaultColWidth := ResizeWidth( BaseFont, MainFont, 60);
1807      ColWidths[0] := ResizeWidth( BaseFont, MainFont, 80);
1808      FixedCols := 2;
1809      FixedRows := 1;
1810      for y := 0 to RowCount - 1 do
1811        for x := 0 to ColCount - 1 do
1812          Cells[x, y] := '';
1813      Cells[0, 0] := 'Date/Time';
1814      Cells[1, 0] := 'Specimen';
1815      for i := 1 to testcnt do
1816      begin
1817        Cells[i + 1, 0] := Piece(griddata[i + offset], '^', 3);
1818      end;
1819      if datecnt = 0 then
1820      begin
1821        Cells[0, 1] := 'no results';
1822        for x := 1 to ColCount - 1 do
1823          Cells[x, 1] := '';
1824      end;
1825      for i := testcnt + 1 to testcnt + datecnt do
1826      begin
1827        //------------------------------------------------------------------------------------------
1828        //v27.2 - RV - PSI-05-118 / Remedy HD0000000123277 - don't show "00:00" if no time present
1829        if LabPatchInstalled then        // Requires lab patch in const "PSI_05_118"
1830        begin
1831          DisplayDateTime := Piece(griddata[i + offset], '^', 2);
1832          if length(DisplayDateTime) > 7 then
1833            Cells[0, i - testcnt] := FormatFMDateTime('mm/dd/yy hh:nn',MakeFMDateTime(DisplayDateTime))
1834          else if length(DisplayDateTime) > 0 then
1835            Cells[0, i - testcnt] := FormatFMDateTime('mm/dd/yy',MakeFMDateTime(DisplayDateTime))
1836          else
1837            Cells[0, i - testcnt] := FormatFMDateTime('mm/dd/yy hh:nn',MakeFMDateTime(Piece(griddata[i + offset], '^', 2)));
1838        end
1839        else                             // If no lab patch in const "PSI_05_118", continue as is
1840        begin
1841          Cells[0, i - testcnt] := FormatFMDateTime('mm/dd/yy hh:nn',MakeFMDateTime(Piece(griddata[i + offset], '^', 2)));
1842        end;
1843        //------------------------------------------------------------------------------------------
1844        Cells[1, i - testcnt] := MixedCase(Piece(griddata[i + offset], '^', 4)) + '  ' + Piece(griddata[i + offset], '^', 5);
1845      end;
1846      for i := testcnt + datecnt + 1 to linecnt do
1847      begin
1848        y := strtoint(Piece(griddata[i + offset], '^', 1));
1849        x := strtoint(Piece(griddata[i + offset], '^', 2)) + 1;
1850        Cells[x, y]  := Piece(griddata[i + offset], '^', 3) + ' ' + Piece(griddata[i + offset], '^', 4);
1851      end;
1852    end;
1853  end;