Procedure

TfrmLabs.GoRemoteOld

Module

fLabs

Last Modified

7/15/2014 3:26:38 PM

Visibility

Private

Owner

TfrmLabs

Declaration

procedure GoRemoteOld(Dest: TStringList; AItem, AReportID: Int64; AQualifier, ARpc, AHSType, ADaysBack, ASection: string; ADate1, ADate2: TFMDateTime);

Calls Hierarchy


TfrmLabs.GoRemoteOld
 ├TRemoteSite.LabClear
 ├TfrmLabs.UpdateRemoteStatus
 ├GetRemoteData
 ├RemoteLabReports
 ├RemoteLabCumulative
 ├RemoteLabInterim
 ├RemoteLabMicro
 └RemoteLab

Called-By Hierarchy


                                   TfrmLabs.GoRemoteOld
                           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.tvReportsClick...┘ 

Calls

Name Declaration Comments
GetRemoteData procedure GetRemoteData(Dest: TStrings; aHandle: string; aItem: PChar); -
TRemoteSite.LabClear procedure LabClear; -
RemoteLab procedure RemoteLab(Dest: TStrings; const PatientDFN: string; reportid, hstype, ADate, section: string; Adate1, Adate2: TFMDateTime; ASite, ARemoteRPC: String); -
RemoteLabCumulative procedure RemoteLabCumulative(Dest: TStrings; const PatientDFN: string; daysback: integer; ADate1, ADate2: TFMDateTime; ASite, ARemoteRPC: String); -
RemoteLabInterim procedure RemoteLabInterim(Dest: TStrings; const PatientDFN: string; ADate1, ADate2: TFMDateTime; ASite, ARemoteRPC: String); -
RemoteLabMicro procedure RemoteLabMicro(Dest: TStrings; const PatientDFN: string; ADate1, ADate2: TFMDateTime; ASite, ARemoteRPC: String); -
RemoteLabReports procedure RemoteLabReports(Dest: TStrings; const PatientDFN: string; reportid, hstype, ADate, section: string; Adate1, Adate2: TFMDateTime; ASite, ARemoteRPC: String); -
TfrmLabs.UpdateRemoteStatus procedure UpdateRemoteStatus(aSiteID, aStatus: string); -

Called-By

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


Source

4386  procedure TfrmLabs.GoRemoteOld(Dest: TStringList; AItem, AReportID: Int64; AQualifier,
4387    ARpc, AHSType, ADaysBack, ASection: string; ADate1, ADate2: TFMDateTime);
4388  var
4389    i,j: integer;
4390    LocalHandle, Report, Query: String;
4391  begin
4392    { AReportID := 1  Generic report   RemoteLabReports
4393                   2  Cumulative       RemoteLabCumulative
4394                   3  Interim          RemoteLabInterim
4395                   4  Microbioloby     RemoteLabMicro }
4396  
4397    with RemoteSites.SiteList do
4398      for i := 0 to Count - 1 do
4399        if TRemoteSite(Items[i]).Selected then
4400          begin
4401            TRemoteSite(Items[i]).LabClear;
4402            if (LeftStr(TRemoteSite(Items[i]).SiteID, 5) = '200HD') then
4403            begin
4404              TRemoteSite(Items[i]).LabQueryStatus := '1^Not Included';
4405              UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'NOT INCLUDED');
4406              TabControl1.OnChange(nil);
4407              continue;
4408            end;
4409             if (LeftStr(TRemoteSite(Items[i]).SiteID, 5) = '200') then
4410            begin
4411              TRemoteSite(Items[i]).LabQueryStatus := '1^Not Included';
4412              UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'NOT INCLUDED');
4413              TabControl1.OnChange(nil);
4414              continue;
4415            end;
4416            TRemoteSite(Items[i]).CurrentLabQuery := 'Lab' + Patient.DFN + ';' + Patient.ICN +
4417              '^' + 'L:' + IntToStr(AItem) + '^' +  IntToStr(AReportID) + '^^' + ARpc + '^' + AHSType +
4418              '^' + ADaysBack + '^' + ASection + '^' + DateToStr(ADate1) + '^' + DateToStr(ADate2) + '^' +
4419              TRemoteSite(Items[i]).SiteID;
4420            LocalHandle := '';
4421            for j := 0 to RemoteReports.Count - 1 do
4422              begin
4423                Query := TRemoteSite(Items[i]).CurrentLabQuery;
4424                Report := TRemoteReport(RemoteReports.ReportList.Items[j]).Report;
4425                if Report = Query then
4426                  begin
4427                    LocalHandle := TRemoteReport(RemoteReports.ReportList.Items[j]).Handle;
4428                    break;
4429                  end;
4430              end;
4431            if Length(LocalHandle) > 1 then
4432              with RemoteSites.SiteList do
4433                begin
4434                  GetRemoteData(TRemoteSite(Items[i]).LabData,LocalHandle,Items[i]);
4435                  TRemoteSite(Items[i]).LabRemoteHandle := '';
4436                  TRemoteSite(Items[i]).LabQueryStatus := '1^Done';
4437                  UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'Done');
4438                  TabControl1.OnChange(nil);
4439                end
4440            else
4441              begin
4442                case AReportID of
4443                1: begin
4444                     RemoteLabReports(Dest, Patient.DFN + ';' + Patient.ICN, 'L:' + IntToStr(AItem),
4445                       AHSType, ADaysBack, ASection, ADate1, ADate2,
4446                       TRemoteSite(Items[i]).SiteID, ARpc);
4447                   end;
4448                2: begin
4449                     RemoteLabCumulative(Dest, Patient.DFN + ';' + Patient.ICN,
4450                       StrToInt(Adaysback), Adate1, Adate2, TRemoteSite(Items[i]).SiteID,ARpc);
4451                   end;
4452                3: begin
4453                     RemoteLabInterim(Dest, Patient.DFN + ';' + Patient.ICN, Adate1, Adate2,
4454                       TRemoteSite(Items[i]).SiteID, ARpc);
4455                   end;
4456                4: begin
4457                     RemoteLabMicro(Dest, Patient.DFN + ';' + Patient.ICN, Adate1, Adate2,
4458                       TRemoteSite(Items[i]).SiteID, ARpc);
4459                   end;
4460                else begin
4461                       RemoteLab(Dest, Patient.DFN + ';' + Patient.ICN, 'L:' + IntToStr(AItem),
4462                       AHSType, ADaysBack, ASection, ADate1, ADate2,
4463                       TRemoteSite(Items[i]).SiteID, ARpc);
4464                     end;
4465                end;
4466                if Dest[0] = '' then
4467                  begin
4468                    TRemoteSite(Items[i]).LabQueryStatus := '-1^Communication error';
4469                    UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'Communication error');
4470                  end
4471                else
4472                  begin
4473                    TRemoteSite(Items[i]).LabRemoteHandle := Dest[0];
4474                    TRemoteSite(Items[i]).LabQueryStatus := '0^initialization...';
4475                    UpdateRemoteStatus(TRemoteSite(Items[i]).SiteID, 'Initialization');
4476                    Timer1.Enabled := True;
4477                    StatusText('Retrieving reports from '
4478                      + TRemoteSite(Items[i]).SiteName + '...');
4479                  end;
4480              end;
4481          end;
4482  end;