Procedure

LoadEncounterForm

Module

rPCE

Last Modified

10/7/2014 12:48:38 PM

Scope

Global

Declaration

procedure LoadEncounterForm;

Calls Hierarchy


LoadEncounterForm
 ├TPCEData.VisitDateTime
 │ └TPCEData.IsSecondaryVisit
 ├FMNow
 └AddProbsToDiagnoses
   ├TPCEData.VisitDateTime...
   ├rpcGetProviderPatientDaysDx
   └rpcGetPersonalDxList

Called-By Hierarchy


                                                             LoadEncounterForm
                                                       ListVisitTypeSections┤ 
                                                                  InitList┘ │ 
                                         TfrmEncounterFrame.SynchPCEData┘   │ 
                                                             UpdatePCE┘     │ 
                                                TPCEData.OK2SignNote┤       │ 
                                                         IsOK2Sign┘ │       │ 
                                      TfrmDCSumm.mnuActSignClick┤   │       │ 
                                         TfrmDCSumm.SaveSignItem┤   │       │ 
                                         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┘               │   │       │ 
                           TfrmConsults.mnuActSignatureSignClick┤   │       │ 
                                       TfrmConsults.SaveSignItem┤   │       │ 
                                      TfrmReview.cmdOKClick...┘ │   │       │ 
                                     TfrmSurgery.mnuActSignClick┤   │       │ 
                                        TfrmSurgery.SaveSignItem┤   │       │ 
                                      TfrmReview.cmdOKClick...┘ │   │       │ 
                                       TfrmNotes.mnuActSignClick┤   │       │ 
                                          TfrmNotes.SaveSignItem┘   │       │ 
                                      TfrmReview.cmdOKClick...┘     │       │ 
                                              TfrmDCSumm.cmdPCEClick┤       │ 
                                            TfrmConsults.cmdPCEClick┤       │ 
                                                      EditPCEData...┤       │ 
                                             TfrmSurgery.cmdPCEClick┤       │ 
                                              UpdateEncounterInfo...┘       │ 
                                                       ListDiagnosisSections┤ 
                                        TfrmEncounterFrame.SynchPCEData...┘ │ 
                                                         ListImmunizSections┤ 
                                        TfrmEncounterFrame.SynchPCEData...┘ │ 
                                                       ListProcedureSections┤ 
                                        TfrmEncounterFrame.SynchPCEData...┘ │ 
                                                            ListSkinSections┤ 
                                        TfrmEncounterFrame.SynchPCEData...┘ │ 
                                                         ListPatientSections┤ 
                                        TfrmEncounterFrame.SynchPCEData...┘ │ 
                                                          ListHealthSections┤ 
                                        TfrmEncounterFrame.SynchPCEData...┘ │ 
                                                           ListExamsSections┘ 
                                        TfrmEncounterFrame.SynchPCEData...┘   

Calls

Name Declaration Comments
AddProbsToDiagnoses procedure AddProbsToDiagnoses; -
FMNow function FMNow: TFMDateTime; -
TPCEData.VisitDateTime function VisitDateTime: TFMDateTime; -

Called-By

Name Declaration Comments
ListDiagnosisSections procedure ListDiagnosisSections(Dest: TStrings); -
ListExamsSections procedure ListExamsSections(Dest: TStrings); -
ListHealthSections procedure ListHealthSections(Dest: TStrings); -
ListImmunizSections procedure ListImmunizSections(Dest: TStrings); -
ListPatientSections procedure ListPatientSections(Dest: TStrings); -
ListProcedureSections procedure ListProcedureSections(Dest: TStrings); -
ListSkinSections procedure ListSkinSections(Dest: TStrings); -
ListVisitTypeSections procedure ListVisitTypeSections(Dest: TStrings); -


Source

322   procedure LoadEncounterForm;
323   { load the major coding lists that are used by the encounter form for a given location }
324   var
325     i: integer;
326     uTempList: TStringList;
327     EncDt: TFMDateTime;
328     
329   begin
330     uLastLocation := uEncLocation;
331     EncDt := Trunc(uEncPCEData.VisitDateTime);
332     if uEncPCEData.VisitCategory = 'E' then EncDt := Trunc(FMNow);
333   
334     //add problems to the top of diagnoses.
335     uTempList := TstringList.Create;
336   
337   
338     if UBAGlobals.BILLING_AWARE then //BAPHII 1.3.10
339        begin
340           UBACore.BADxList := TStringList.Create;
341        end;
342   
343     try
344       uDiagnoses.clear;
345   
346       if BILLING_AWARE then
347        begin
348           UBACore.BADxList.Clear; //BAPHII 1.3.10
349        end;
350   
351       tCallV(uTempList,     'ORWPCE DIAG',  [uEncLocation, EncDt]);  //BAPHII 1.3.10
352       uDiagnoses.add(utemplist.strings[0]);  //BAPHII 1.3.10
353       AddProbsToDiagnoses;  //BAPHII 1.3.10
354      // BA 25  AddProviderPatientDaysDx(uDxLst, IntToStr(Encounter.Provider), Patient.DFN);
355       for i := 1 to (uTempList.Count-1) do  //BAPHII 1.3.10
356         uDiagnoses.add(uTemplist.strings[i]);  //BAPHII 1.3.10
357   
358     finally
359       uTempList.free;
360     end;
361   
362     tCallV(uVisitTypes,    'ORWPCE VISIT', [uEncLocation, EncDt]);
363     tCallV(uProcedures,    'ORWPCE PROC',  [uEncLocation, EncDt]);
364     tCallV(uImmunizations, 'ORWPCE IMM',   [uEncLocation]);
365     tCallV(uSkinTests,     'ORWPCE SK',    [uEncLocation]);
366     tCallV(uPatientEds,    'ORWPCE PED',   [uEncLocation]);
367     tCallV(uHealthFactors, 'ORWPCE HF',    [uEncLocation]);
368     tCallV(uExams,         'ORWPCE XAM',   [uEncLocation]);
369   
370     if uVisitTypes.Count > 0    then uVisitTypes.Delete(0);             // discard counts
371     if uDiagnoses.Count  > 0    then uDiagnoses.Delete(0);
372     if uProcedures.Count > 0    then uProcedures.Delete(0);
373     if uImmunizations.Count > 0 then uImmunizations.Delete(0);   
374     if uSkinTests.Count > 0     then uSkinTests.Delete(0);       
375     if uPatientEds.Count > 0    then uPatientEds.Delete(0);      
376     if uHealthFactors.Count > 0 then uHealthFactors.Delete(0);   
377     if uExams.Count > 0         then uExams.Delete(0);           
378   
379     if (uVisitTypes.Count > 0) and (CharAt(uVisitTypes[0], 1) <> U) then uVisitTypes.Insert(0, U);
380     if (uDiagnoses.Count > 0)  and (CharAt(uDiagnoses[0], 1)  <> U) then uDiagnoses.Insert(0,  U);
381     if (uProcedures.Count > 0) and (CharAt(uProcedures[0], 1) <> U) then uProcedures.Insert(0, U);
382     if (uImmunizations.Count > 0) and (CharAt(uImmunizations[0], 1) <> U) then uImmunizations.Insert(0, U);
383     if (uSkinTests.Count > 0) and (CharAt(uSkinTests[0], 1) <> U) then uSkinTests.Insert(0, U);            
384     if (uPatientEds.Count > 0) and (CharAt(uPatientEds[0], 1) <> U) then uPatientEds.Insert(0, U);         
385     if (uHealthFactors.Count > 0) and (CharAt(uHealthFactors[0], 1) <> U) then uHealthFactors.Insert(0, U);
386     if (uExams.Count > 0) and (CharAt(uExams[0], 1) <> U) then uExams.Insert(0, U);                        
387   
388   end;