Procedure

BuildReminderTree

Module

uReminders

Last Modified

10/8/2014 2:49:30 PM

Comments

StringData of the TORTreeNodes will be in the format:
  1          2          3             4                        5        6   7
  TYPE + IEN^PRINT NAME^DUE DATE/TIME^LAST OCCURENCE DATE/TIME^PRIORITY^DUE^DIALOG
         8                 9                            10
         Formated Due Date^Formated Last Occurence Date^InitialAbsoluteIdx

  where TYPE     C=Category, R=Reminder
        PRIORITY 1=High, 2=Normal, 3=Low
        DUE      0=Applicable, 1=Due, 2=Not Applicable
        DIALOG   1=Active Dialog Exists

Scope

Interfaced

Declaration

procedure BuildReminderTree(Tree: TORTreeView);

Calls Hierarchy


BuildReminderTree
 ├GetImageIndex
 ├RemContextPopup
 │ ├ReminderMenu
 │ │ ├SetReminderPopupDlgRoutine
 │ │ │ └ReminderTreePopupDlg
 │ │ │   └ReminderMenuBuilder
 │ │ │     ├Add
 │ │ │     │ ├ReminderClinMaintClicked
 │ │ │     │ │ ├ReportBox
 │ │ │     │ │ │ └CreateReportBox
 │ │ │     │ │ │   └TfrmBase508Form.Create
 │ │ │     │ │ │     ├TfrmBase508Form.UpdateAccessibilityActions
 │ │ │     │ │ │     ├UnfocusableControlEnter
 │ │ │     │ │ │     └AdjustControls
 │ │ │     │ │ │       ├TfrmBase508Form.ModifyUnfocusableControl
 │ │ │     │ │ │       └..(rec)..
 │ │ │     │ │ ├DetailReminder
 │ │ │     │ │ │ └InteractiveRemindersActive
 │ │ │     │ │ │   └GetRemindersActive
 │ │ │     │ │ └ReminderName
 │ │ │     │ │   └TReminderDialog.GetPrintName
 │ │ │     │ ├ReminderEduClicked
 │ │ │     │ │ ├ReportBox...
 │ │ │     │ │ └EducationTopicDetail
 │ │ │     │ ├ReminderInqClicked
 │ │ │     │ │ ├ReportBox...
 │ │ │     │ │ ├ReminderInquiry
 │ │ │     │ │ └ReminderName...
 │ │ │     │ ├ReminderWebClicked
 │ │ │     │ │ ├GotoWebPage
 │ │ │     │ │ └GetWebPageAddress
 │ │ │     │ ├ReminderEvalClicked
 │ │ │     │ │ └EvalReminder
 │ │ │     │ │   ├EvaluateReminder
 │ │ │     │ │   │ └EvaluateReminders
 │ │ │     │ │   ├ReminderEvaluated
 │ │ │     │ │   └ReminderName...
 │ │ │     │ ├ReminderViewFolderClicked
 │ │ │     │ │ ├GetRemFolders
 │ │ │     │ │ │ └GetReminderFolders
 │ │ │     │ │ └SetRemFolders
 │ │ │     │ │   ├BeginReminderUpdate
 │ │ │     │ │   ├SetReminderFolders
 │ │ │     │ │   └EndReminderUpdate
 │ │ │     │ ├GetRemFolders...
 │ │ │     │ └ReminderIconLegendClicked
 │ │ │     │   └ShowIconLegend
 │ │ │     │     ├TfrmBase508Form.Create...
 │ │ │     │     ├TfrmFrame.TabExists
 │ │ │     │     ├TfrmIconLegend.ShowTab
 │ │ │     │     └TfrmIconLegend.SetFontSize
 │ │ │     │       └TfrmIconLegend.SnapLabels
 │ │ │     ├GetEducationTopics
 │ │ │     │ ├GetEducationTopicsForReminder
 │ │ │     │ └GetEducationSubtopics
 │ │ │     ├AddEducationTopics
 │ │ │     │ ├GetEducationTopics...
 │ │ │     │ ├Add...
 │ │ │     │ └..(rec)..
 │ │ │     ├GetWebPages
 │ │ │     │ └GetReminderWebPages
 │ │ │     └AddWebPages
 │ │ │       ├Add...
 │ │ │       └GetWebPageName
 │ │ └SetReminderPopupRoutine
 │ │   └ReminderTreePopup
 │ │     └ReminderMenuBuilder...
 │ └EvaluateCategoryClicked
 │   ├BeginReminderUpdate
 │   ├CheckReminders
 │   │ ├EvaluateReminders
 │   │ └ReminderEvaluated
 │   └EndReminderUpdate
 ├GetRemFolders...
 ├Add2Tree
 │ └GetRemFolders...
 ├TReminderDialog.GetIEN
 ├TReminderDialog.GetPrintName
 ├TReminder.GetDueDateStr
 ├TReminder.GetLastDateStr
 ├TReminder.GetStatus
 └TReminderDialog.Processing
   └CheckItem
     ├ChildrenChecked
     │ └CheckItem...
     └TRemDlgElement.Add2PN
       ├TRemDlgElement.ElemType
       └TRemDlgElement.AddData
         ├TRemDlgElement.Historical
         ├TPCEData.VisitDateTime
         │ └TPCEData.IsSecondaryVisit
         ├TRemData.AddData
         │ ├Add
         │ │ ├Code2DataType
         │ │ ├TRemDlgElement.Historical
         │ │ ├TRemPrompt.GetValue
         │ │ │ ├TRemDlgElement.Historical
         │ │ │ ├TPCEData.VisitDateTime...
         │ │ │ ├TRemPrompt.RemDataActive
         │ │ │ │ └TRemPrompt.CompareActiveDate
         │ │ │ └TRemPrompt.RemDataChoiceActive
         │ │ ├TPCEData.VisitDateTime...
         │ │ ├ValidateGAFDate
         │ │ │ ├TPatient.GetDateDied
         │ │ │ │ └DateOfDeath
         │ │ │ └FMToday
         │ │ │   └FMNow
         │ │ ├TPCEProviderList.PCEProvider
         │ │ │ ├Check
         │ │ │ │ └TPCEProviderList.IndexOfProvider
         │ │ │ └TPCEProviderList.PrimaryIEN
         │ │ │   └TPCEProviderList.GetPrimaryIdx
         │ │ ├AddPrompt
         │ │ │ ├TRemPrompt.PromptType
         │ │ │ │ └Code2PromptType
         │ │ │ ├TPCEProviderList.PCEProvider...
         │ │ │ ├TPCEData.VisitDateTime...
         │ │ │ ├TRemPrompt.VitalValue
         │ │ │ │ └TRemPrompt.GetValue...
         │ │ │ ├TRemPrompt.VitalType
         │ │ │ │ ├Code2VitalType
         │ │ │ │ └TRemData.InternalValue
         │ │ │ ├TRemPrompt.VitalUnitValue
         │ │ │ │ ├TRemPrompt.VitalType...
         │ │ │ │ └TRemPrompt.GetValue...
         │ │ │ ├ConvertVital
         │ │ │ ├FormatVitalForNote
         │ │ │ │ └ConvertVitalData
         │ │ │ ├TRemPrompt.GetValue...
         │ │ │ └TRemDlgElement.Historical
         │ │ └GetPCEDataText
         │ │   └GetDiagnosisText
         │ ├TRemDlgElement.Historical
         │ └TPCEData.VisitDateTime...
         ├TRemDlgElement.ElemType
         └..(rec)..

Called-By Hierarchy


                                                                       BuildReminderTree
                                                          TfrmDrawers.RemindersChanged┤ 
                                                             TfrmDrawers.ShowDrawers┘ │ 
                                                         TfrmDrawers.CreateDrawers┤   │ 
                                                           TfrmDCSumm.FormCreate┤ │   │ 
                                                         TfrmConsults.FormCreate┤ │   │ 
                                                          TfrmSurgery.FormCreate┤ │   │ 
                                                            TfrmNotes.FormCreate┘ │   │ 
                                                        TfrmDrawers.DisplayDrawers┘   │ 
                                                         TfrmConsults.DisplayPCE┤     │ 
                                                 TfrmConsults.lstConsultsClick┤ │     │ 
                                               TfrmConsults.tvConsultsChange┘ │ │     │ 
                                TfrmConsults.mnuActDetachFromIDParentClick┤   │ │     │ 
                                                  TfrmConsults.NotifyOrder┤   │ │     │ 
                                                    TfrmFrame.UMNewOrder┘ │   │ │     │ 
                                    TfrmConsults.mnuActDisplayDetailsClick┤   │ │     │ 
                               TfrmConsults.mnuActIdentifyAddlSignersClick┤   │ │     │ 
                                   TfrmConsults.popNoteMemoAddlSignClick┘ │   │ │     │ 
                                         TfrmConsults.ProcessNotifications┤   │ │     │ 
                                                TfrmConsults.DisplayPage┘ │   │ │     │ 
                                                 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.mnuActDisplaySF513Click┤     │ │ │   │ │     │ 
                              TfrmConsults.mnuActPrintSF513Click┤     │ │ │   │ │     │ 
                          TfrmConsults.mnuActDisplayDetailsClick┤     │ │ │   │ │     │ 
                                          TfrmConsults.FormClose┤     │ │ │   │ │     │ 
                  TfrmConsults.mnuActIdentifyAddlSignersClick...┤     │ │ │   │ │     │ 
                            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...┤ │ │   │ │     │ 
                                               TfrmConsults.UMNewOrder┤ │ │   │ │     │ 
                                        TfrmConsults.ProcessMedResults┘ │ │   │ │     │ 
                                   TfrmConsults.mnuActAttachMedClick┤   │ │   │ │     │ 
                                   TfrmConsults.mnuActRemoveMedClick┘   │ │   │ │     │ 
                                    TfrmConsults.mnuActEditResubmitClick┤ │   │ │     │ 
                                     TfrmConsults.cmdEditResubmitClick┘ │ │   │ │     │ 
                                      TfrmConsults.LstConsultsToPrint...┘ │   │ │     │ 
                                              TfrmConsults.tvConsultsClick┤   │ │     │ 
                                            TfrmConsults.mnuViewClick...┤ │   │ │     │ 
                              TfrmConsults.mnuActDetachFromIDParentClick┤ │   │ │     │ 
                                   TfrmConsults.mnuActNoteDeleteClick...┤ │   │ │     │ 
                                   TfrmConsults.mnuActSignatureSaveClick┤ │   │ │     │ 
                                   TfrmConsults.mnuActSignatureSignClick┤ │   │ │     │ 
                                            TfrmConsults.SaveSignItem...┤ │   │ │     │ 
                                         TfrmConsults.mnuActConsultClick┤ │   │ │     │ 
                                 TfrmConsults.mnuActEditResubmitClick...┤ │   │ │     │ 
                                            TfrmConsults.StartNewEdit...┤ │   │ │     │ 
                                       TfrmConsults.ProcessMedResults...┤ │   │ │     │ 
                                TfrmConsults.mnuActAttachtoIDParentClick┘ │   │ │     │ 
                                              TfrmConsults.DoAttachIDChild┤   │ │     │ 
                                        TfrmConsults.tvCsltNotesDragDrop┤ │   │ │     │ 
                                TfrmConsults.mnuActAttachtoIDParentClick┘ │   │ │     │ 
                                              TfrmConsults.tvConsultsKeyUp┘   │ │     │ 
                                                      TfrmConsults.cmdPCEClick┤ │     │ 
                                                    TfrmConsults.lstNotesClick┤ │     │ 
                                                TfrmConsults.CompleteConsult┤ │ │     │ 
                                          TfrmConsults.mnuActCompleteClick┤ │ │ │     │ 
                                        TfrmConsults.mnuActAddIDEntryClick┘ │ │ │     │ 
                                                 TfrmConsults.InsertAddendum┤ │ │     │ 
                                      TfrmConsults.mnuActMakeAddendumClick┘ │ │ │     │ 
                                                    TfrmConsults.LoadForEdit┤ │ │     │ 
                                       TfrmConsults.mnuActNoteEditClick...┘ │ │ │     │ 
                                                                 SaveOrAbort┤ │ │     │ 
                                         TfrmConsults.SaveEditedConsult...┘ │ │ │     │ 
                                           TfrmConsults.SaveEditedConsult...┤ │ │     │ 
                                       TfrmConsults.mnuActSignatureSignClick┤ │ │     │ 
                                                TfrmConsults.SaveSignItem...┤ │ │     │ 
                              TfrmConsults.mnuActIdentifyAddlSignersClick...┤ │ │     │ 
                                              TfrmConsults.tvCsltNotesChange┘ │ │     │ 
                                         TfrmConsults.SaveEditedConsult...┤   │ │     │ 
                                     TfrmConsults.mnuActSignatureSignClick┤   │ │     │ 
                                      TfrmConsults.ProcessNotifications...┘   │ │     │ 
                                                    TfrmConsults.AssignRemForm┘ │     │ 
                                                          ViewRemDlgFromForm┘   │     │ 
                                                                ViewRemDlg┤     │     │ 
                                                      ViewReminderDialog┤ │     │     │ 
                                        TfrmDrawers.tvRemindersMouseUp┤ │ │     │     │ 
                                     TfrmDrawers.RemindersChanged...┘ │ │ │     │     │ 
                                        TfrmDrawers.tvRemindersKeyDown┘ │ │     │     │ 
                                              ViewReminderDialogTemplate┘ │     │     │ 
                                                ViewRemDlgTemplateFromForm┘     │     │ 
                                         TTemplate.ExecuteReminderDialog┘       │     │ 
                                          ExecuteTemplateOrBoilerPlate┤         │     │ 
                                                TfrmDrawers.InsertText┘         │     │ 
                                     TfrmDrawers.tvTemplatesDblClick┤           │     │ 
                                      TfrmDrawers.tvTemplatesKeyDown┤           │     │ 
                                          TfrmDrawers.NewRECDragDrop┤           │     │ 
                                    TfrmDrawers.SetRichEditControl┘ │           │     │ 
                                           TfrmDCSumm.FormCreate┤   │           │     │ 
                                         TfrmConsults.FormCreate┤   │           │     │ 
                                          TfrmSurgery.FormCreate┤   │           │     │ 
                                            TfrmNotes.FormCreate┘   │           │     │ 
                                  TfrmDrawers.mnuInsertTemplateClick┘           │     │ 
                            TfrmDCSumm.popSummMemoInsTemplateClick┤             │     │ 
                          TfrmConsults.popNoteMemoInsTemplateClick┤             │     │ 
                           TfrmSurgery.popNoteMemoInsTemplateClick┤             │     │ 
                             TfrmNotes.popNoteMemoInsTemplateClick┘             │     │ 
                                                          TfrmSurgery.DisplayPCE┤     │ 
                                                       TfrmSurgery.cmdPCEClick┤ │     │ 
                                                   TfrmSurgery.tvSurgeryChange┤ │     │ 
                                                  TfrmSurgery.SaveEditedNote┤ │ │     │ 
                                               TfrmSurgery.SaveCurrentNote┘ │ │ │     │ 
                                          TfrmSurgery.AllowContextChange┤   │ │ │     │ 
                                    TfrmFrame.AllowContextChangeAll...┘ │   │ │ │     │ 
                                              TfrmSurgery.SetViewContext┤   │ │ │     │ 
                                               TfrmSurgery.DisplayPage┤ │   │ │ │     │ 
                               TfrmSurgery.mnuViewReturntoDefaultClick┘ │   │ │ │     │ 
                                                TfrmSurgery.RequestPrint┤   │ │ │     │ 
                                           TfrmFrame.mnuFilePrintClick┘ │   │ │ │     │ 
                                                TfrmSurgery.mnuViewClick┤   │ │ │     │ 
                                         TfrmSurgery.SetViewContext...┘ │   │ │ │     │ 
                                                TfrmSurgery.StartNewEdit┤   │ │ │     │ 
                                            TfrmSurgery.mnuActNewClick┤ │   │ │ │     │ 
                                         TfrmSurgery.cmdNewNoteClick┘ │ │   │ │ │     │ 
                                         TfrmSurgery.mnuActAddendClick┤ │   │ │ │     │ 
                                           TfrmSurgery.mnuActEditClick┘ │   │ │ │     │ 
                                           TfrmSurgery.mnuActDeleteClick┤   │ │ │     │ 
                                         TfrmSurgery.SaveEditedNote...┘ │   │ │ │     │ 
                                             TfrmSurgery.mnuActSaveClick┤   │ │ │     │ 
                                             TfrmSurgery.mnuActSignClick┤   │ │ │     │ 
                                                TfrmSurgery.SaveSignItem┤   │ │ │     │ 
                                              TfrmReview.cmdOKClick...┘ │   │ │ │     │ 
                                                   TfrmSurgery.FormClose┤   │ │ │     │ 
                              TfrmSurgery.mnuActIdentifyAddlSignersClick┤   │ │ │     │ 
                                  TfrmSurgery.popNoteMemoAddlSignClick┘ │   │ │ │     │ 
                                        TfrmSurgery.ProcessNotifications┘   │ │ │     │ 
                                               TfrmSurgery.DisplayPage┘     │ │ │     │ 
                                                 TfrmSurgery.mnuActSignClick┤ │ │     │ 
                                              TfrmSurgery.mnuViewDetailClick┤ │ │     │ 
                                         TfrmSurgery.ProcessNotifications...┤ │ │     │ 
                                                TfrmSurgery.LoadSurgeryCases┘ │ │     │ 
                                               TfrmSurgery.mnuViewClick...┤   │ │     │ 
                                               TfrmSurgery.StartNewEdit...┤   │ │     │ 
                                          TfrmSurgery.mnuActDeleteClick...┤   │ │     │ 
                                               TfrmSurgery.mnuActSaveClick┤   │ │     │ 
                                               TfrmSurgery.mnuActSignClick┤   │ │     │ 
                                               TfrmSurgery.SaveSignItem...┤   │ │     │ 
                             TfrmSurgery.mnuActIdentifyAddlSignersClick...┘   │ │     │ 
                                                     TfrmSurgery.lstNotesClick┘ │     │ 
                                                   TfrmSurgery.InsertNewNote┤   │     │ 
                                             TfrmSurgery.mnuActNewClick...┘ │   │     │ 
                                                  TfrmSurgery.InsertAddendum┤   │     │ 
                                             TfrmSurgery.mnuActAddendClick┘ │   │     │ 
                                                     TfrmSurgery.LoadForEdit┤   │     │ 
                                               TfrmSurgery.mnuActEditClick┘ │   │     │ 
                                               TfrmSurgery.SaveEditedNote...┤   │     │ 
                                                 TfrmSurgery.mnuActSignClick┤   │     │ 
                                                 TfrmSurgery.SaveSignItem...┤   │     │ 
                               TfrmSurgery.mnuActIdentifyAddlSignersClick...┤   │     │ 
                                              TfrmSurgery.tvSurgeryChange...┘   │     │ 
                                                            TfrmNotes.DisplayPCE┘     │ 
                                                       TfrmNotes.lstNotesClick┤       │ 
                                                     TfrmNotes.InsertNewNote┤ │       │ 
                                                  TfrmNotes.mnuActNewClick┤ │ │       │ 
                                               TfrmNotes.cmdNewNoteClick┘ │ │ │       │ 
                                           TfrmNotes.mnuActAddIDEntryClick┘ │ │       │ 
                                                    TfrmNotes.InsertAddendum┤ │       │ 
                                               TfrmNotes.mnuActAddendClick┘ │ │       │ 
                                                       TfrmNotes.LoadForEdit┤ │       │ 
                                                 TfrmNotes.mnuActEditClick┘ │ │       │ 
                                                    TfrmNotes.SaveEditedNote┤ │       │ 
                                                 TfrmNotes.SaveCurrentNote┘ │ │       │ 
                                            TfrmNotes.AllowContextChange┤   │ │       │ 
                                    TfrmFrame.AllowContextChangeAll...┘ │   │ │       │ 
                                               TfrmNotes.LstNotesToPrint┤   │ │       │ 
                              TfrmFrame.mnuFilePrintSelectedItemsClick┘ │   │ │       │ 
                                                  TfrmNotes.RequestPrint┤   │ │       │ 
                                           TfrmFrame.mnuFilePrintClick┘ │   │ │       │ 
                                                  TfrmNotes.mnuViewClick┤   │ │       │ 
                                              TfrmNotes.SetViewContext┤ │   │ │       │ 
                                               TfrmNotes.DisplayPage┤ │ │   │ │       │ 
                               TfrmNotes.mnuViewReturntoDefaultClick┘ │ │   │ │       │ 
                                   TfrmNotes.mnuViewSaveAsDefaultClick┘ │   │ │       │ 
                                                  TfrmNotes.StartNewEdit┤   │ │       │ 
                                           TfrmNotes.mnuActNewClick...┤ │   │ │       │ 
                                       TfrmNotes.mnuActAddIDEntryClick┤ │   │ │       │ 
                                           TfrmNotes.mnuActAddendClick┤ │   │ │       │ 
                                             TfrmNotes.mnuActEditClick┘ │   │ │       │ 
                                 TfrmNotes.mnuActDetachFromIDParentClick┤   │ │       │ 
                                             TfrmNotes.mnuActDeleteClick┤   │ │       │ 
                                           TfrmNotes.SaveEditedNote...┘ │   │ │       │ 
                                               TfrmNotes.mnuActSaveClick┤   │ │       │ 
                                               TfrmNotes.mnuActSignClick┤   │ │       │ 
                                                  TfrmNotes.SaveSignItem┤   │ │       │ 
                                              TfrmReview.cmdOKClick...┘ │   │ │       │ 
                                                     TfrmNotes.FormClose┤   │ │       │ 
                                TfrmNotes.mnuActIdentifyAddlSignersClick┤   │ │       │ 
                                    TfrmNotes.popNoteMemoAddlSignClick┘ │   │ │       │ 
                                          TfrmNotes.ProcessNotifications┤   │ │       │ 
                                                 TfrmNotes.DisplayPage┘ │   │ │       │ 
                                             TfrmNotes.SetViewContext...┤   │ │       │ 
                                               TfrmNotes.tvNotesDragDrop┤   │ │       │ 
                                   TfrmNotes.mnuActAttachtoIDParentClick┘   │ │       │ 
                                                   TfrmNotes.mnuActSignClick┤ │       │ 
                                                   TfrmNotes.SaveSignItem...┤ │       │ 
                                                TfrmNotes.mnuViewDetailClick┤ │       │ 
                                 TfrmNotes.mnuActIdentifyAddlSignersClick...┤ │       │ 
                                                     TfrmNotes.tvNotesChange┤ │       │ 
                                               TfrmNotes.SaveEditedNote...┤ │ │       │ 
                                                 TfrmNotes.mnuActSignClick┤ │ │       │ 
                                         TfrmNotes.ProcessNotifications...┤ │ │       │ 
                                                       TfrmNotes.LoadNotes┘ │ │       │ 
                                            TfrmNotes.LstNotesToPrint...┤   │ │       │ 
                                               TfrmNotes.mnuViewClick...┤   │ │       │ 
                                               TfrmNotes.StartNewEdit...┤   │ │       │ 
                                 TfrmNotes.mnuActDetachFromIDParentClick┤   │ │       │ 
                                          TfrmNotes.mnuActDeleteClick...┤   │ │       │ 
                                               TfrmNotes.mnuActSaveClick┤   │ │       │ 
                                               TfrmNotes.mnuActSignClick┤   │ │       │ 
                                               TfrmNotes.SaveSignItem...┤   │ │       │ 
                             TfrmNotes.mnuActIdentifyAddlSignersClick...┤   │ │       │ 
                                   TfrmNotes.mnuActAttachtoIDParentClick┤   │ │       │ 
                                               TfrmNotes.DoAttachIDChild┘   │ │       │ 
                                             TfrmNotes.tvNotesDragDrop┤     │ │       │ 
                                 TfrmNotes.mnuActAttachtoIDParentClick┘     │ │       │ 
                                                 TfrmNotes.lvNotesSelectItem┘ │       │ 
                                                TfrmNotes.tvNotesChange...┘   │       │ 
                                                        UpdateEncounterInfo...┤       │ 
                                                       TfrmNotes.AssignRemForm┘       │ 
                                                       ViewRemDlgFromForm...┘         │ 
                                                     TfrmReminderTree.RemindersChanged┘ 
                                                         TfrmReminderTree.FormCreate┤   
                                                        TfrmReminderTree.FormDestroy┘   

Calls

Name Declaration Comments
Add2Tree function Add2Tree(Folder: TRemFolder; CatID: string; Node: TORTreeNode = nil): TORTreeNode; -
TReminder.GetDueDateStr function GetDueDateStr: string; -
TReminderDialog.GetIEN function GetIEN: string; virtual; -
GetImageIndex procedure GetImageIndex(AData: Pointer; Sender: TObject; Node: TTreeNode); -
TReminder.GetLastDateStr function GetLastDateStr: string; -
TReminderDialog.GetPrintName function GetPrintName: string; virtual; -
GetRemFolders function GetRemFolders: TRemFolders; -
TReminder.GetStatus function GetStatus: string; -
TReminderDialog.Processing function Processing: boolean; -
RemContextPopup procedure RemContextPopup(AData: Pointer; Sender: TObject; MousePos: TPoint; var Handled: Boolean); -

Called-By

Name Declaration Comments
TfrmDrawers.RemindersChanged procedure RemindersChanged(Sender: TObject); -
TfrmReminderTree.RemindersChanged procedure RemindersChanged(Sender: TObject); -


Source

1728  procedure BuildReminderTree(Tree: TORTreeView);
1729  var
1730    ExpandedStr: string;
1731    TopID1, TopID2: string;
1732    SelID1, SelID2: string;
1733    i, j: integer;
1734    NeedLost: boolean;
1735    Tmp, Data, LostCat, Code: string;
1736    Node: TORTreeNode;
1737    M: TMethod;
1738    Rem: TReminder;
1739    OpenDue, Found: boolean;
1740  
1741    function Add2Tree(Folder: TRemFolder; CatID: string; Node: TORTreeNode = nil): TORTreeNode;
1742    begin
1743      if (Folder = rfUnknown) or (Folder in GetRemFolders) then
1744      begin
1745        if(CatID = LostCatID) then
1746        begin
1747          if(NeedLost) then
1748          begin
1749            (Tree.Items.AddFirst(nil,'') as TORTreeNode).StringData := LostCatString;
1750            NeedLost := FALSE;
1751          end;
1752        end;
1753  
1754        if(not assigned(Node)) then
1755          Node := Tree.FindPieceNode(CatID, 1);
1756        if(assigned(Node)) then
1757        begin
1758          Result := (Tree.Items.AddChild(Node,'') as TORTreeNode);
1759          Result.StringData := Data;
1760        end
1761        else
1762          Result := nil;
1763      end
1764      else
1765        Result := nil;
1766    end;
1767  
1768  begin
1769    if(not assigned(Tree)) then exit;
1770    Tree.Items.BeginUpdate;
1771    try
1772      Tree.NodeDelim := U;
1773      Tree.NodePiece := 2;
1774      M.Code := @GetImageIndex;
1775      M.Data := nil;
1776      Tree.OnGetImageIndex := TTVExpandedEvent(M);
1777      Tree.OnGetSelectedIndex := TTVExpandedEvent(M);
1778      M.Code := @RemContextPopup;
1779      Tree.OnContextPopup := TContextPopupEvent(M);
1780  
1781      if(assigned(Tree.TopItem)) then
1782      begin
1783        TopID1 := Tree.GetNodeID(TORTreeNode(Tree.TopItem), 1, IncludeParentID);
1784        TopID2 := Tree.GetNodeID(TORTreeNode(Tree.TopItem), 1);
1785      end
1786      else
1787        TopID1 := U;
1788  
1789      if(assigned(Tree.Selected)) then
1790      begin
1791        SelID1 := Tree.GetNodeID(TORTreeNode(Tree.Selected), 1, IncludeParentID);
1792        SelID2 := Tree.GetNodeID(TORTreeNode(Tree.Selected), 1);
1793      end
1794      else
1795        SelID1 := U;
1796  
1797      ExpandedStr := Tree.GetExpandedIDStr(1, IncludeParentID);
1798      OpenDue := (ExpandedStr = '');
1799  
1800      Tree.Items.Clear;
1801      NeedLost := TRUE;
1802  
1803      if(rfDue in GetRemFolders) then
1804        (Tree.Items.Add(nil,'') as TORTreeNode).StringData := DueCatString;
1805      if(rfApplicable in GetRemFolders) then
1806        (Tree.Items.Add(nil,'') as TORTreeNode).StringData := ApplCatString;
1807      if(rfNotApplicable in GetRemFolders) then
1808        (Tree.Items.Add(nil,'') as TORTreeNode).StringData := NotApplCatString;
1809      if(rfEvaluated in GetRemFolders) then
1810        (Tree.Items.Add(nil,'') as TORTreeNode).StringData := EvaluatedCatString;
1811      if(rfOther in GetRemFolders) then
1812        (Tree.Items.Add(nil,'') as TORTreeNode).StringData := OtherCatString;
1813  
1814      for i := 0 to EvaluatedReminders.Count-1 do
1815      begin
1816        Data := RemCode + EvaluatedReminders[i];
1817        Tmp := Piece(Data,U,6);
1818        //     if(Tmp = '1') then Add2Tree(rfDue, DueCatID)
1819        if(Tmp = '1') or (Tmp = '3') or (Tmp = '4') then Add2Tree(rfDue, DueCatID) //AGP Error code change 26.8
1820        else if(Tmp = '0') then Add2Tree(rfApplicable, ApplCatID)
1821        else                    Add2Tree(rfNotApplicable, NotApplCatID);
1822        Add2Tree(rfEvaluated, EvaluatedCatID);
1823      end;
1824  
1825      if(rfOther in GetRemFolders) and (OtherReminders.Count > 0) then
1826      begin
1827        for i := 0 to OtherReminders.Count-1 do
1828        begin
1829          Tmp := OtherReminders[i];
1830          if(Piece(Tmp, U, 2) = CatCode) then
1831            Data := CatCode + Piece(Tmp, U, 1)
1832          else
1833          begin
1834            Code := Piece(Tmp, U, 5);
1835            Data := RemCode + Code;
1836            Node := Tree.FindPieceNode(Data, 1);
1837            if(assigned(Node)) then
1838              Data := Node.StringData
1839            else
1840            begin
1841              j := EvaluatedReminders.IndexOfPiece(Code);
1842              if(j >= 0) then
1843                SetPiece(Data, U, 6, Piece(EvaluatedReminders[j], U, 6));
1844            end;
1845          end;
1846          SetPiece(Data, U, 2, Piece(Tmp, U ,3));
1847          SetPiece(Data, U, 7, Piece(Tmp, U, 6));
1848          Tmp := CatCode + Piece(Tmp, U, 4);
1849          Add2Tree(rfOther, OtherCatID, Tree.FindPieceNode(Tmp, 1));
1850        end;
1851      end;
1852  
1853    { The Lost category is for reminders being processed that are no longer in the
1854      reminder tree view.  This can happen with reminders that were Due or Applicable,
1855      but due to user action are no longer applicable, or due to location changes.
1856      The Lost category will not be used if a lost reminder is in the other list. }
1857  
1858      if(RemindersInProcess.Count > 0) then
1859      begin
1860        for i := 0 to RemindersInProcess.Count-1 do
1861        begin
1862          Rem := TReminder(RemindersInProcess.Objects[i]);
1863          Tmp := RemCode + Rem.IEN;
1864          Found := FALSE;
1865          Node := nil;
1866          repeat
1867            Node := Tree.FindPieceNode(Tmp, 1, #0, Node); // look in the tree first
1868            if((not Found) and (not assigned(Node))) then
1869            begin
1870              Data := Tmp + U + Rem.PrintName + U + Rem.DueDateStr + U + Rem.LastDateStr + U +
1871                      IntToStr(Rem.Priority) + U + Rem.Status;
1872                   if(Rem.Status = '1') then LostCat := DueCatID
1873              else if(Rem.Status = '0') then LostCat := ApplCatID
1874              else                           LostCat := LostCatID;
1875              Node := Add2Tree(rfUnknown, LostCat);
1876            end;
1877            if(assigned(Node)) then
1878            begin
1879              Node.Bold := Rem.Processing;
1880              Found := TRUE;
1881            end;
1882          until(Found and (not assigned(Node)));
1883        end;
1884      end;
1885  
1886      for i := 0 to Tree.Items.Count-1 do
1887      begin
1888        Node := TORTreeNode(Tree.Items[i]);
1889        for j := 3 to 4 do
1890        begin
1891          Tmp := Piece(Node.StringData, U, j);
1892          if(Tmp = '') then
1893            Data := ''
1894          else
1895            Data := FormatFMDateTimeStr(ReminderDateFormat, Tmp);
1896          Node.SetPiece(j + (RemTreeDateIdx - 3), Data);
1897        end;
1898        Node.SetPiece(RemTreeDateIdx + 2, IntToStr(Node.AbsoluteIndex));
1899        Tmp := Piece(Node.StringData, U, 5);
1900        if(Tmp <> '1') and (Tmp <> '3') then
1901          Node.SetPiece(5, '2');
1902      end;
1903  
1904    finally
1905      Tree.Items.EndUpdate;
1906    end;
1907  
1908    if(SelID1 = U) then
1909      Node := nil
1910    else
1911    begin
1912      Node := Tree.FindPieceNode(SelID1, 1, IncludeParentID);
1913      if(not assigned(Node)) then
1914        Node := Tree.FindPieceNode(SelID2, 1);
1915      if(assigned(Node)) then
1916        Node.EnsureVisible;
1917    end;
1918    Tree.Selected := Node;
1919  
1920    Tree.SetExpandedIDStr(1, IncludeParentID, ExpandedStr);
1921    if(OpenDue) then
1922    begin
1923      Node := Tree.FindPieceNode(DueCatID, 1);
1924      if(assigned(Node)) then
1925        Node.Expand(FALSE);
1926    end;
1927  
1928    if(TopID1 = U) then
1929      Tree.TopItem := Tree.Items.GetFirstNode
1930    else
1931    begin
1932      Tree.TopItem := Tree.FindPieceNode(TopID1, 1, IncludeParentID);
1933      if(not assigned(Tree.TopItem)) then
1934        Tree.TopItem := Tree.FindPieceNode(TopID2, 1);
1935    end;
1936  end;