Procedure

TfrmFrame.UpdatePtInfoOnRefresh

Module

fFrame

Last Modified

3/11/2015 8:41:44 AM

Visibility

Public

Owner

TfrmFrame

Declaration

procedure UpdatePtInfoOnRefresh;

Calls Hierarchy


TfrmFrame.UpdatePtInfoOnRefresh
 ├TPatient.Clear
 ├TPatient.SetDFN
 │ ├TPatient.Clear
 │ └SelectPatient
 │   └FormatSSN
 ├TEncounter.GetLocationName
 │ └TEncounter.UpdateText
 │   └GetEncounterText
 ├TEncounter.GetLocationText
 │ └TEncounter.UpdateText...
 ├TEncounter.GetVisitCategory
 ├TfrmPrintLocation.SwitchEncounterLoction
 │ ├TfrmBase508Form.Create
 │ │ ├TfrmBase508Form.UpdateAccessibilityActions
 │ │ ├UnfocusableControlEnter
 │ │ └AdjustControls
 │ │   ├TfrmBase508Form.ModifyUnfocusableControl
 │ │   └..(rec)..
 │ ├CurrentLocationForPatient
 │ ├TEncounter.SetLocation
 │ ├TfrmFrame.DisplayEncounterText
 │ │ ├TEncounter.GetLocationText...
 │ │ ├TEncounter.GetProviderName
 │ │ │ └TEncounter.UpdateText...
 │ │ └TfrmFrame.FitToolbar
 │ └TEncounter.EncounterSwitch
 │   ├TEncounter.SetLocation
 │   ├TEncounter.SetVisitCategory
 │   └TEncounter.SetDateTime
 ├TfrmFrame.DisplayEncounterText...
 ├TEncounter.SetLocation
 ├TEncounter.SetInpatient
 ├TEncounter.SetDateTime
 └TEncounter.SetVisitCategory

Called-By Hierarchy


              TfrmFrame.UpdatePtInfoOnRefresh
                 TfrmFrame.mnuFileOpenClick┤ 
                     TfrmFrame.UMInitiate┤ │ 
               TfrmFrame.mnuFileNextClick┤ │ 
          TfrmFrame.mnuFileOpenClick...┤ │ │ 
      TfrmFrame.mnuFileNotifRemoveClick┤ │ │ 
              TfrmFrame.NextButtonClick┘ │ │ 
            TfrmFrame.SetUpNextButton┘   │ │ 
      TfrmFrame.mnuFileOpenClick...┤     │ │ 
               TfrmFrame.FormResize┘     │ │ 
             TfrmFrame.ChangeFont┘       │ │ 
     TfrmFrame.LoadSizesForUser┤         │ │ 
TfrmFrame.LoadUserPreferences┘ │         │ │ 
       TfrmFrame.UMInitiate┘   │         │ │ 
     TfrmFrame.mnuFontSizeClick┘         │ │ 
            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.mnuFileReviewClick┤ 
                 TfrmOrders.mnuActSignClick┤ 
                    TfrmODActive.btnOKClick┘ 

Calls

Name Declaration Comments
TPatient.Clear procedure Clear; -
TfrmFrame.DisplayEncounterText procedure DisplayEncounterText; -
TEncounter.GetLocationName function GetLocationName: string; -
TEncounter.GetLocationText function GetLocationText: string; -
TEncounter.GetVisitCategory function GetVisitCategory: Char; -
TEncounter.SetDateTime procedure SetDateTime(Value: TFMDateTime); -
TPatient.SetDFN procedure SetDFN(const Value: string); -
TEncounter.SetInpatient procedure SetInpatient(Value: Boolean); -
TEncounter.SetLocation procedure SetLocation(Value: Integer); -
TEncounter.SetVisitCategory procedure SetVisitCategory(Value: Char); -
TfrmPrintLocation.SwitchEncounterLoction procedure SwitchEncounterLoction(pEncounterLoc: integer; pEncounterLocName, pEncounterLocText: string; pEncounterDT: TFMDateTime; pEncounterVC: Char); -

Called-By

Name Declaration Comments
TfrmODActive.btnOKClick procedure btnOKClick(Sender: TObject); -
TfrmOrders.mnuActSignClick procedure mnuActSignClick(Sender: TObject); -
TfrmFrame.mnuFileOpenClick procedure mnuFileOpenClick(Sender: TObject); -
TfrmFrame.mnuFileReviewClick procedure mnuFileReviewClick(Sender: TObject); -


Source

3487  procedure TfrmFrame.UpdatePtInfoOnRefresh;
3488  var
3489    tmpDFN: string;
3490  begin
3491    tmpDFN := Patient.DFN;
3492    Patient.Clear;
3493    Patient.DFN := tmpDFN;
3494    uCore.TempEncounterLoc := 0;  //hds7591  Clinic/Ward movement.
3495    uCore.TempEncounterLocName := ''; //hds7591  Clinic/Ward movement.
3496    uCore.TempEncounterText := '';
3497    uCore.TempEncounterDateTime := 0;
3498    uCore.TempEncounterVistCat := #0;
3499    if (not FRefreshing) and (FReviewClick = false) then DoNotChangeEncWindow := false;
3500    if (FPrevInPatient and Patient.Inpatient) then                //transfering inside hospital
3501      begin
3502            if FReviewClick = True then
3503              begin
3504                uCore.TempEncounterLoc := Encounter.Location;
3505                uCore.TempEncounterLocName := Encounter.LocationName;
3506                uCore.TempEncounterText := Encounter.LocationText;
3507                uCore.TempEncounterDateTime := Encounter.DateTime;
3508                uCore.TempEncounterVistCat := Encounter.VisitCategory;
3509              end
3510            else if (patient.Location <> encounter.Location) and (OrderPrintForm = false) then
3511                  begin
3512                    frmPrintLocation.SwitchEncounterLoction(Encounter.Location, Encounter.locationName, Encounter.LocationText,
3513                                                            Encounter.DateTime, Encounter.VisitCategory);
3514                    DisplayEncounterText;
3515                    exit;
3516                  end
3517            else if (patient.Location <> encounter.Location) and (OrderPrintForm = True) then
3518              begin
3519                OrderPrintForm := false;
3520                Exit;
3521              end;
3522            if orderprintform = false then Encounter.Location := Patient.Location;
3523      end
3524    else if (FPrevInPatient and (not Patient.Inpatient)) then     //patient was discharged
3525    begin
3526      Encounter.Inpatient := False;
3527      Encounter.Location := 0;
3528      FPrevInPatient := False;
3529      lblPtName.Caption := '';
3530      lblPtName.Caption := Patient.Name + Patient.Status; //CQ #17491: Refresh patient status indicator in header bar on discharge.
3531    end
3532    else if ((not FPrevInPatient) and Patient.Inpatient) then     //patient was admitted
3533    begin
3534      Encounter.Inpatient := True;
3535      uCore.TempEncounterLoc := Encounter.Location;  //hds7591  Clinic/Ward movement.
3536      uCore.TempEncounterLocName := Encounter.LocationName; //hds7591  Clinic/Ward movement.
3537      uCore.TempEncounterText := Encounter.LocationText;
3538      uCore.TempEncounterDateTime := Encounter.DateTime;
3539      uCore.TempEncounterVistCat := Encounter.VisitCategory;
3540      lblPtName.Caption := '';
3541      lblPtName.Caption := Patient.Name + Patient.Status; //CQ #17491: Refresh patient status indicator in header bar on admission.
3542      if (FReviewClick = False) and (encounter.Location <> patient.Location) and (OrderPrintForm = false) then
3543          begin
3544            frmPrintLocation.SwitchEncounterLoction(Encounter.Location, Encounter.locationName, Encounter.LocationText,
3545                                                  Encounter.DateTime, Encounter.VisitCategory);
3546            //agp values are reset depending on the user process
3547            uCore.TempEncounterLoc := 0;  //hds7591  Clinic/Ward movement.
3548            uCore.TempEncounterLocName := ''; //hds7591  Clinic/Ward movement.
3549            uCore.TempEncounterText := '';
3550            uCore.TempEncounterDateTime := 0;
3551            uCore.TempEncounterVistCat := #0;
3552          end
3553      else
3554      if OrderPrintForm = false then
3555        begin
3556          Encounter.Location := Patient.Location;
3557          Encounter.DateTime := Patient.AdmitTime;
3558          Encounter.VisitCategory := 'H';
3559        end;
3560      FPrevInPatient := True;
3561    end;
3562    //if User.IsProvider then Encounter.Provider := ;
3563    DisplayEncounterText;
3564  end;