Procedure

BuildConsultsTree

Module

uConsults

Last Modified

7/15/2014 3:26:36 PM

Scope

Interfaced

Declaration

procedure BuildConsultsTree(Tree: TORTreeView; tmpList: TStrings; const Parent: string; Node: TORTreeNode;
           CurrentContext: TSelectContext);

Calls Hierarchy


BuildConsultsTree
 ├MakeConsultListDisplayText
 ├SetNodeImage
 └..(rec)..

Called-By Hierarchy


                                                             BuildConsultsTree
                                                                   ..(rec)..┤ 
                                         TfrmConsults.UpdateConsultsTreeView┘ 
                                                 TfrmConsults.LoadConsults┘   
                                                 TfrmConsults.UpdateList┤     
                                             TfrmConsults.mnuViewClick┤ │     
                                         TfrmConsults.SetViewContext┘ │ │     
                                          TfrmConsults.DisplayPage┤   │ │     
                          TfrmConsults.mnuViewReturntoDefaultClick┘   │ │     
                                    TfrmConsults.mnuActNoteDeleteClick┤ │     
                                      TfrmConsults.SaveEditedConsult┘ │ │     
                                      TfrmConsults.SaveCurrentNote┘   │ │     
                                 TfrmConsults.AllowContextChange┤     │ │     
                               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┘   │     │ │     
                                  TfrmConsults.SetViewContext...┤     │ │     
                                    TfrmConsults.mnuViewClick...┤     │ │     
                      TfrmConsults.mnuActDetachFromIDParentClick┤     │ │     
                           TfrmConsults.mnuActNoteDeleteClick...┤     │ │     
                           TfrmConsults.mnuActSignatureSaveClick┤     │ │     
                           TfrmConsults.mnuActSignatureSignClick┤     │ │     
                                       TfrmConsults.SaveSignItem┤     │ │     
                                         TfrmReview.cmdOKClick┘ │     │ │     
                                               ReviewChanges┘   │     │ │     
                        TfrmFrame.AllowContextChangeAll...┤     │     │ │     
                                  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.mnuActConsultClick┤     │ │     
                                       TfrmConsults.RequestPrint┤     │ │     
                            TfrmConsults.mnuActPrintSF513Click┤ │     │ │     
                                   TfrmFrame.mnuFilePrintClick┘ │     │ │     
                          TfrmConsults.mnuActDisplayResultsClick┤     │ │     
                             TfrmConsults.ProcessNotifications┘ │     │ │     
                                    TfrmConsults.DisplayPage┘   │     │ │     
                            TfrmConsults.mnuActDisplaySF513Click┤     │ │     
                              TfrmConsults.mnuActPrintSF513Click┤     │ │     
                          TfrmConsults.mnuActDisplayDetailsClick┤     │ │     
                                          TfrmConsults.FormClose┤     │ │     
                     TfrmConsults.mnuActIdentifyAddlSignersClick┤     │ │     
                         TfrmConsults.popNoteMemoAddlSignClick┘ │     │ │     
                            TfrmConsults.ProcessNotifications...┤     │ │     
                               TfrmConsults.mnuActNotePrintClick┤     │ │     
                            TfrmConsults.popNoteMemoPrintClick┘ │     │ │     
                                       TfrmConsults.StartNewEdit┤     │ │     
                              TfrmConsults.mnuActCompleteClick┤ │     │ │     
                            TfrmConsults.mnuActAddIDEntryClick┤ │     │ │     
                          TfrmConsults.mnuActMakeAddendumClick┤ │     │ │     
                              TfrmConsults.mnuActNoteEditClick┘ │     │ │     
                            TfrmConsults.mnuActCompleteClick┘   │     │ │     
                                TfrmConsults.tvCsltNotesDragDrop┤     │ │     
                               TfrmConsults.tvCsltNotesStartDrag┤     │ │     
                        TfrmConsults.mnuActAttachtoIDParentClick┤     │ │     
                                 TfrmConsults.LstConsultsToPrint┘     │ │     
                      TfrmFrame.mnuFilePrintSelectedItemsClick┘       │ │     
                                 TfrmConsults.mnuActSignatureSaveClick┤ │     
                                 TfrmConsults.mnuActSignatureSignClick┤ │     
                                          TfrmConsults.SaveSignItem...┤ │     
                                       TfrmConsults.mnuActConsultClick┤ │     
                                              TfrmConsults.NotifyOrder┤ │     
                                                TfrmFrame.UMNewOrder┘ │ │     
                                               TfrmConsults.UMNewOrder┤ │     
                                        TfrmConsults.ProcessMedResults┘ │     
                                   TfrmConsults.mnuActAttachMedClick┤   │     
                                   TfrmConsults.mnuActRemoveMedClick┘   │     
                                    TfrmConsults.mnuActEditResubmitClick┤     
                                     TfrmConsults.cmdEditResubmitClick┘ │     
                                      TfrmConsults.LstConsultsToPrint...┘     

Calls

Name Declaration Comments
BuildConsultsTree procedure BuildConsultsTree(Tree: TORTreeView; tmpList: TStrings; const Parent: string; Node: TORTreeNode; CurrentContext: TSelectContext); -
MakeConsultListDisplayText function MakeConsultListDisplayText(InputString: string): string; -
SetNodeImage procedure SetNodeImage(Node: TORTreeNode; CurrentContext: TSelectContext); -

Called-By

Name Declaration Comments
BuildConsultsTree procedure BuildConsultsTree(Tree: TORTreeView; tmpList: TStrings; const Parent: string; Node: TORTreeNode; CurrentContext: TSelectContext); -
TfrmConsults.UpdateConsultsTreeView procedure UpdateConsultsTreeView(DocList: TStringList; Tree: TORTreeView); -


Source

447   procedure BuildConsultsTree(Tree: TORTreeView; tmpList: TStrings; const Parent: string; Node: TORTreeNode;
448              CurrentContext: TSelectContext);
449   var
450     MyID, MyParent, Name, temp: string;
451     i: Integer;
452     ChildNode, tmpNode: TORTreeNode;
453     HasChildren: Boolean;
454   begin
455     Tree.Items.BeginUpdate;
456     with tmpList do for i := 0 to Count - 1 do
457       begin
458         MyParent := Piece(Strings[i], U, 8);
459         if (MyParent = Parent) then
460           begin
461             MyID := Piece(Strings[i], U, 1);
462             Name := MakeConsultListDisplayText(Strings[i]);
463             temp  := Strings[i];
464             tmpNode := nil;
465             HasChildren := Piece(Strings[i], U, 7) = '+';
466             if Node <> nil then if Node.HasChildren then
467               tmpNode := Tree.FindPieceNode(MyID, 1, U, Node);
468             if (tmpNode <> nil) and tmpNode.HasAsParent(Node) then
469               Continue
470             else
471               begin
472                 ChildNode := TORTreeNode(Tree.Items.AddChild(Node, Name));
473                 ChildNode.StringData := temp;
474                 SetNodeImage(ChildNode, CurrentContext);
475                 if HasChildren then
476                     BuildConsultsTree(Tree, tmpList, MyID, ChildNode, CurrentContext);
477               end;
478           end;
479       end;
480     Tree.Items.EndUpdate;
481   end;