Procedure

TRemoteSiteList.ChangePatient

Module

uCore

Last Modified

7/15/2014 3:26:44 PM

Visibility

Public

Owner

TRemoteSiteList

Declaration

procedure   ChangePatient(const DFN: string);

Calls Hierarchy


TRemoteSiteList.ChangePatient
 ├TRemoteSiteList.Clear
 ├HasRemoteData
 └TRemoteSiteList.Add
   └TRemoteSite.Create
     └StrToFMDateTime

Called-By Hierarchy


                    TRemoteSiteList.ChangePatient
                            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┘     

Calls

Name Declaration Comments
TRemoteSiteList.Add procedure Add(ASite: string); -
TRemoteSiteList.Clear procedure Clear; -
HasRemoteData function HasRemoteData(const DFN: string; var ALocations: TStringList): Boolean; -

Called-By

Name Declaration Comments
TfrmFrame.SetUpCIRN procedure SetUpCIRN; -


Source

1680  procedure TRemoteSiteList.ChangePatient(const DFN: string);
1681  var
1682    ALocations: TStringList;
1683    i: integer;
1684  begin
1685    Clear;
1686    ALocations := TStringList.Create;
1687    try
1688      FRemoteDataExists := HasRemoteData(DFN, ALocations);
1689      if FRemoteDataExists then
1690        begin
1691          SortByPiece(ALocations, '^', 2);
1692          for i := 0 to ALocations.Count - 1 do
1693            if piece(ALocations[i],'^',5) = '1' then
1694              Add(ALocations.Strings[i]);
1695          FNoDataReason := '';
1696        end
1697      else
1698        FNoDataReason := Piece(ALocations[0], U, 2);
1699      FCount := FSiteList.Count;
1700    finally
1701      ALocations.Free;
1702    end;
1703  end;