Procedure

TfrmPrintLocation.SwitchEncounterLoction

Module

fPrintLocation

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public

Owner

TfrmPrintLocation

Declaration

procedure SwitchEncounterLoction(pEncounterLoc: integer; pEncounterLocName, pEncounterLocText: string; pEncounterDT: TFMDateTime; pEncounterVC: Char);

Calls Hierarchy


TfrmPrintLocation.SwitchEncounterLoction
 ├TfrmBase508Form.Create
 │ ├TfrmBase508Form.UpdateAccessibilityActions
 │ ├UnfocusableControlEnter
 │ └AdjustControls
 │   ├TfrmBase508Form.ModifyUnfocusableControl
 │   └..(rec)..
 ├CurrentLocationForPatient
 ├TEncounter.SetLocation
 ├TfrmFrame.DisplayEncounterText
 │ ├TEncounter.GetLocationText
 │ │ └TEncounter.UpdateText
 │ │   └GetEncounterText
 │ ├TEncounter.GetProviderName
 │ │ └TEncounter.UpdateText...
 │ └TfrmFrame.FitToolbar
 └TEncounter.EncounterSwitch
   ├TEncounter.SetLocation
   ├TEncounter.SetVisitCategory
   └TEncounter.SetDateTime

Called-By Hierarchy


                        TfrmPrintLocation.SwitchEncounterLoction
                               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┘ │ 
                                         TfrmReview.cmdOKClick┘ 
                                               ReviewChanges┘   
                           TfrmFrame.AllowContextChangeAll┤     
                                TfrmFrame.FormCloseQuery┤ │     
                           TfrmFrame.mnuFileNextClick...┤ │     
                           TfrmFrame.mnuFileOpenClick...┤ │     
                           TfrmFrame.ctxContextorPending┤ │     
                          TfrmFrame.StartCCOWContextor┘ │ │     
                                TfrmFrame.FormCreate┘   │ │     
                         TfrmFrame.ctxContextorCommitted┤ │     
                       TfrmFrame.StartCCOWContextor...┘ │ │     
                  TfrmFrame.mnuFileResumeContextGetClick┤ │     
                  TfrmFrame.mnuFileResumeContextSetClick┘ │     
                                  TfrmFrame.FormCloseQuery┤     
                              TfrmFrame.mnuFileReviewClick┤     
                                           UpdateEncounter┘     
                         TfrmFrame.mnuFileEncounterClick┤       
                                 TfrmFrame.ViewInfo...┤ │       
                    TfrmODMedIV.SetValuesFromResponses┤ │       
                             TfrmODMedIV.SetupDialog┤ │ │       
                   TfrmODMedIV.cboSolutionMouseClick┘ │ │       
                       TfrmODMedIV.cboSolutionExit┘   │ │       
                  TfrmODMedIV.cboSolutionMouseClick...┤ │       
                     TfrmODMedIV.cboAdditiveMouseClick┤ │       
                         TfrmODMedIV.cboAdditiveExit┘ │ │       
                                TfrmODAuto.SetupDialog┤ │       
                                   ActivateOrderDialog┤ │       
                           TfrmRemDlg.btnFinishClick┤ │ │       
           TfrmConsults.mnuActNewConsultRequestClick┤ │ │       
                   TfrmConsults.cmdNewConsultClick┘ │ │ │       
                TfrmConsults.mnuActNewProcedureClick┤ │ │       
                      TfrmConsults.cmdNewProcClick┘ │ │ │       
                                        ChangeOrders┤ │ │       
                      TfrmOrders.mnuActChangeClick┤ │ │ │       
                        TfrmMeds.mnuActChangeClick┘ │ │ │       
                                     ChangeOrdersEvt┤ │ │       
                                          CopyOrders┤ │ │       
                        TfrmOrders.mnuActCopyClick┤ │ │ │       
                          TfrmMeds.mnuActCopyClick┤ │ │ │       
                           TfrmODActive.btnOKClick┘ │ │ │       
                                      TransferOrders┤ │ │       
                        TfrmOrders.mnuActCopyClick┤ │ │ │       
                          TfrmMeds.mnuActCopyClick┤ │ │ │       
                           TfrmODActive.btnOKClick┘ │ │ │       
                            TfrmOrders.lstWriteClick┤ │ │       
               TfrmOrders.PlaceOrderForDefaultDialog┤ │ │       
                  TfrmOrders.DisplayDefaultDlgList┤ │ │ │       
                       TfrmOrders.ResetOrderPage┘ │ │ │ │       
               TfrmOrders.btnDelayedOrderClick┘   │ │ │ │       
                                 DisplayEvntDialog┤ │ │ │       
                             SetDelayEventForMed┘ │ │ │ │       
                      TfrmMeds.mnuActCopyClick┘   │ │ │ │       
                                 DisplayEvntDialog┤ │ │ │       
                                  SetViewForCopy┘ │ │ │ │       
                    TfrmOrders.mnuActCopyClick┘   │ │ │ │       
                                 DisplayEvntDialog┘ │ │ │       
                                ExecuteChangeEvt┘   │ │ │       
                 TfrmOrders.mnuActChgEvntClick┘     │ │ │       
                             TfrmMeds.mnuActNewClick┤ │ │       
                           TfrmOMNavA.ActivateDialog┤ │ │       
                         TfrmOMNavA.grdMenuKeyDown┤ │ │ │       
                         TfrmOMNavA.grdMenuMouseUp┘ │ │ │       
                                TfrmOMSet.DoNextItem┘ │ │       
                              TfrmOMSet.InsertList┤   │ │       
                               ActivateOrderList┘ │   │ │       
                     TfrmRemDlg.btnFinishClick┤   │   │ │       
                             ActivateOrderHTML┤   │   │ │       
                    TfrmOrders.lstWriteClick┤ │   │   │ │       
    TfrmOrders.PlaceOrderForDefaultDialog...┘ │   │   │ │       
                              ActivateOrderSet┤   │   │ │       
                   TfrmRemDlg.btnFinishClick┤ │   │   │ │       
TfrmConsults.mnuActNewConsultRequestClick...┤ │   │   │ │       
     TfrmConsults.mnuActNewProcedureClick...┤ │   │   │ │       
                    TfrmOrders.lstWriteClick┤ │   │   │ │       
    TfrmOrders.PlaceOrderForDefaultDialog...┤ │   │   │ │       
                     TfrmMeds.mnuActNewClick┤ │   │   │ │       
                TfrmOMNavA.ActivateDialog...┤ │   │   │ │       
                     TfrmOMSet.DoNextItem...┘ │   │   │ │       
                       TfrmOMNavA.DoSelectList┘   │   │ │       
                     TfrmOMNavA.grdMenuKeyUp┤     │   │ │       
                   TfrmOMNavA.grdMenuMouseUp┘     │   │ │       
                                        SkipToNext┤   │ │       
                         TfrmOMSet.DoNextItem...┘ │   │ │       
                            TfrmOMSet.UMDelayEvent┘   │ │       
                               TfrmOMSet.InsertList...┤ │       
                                TfrmODMeds.SetupDialog┤ │       
                             TfrmODMeds.btnSelectClick┤ │       
                             TfrmODMeds.UMDelayClick┘ │ │       
                                    ExecuteRenewOrders┘ │       
                         TfrmOrders.mnuActRenewClick┤   │       
                           TfrmMeds.mnuActRenewClick┘   │       
                                        EncounterPresent┤       
                                      ReadyForNewOrder┤ │       
                           TfrmRemDlg.btnFinishClick┤ │ │       
        TfrmConsults.mnuActNewConsultRequestClick...┤ │ │       
             TfrmConsults.mnuActNewProcedureClick...┤ │ │       
                                     ChangeOrders...┤ │ │       
                                     ChangeOrdersEvt┤ │ │       
                                       CopyOrders...┤ │ │       
                                   TransferOrders...┤ │ │       
                            TfrmOrders.lstWriteClick┤ │ │       
                             TfrmMeds.mnuActNewClick┘ │ │       
                                     ReadyForNewOrder1┤ │       
            TfrmOrders.PlaceOrderForDefaultDialog...┘ │ │       
                              TfrmOrders.mnuActDCClick┤ │       
                             TfrmOrders.mnuActRelClick┤ │       
                            TfrmOrders.mnuActHoldClick┤ │       
                          TfrmOrders.mnuActUnholdClick┤ │       
                           TfrmOrders.mnuActRenewClick┤ │       
                         TfrmOrders.mnuActReleaseClick┤ │       
                         TfrmOrders.mnuActOnChartClick┤ │       
                            TfrmOrders.mnuActSignClick┤ │       
                                TfrmMeds.mnuActDCClick┤ │       
                              TfrmMeds.mnuActHoldClick┤ │       
                             TfrmMeds.mnuActRenewClick┤ │       
                            TfrmMeds.mnuActUnholdClick┤ │       
                              TfrmMeds.mnuActCopyClick┤ │       
                            TfrmMeds.mnuActRefillClick┘ │       
                                     EncounterPresentEDO┤       
                                   ReadyForNewOrder...┤ │       
                         TfrmOrders.mnuActChgEvntClick┤ │       
                          TfrmOrders.mnuActChangeClick┤ │       
                            TfrmOrders.mnuActCopyClick┤ │       
                       TfrmOrders.btnDelayedOrderClick┤ │       
                            TfrmMeds.mnuActChangeClick┤ │       
                              TfrmMeds.mnuActCopyClick┘ │       
                                             UpdateVisit┤       
                                           EditPCEData┤ │       
                             TfrmSurgery.cmdPCEClick┤ │ │       
                                 UpdateEncounterInfo┘ │ │       
                             TfrmNotes.cmdPCEClick┘   │ │       
                        TfrmVitals.btnEnterVitalsClick┘ │       
                                             UpdateVisit┤       
                                        EncounterPresent┘       
                         TfrmProblems.lstProbActsClick┘         
                     TfrmProblems.wgProbDataDblClick┤           
                           TfrmProblems.lstViewClick┘           
                   TfrmProblems.HighlightDuplicate┘             
                         TfrmProblems.AddProblem┤               
              TfrmProblems.lstProbActsClick...┤ │               
                 TfrmProblems.lstProbPickClick┤ │               
              TfrmProblems.lstProbPickDblClick┤ │               
              TfrmProblems.edProbEntKeyPress┘ │ │               
                      TfrmProblems.UMPLLexicon┘ │               
                   TfrmdlgProb.bbChangeProbClick┘               

Calls

Name Declaration Comments
TfrmBase508Form.Create constructor Create(AOwner: TComponent); override; -
CurrentLocationForPatient procedure CurrentLocationForPatient(const DFN: string; var ALocation: Integer; var AName: string; var ASvc: string); -
TfrmFrame.DisplayEncounterText procedure DisplayEncounterText; -
TEncounter.EncounterSwitch procedure EncounterSwitch(Loc: integer; LocName, LocText: string; DT: TFMDateTime; vCat: Char); -
TEncounter.SetLocation procedure SetLocation(Value: Integer); -

Called-By

Name Declaration Comments
TfrmReview.cmdOKClick procedure cmdOKClick(Sender: TObject); -
TfrmFrame.UpdatePtInfoOnRefresh procedure UpdatePtInfoOnRefresh; -


Source

472   procedure TfrmPrintLocation.SwitchEncounterLoction(pEncounterLoc: integer; pEncounterLocName, pEncounterLocText: string;
473                                 pEncounterDT: TFMDateTime; pEncounterVC: Char);
474   var
475   cidx, widx, WardIEN: integer;
476   Asvc, WardLocation: string;
477   begin
478     frmPrintLocation := TfrmPrintLocation.Create(Application);
479     try
480     frmPrintLocation.DisplayOrders := false;
481     frmPrintLocation.CloseOK := false;
482     CurrentLocationForPatient(Patient.DFN, WardIEN, WardLocation, ASvc);
483     frmPrintLocation.lblEncounter.Enabled := True;
484     frmPrintLocation.cboEncLoc.Enabled := True;
485     frmPrintLocation.Cloc := pEncounterLocName;
486     frmPrintLocation.WLoc := WardLocation;
487     frmPrintLocation.CIEN := pEncounterLoc;
488     frmPrintLocation.WIEN := wardIEN;
489     ResizeAnchoredFormToFont(frmPrintLocation);
490     frmPrintLocation.cboEncLoc.Items.Add(frmPrintLocation.CLoc);
491     frmPrintLocation.cboEncLoc.Items.Add(frmPrintLocation.WLoc);
492     frmPrintLocation.Caption := 'Refresh Encounter Location Form';
493     frmPrintLocation.ShowModal;
494     cidx := frmPrintLocation.cboEncLoc.Items.IndexOf(frmPrintLocation.CLoc);
495     widx := frmPrintLocation.cboEncLoc.Items.IndexOf(frmPrintLocation.WLoc);
496     if frmPrintLocation.cboEncLoc.Enabled = FALSE then frmPrintLocation.cboEncLoc.ItemIndex := widx;
497     
498     if frmPrintLocation.cboEncLoc.ItemIndex = cidx then
499       begin
500         Encounter.Location := pEncounterLoc;
501         Encounter.LocationName := pEncounterLocName;
502         Encounter.LocationText := pEncounterLocText;
503         fFrame.frmFrame.DisplayEncounterText;
504       end
505     else if frmPrintLocation.cboEncLoc.ItemIndex = widx then
506       begin
507         uCore.Encounter.EncounterSwitch(WardIEN, WardLocation, '', Patient.AdmitTime, 'H');
508         fFrame.frmFrame.DisplayEncounterText;
509       end;
510     finally
511       frmPrintLocation.Destroy;
512     end;
513   end;