Procedure

TfrmPrintLocation.PrintLocation

Module

fPrintLocation

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public

Owner

TfrmPrintLocation

Declaration

procedure PrintLocation(OrderLst: TStringList; pEncounterLoc: integer; pEncounterLocName, pEncounterLocText: string;
           pEncounterDT: TFMDateTime; pEncounterVC: Char; var ClinicLst, WardLst: TStringList;
           var wardIEN: integer; var wardLocation: string; ContainsIMOOrders: boolean; displayEncSwitch: boolean = false);

Calls Hierarchy


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

Called-By Hierarchy


                                 TfrmPrintLocation.PrintLocation
                                             ExecuteSignOrders┤ 
                                  TfrmOrders.mnuActSignClick┘ │ 
                                         TfrmReview.cmdOKClick┘ 
                                               ReviewChanges┘   
                           TfrmFrame.AllowContextChangeAll┤     
                                TfrmFrame.FormCloseQuery┤ │     
                              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.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); -
TfrmPrintLocation.ProcessClinicOrders procedure ProcessClinicOrders(WardList, ClinicList: TStringList; WardIEN, ClinicIEN: integer; ContainsIMO: boolean); -

Called-By

Name Declaration Comments
TfrmReview.cmdOKClick procedure cmdOKClick(Sender: TObject); -
ExecuteSignOrders {Forward} function ExecuteSignOrders(SelectedList: TList): Boolean; -


Source

332   procedure TfrmPrintLocation.PrintLocation(OrderLst: TStringList; pEncounterLoc:integer; pEncounterLocName,
333             pEncounterLocText: string; pEncounterDT: TFMDateTime; pEncounterVC: Char;
334             var ClinicLst, WardLst: TStringList; var wardIEN: integer; var wardLocation: string;
335             ContainsIMOOrders: boolean; displayEncSwitch: boolean = false);
336   var
337   OrderInfo, OrderText: string;
338   cidx, i, widx: integer;
339   begin
340     frmPrintLocation := TfrmPrintLocation.Create(Application);
341     try
342     frmPrintLocation.DisplayOrders := true;
343     frmPrintLocation.CloseOK := false;
344     ClinicArr := TStringList.Create;
345     WardArr := TStringList.Create;
346     frmPrintlocation.orderGrid.RowCount := OrderLst.Count + 1;
347     CurrentLocationForPatient(Patient.DFN, WardIEN, WardLocation, ASvc);
348     frmPrintLocation.lblEncounter.Enabled := displayEncSwitch;
349     frmPrintLocation.cboEncLoc.Enabled := displayEncSwitch;
350     frmPrintLocation.Cloc := pEncounterLocName;
351     frmPrintLocation.WLoc := WardLocation;
352     frmPrintLocation.CIEN := pEncounterLoc;
353     frmPrintLocation.WIEN := wardIEN;
354     ResizeAnchoredFormToFont(frmPrintLocation);
355     frmPrintLocation.orderGrid.DefaultRowHeight := frmPrintLocation.cbolocation.Height;
356     for i := 0 to OrderLst.Count - 1 do
357       begin
358       OrderInfo := Piece(OrderLst.Strings[i],':',1);
359       OrderText := AnsiReplaceText(Piece(OrderLst.Strings[i],':',2),CRLF,'');
360       frmPrintLocation.orderGrid.Cells[COL_ORDERINFO,i+1] := OrderInfo;
361       frmPrintLocation.orderGrid.Cells[COL_ORDERTEXT,i+1] := OrderText;
362       end;
363     frmPrintLocation.cbolocation.Items.Add(frmPrintLocation.CLoc);
364     frmPrintLocation.cbolocation.Items.Add(frmPrintLocation.WLoc);
365     if frmPrintLocation.cboEncLoc.Enabled = True then
366       begin
367         frmPrintLocation.cboEncLoc.Items.Add(frmPrintLocation.CLoc);
368         frmPrintLocation.cboEncLoc.Items.Add(frmPrintLocation.WLoc);
369       end;
370     frmPrintLocation.ShowModal;
371     if assigned(ClinicArr) then ClinicLst.AddStrings(ClinicArr);
372     if assigned(WardArr) then WardLst.AddStrings(WardArr);
373     ProcessClinicOrders(WardLst, ClinicLst, WardIEN, pEncounterLoc, ContainsIMOOrders);
374     cidx := frmPrintLocation.cboEncLoc.Items.IndexOf(frmPrintLocation.CLoc);
375     widx := frmPrintLocation.cboEncLoc.Items.IndexOf(frmPrintLocation.WLoc);
376     if frmPrintLocation.cboEncLoc.ItemIndex = cidx then
377       begin
378         uCore.Encounter.EncounterSwitch(pEncounterLoc, pEncounterLocName, pEncounterLocText, pEncounterDT, pEncounterVC);
379         fFrame.frmFrame.DisplayEncounterText;
380         fFrame.frmFrame.OrderPrintForm := True;
381       end
382     else if frmPrintLocation.cboEncLoc.ItemIndex = widx then
383       begin
384       uCore.Encounter.EncounterSwitch(WardIEN, WardLocation, WardLocation, Patient.AdmitTime, 'H');
385         fFrame.frmFrame.DisplayEncounterText;
386       end;
387     finally
388      frmPrintLocation.Destroy;
389     end;
390   end;