Procedure

SetCaseTreeNodeImagesAndFormatting

Module

uCaseTree

Last Modified

7/15/2014 3:26:44 PM

Comments

IMG_SURG_BLANK             = 0;
    IMG_SURG_TOP_LEVEL         = 1;
    IMG_SURG_GROUP_SHUT        = 2;
    IMG_SURG_GROUP_OPEN        = 3;
    IMG_SURG_CASE_EMPTY        = 4;
    IMG_SURG_CASE_SHUT         = 5;
    IMG_SURG_CASE_OPEN         = 6;
    IMG_SURG_RPT_SINGLE        = 7;
    IMG_SURG_RPT_ADDM          = 8;
    IMG_SURG_ADDENDUM          = 9;
    IMG_SURG_NON_OR_CASE_EMPTY = 10;
    IMG_SURG_NON_OR_CASE_SHUT  = 11;
    IMG_SURG_NON_OR_CASE_OPEN  = 12;

Scope

Interfaced

Declaration

procedure SetCaseTreeNodeImagesAndFormatting(Node: TORTreeNode; CurrentContext: TSurgCaseContext);

Calls Hierarchy


SetCaseTreeNodeImagesAndFormatting
 └SetImageFlag

Called-By Hierarchy


                                            SetCaseTreeNodeImagesAndFormatting
                                                               BuildCaseTree┤ 
                                                                 ..(rec)..┤ │ 
                                                TfrmSurgery.UpdateTreeView┘ │ 
                                        TfrmSurgery.ProcessNotifications┤   │ 
                                               TfrmSurgery.DisplayPage┘ │   │ 
                                            TfrmSurgery.LoadSurgeryCases┘   │ 
                                              TfrmSurgery.mnuViewClick┤     │ 
                                          TfrmSurgery.SetViewContext┘ │     │ 
                                           TfrmSurgery.DisplayPage┤   │     │ 
                           TfrmSurgery.mnuViewReturntoDefaultClick┘   │     │ 
                                              TfrmSurgery.StartNewEdit┤     │ 
                                          TfrmSurgery.mnuActNewClick┤ │     │ 
                                       TfrmSurgery.cmdNewNoteClick┘ │ │     │ 
                                       TfrmSurgery.mnuActAddendClick┤ │     │ 
                                         TfrmSurgery.mnuActEditClick┘ │     │ 
                                         TfrmSurgery.mnuActDeleteClick┤     │ 
                                          TfrmSurgery.SaveEditedNote┘ │     │ 
                                       TfrmSurgery.SaveCurrentNote┘   │     │ 
                                  TfrmSurgery.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┘   │     │     │ 
                                   TfrmSurgery.SetViewContext...┤     │     │ 
                                        TfrmSurgery.RequestPrint┤     │     │ 
                                   TfrmFrame.mnuFilePrintClick┘ │     │     │ 
                                     TfrmSurgery.mnuViewClick...┤     │     │ 
                                     TfrmSurgery.StartNewEdit...┤     │     │ 
                                TfrmSurgery.mnuActDeleteClick...┤     │     │ 
                                     TfrmSurgery.mnuActSaveClick┤     │     │ 
                                     TfrmSurgery.mnuActSignClick┤     │     │ 
                                        TfrmSurgery.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┘               │     │     │ 
                                           TfrmSurgery.FormClose┤     │     │ 
                      TfrmSurgery.mnuActIdentifyAddlSignersClick┤     │     │ 
                          TfrmSurgery.popNoteMemoAddlSignClick┘ │     │     │ 
                             TfrmSurgery.ProcessNotifications...┘     │     │ 
                                           TfrmSurgery.mnuActSaveClick┤     │ 
                                           TfrmSurgery.mnuActSignClick┤     │ 
                                           TfrmSurgery.SaveSignItem...┤     │ 
                         TfrmSurgery.mnuActIdentifyAddlSignersClick...┘     │ 
                                                 TfrmSurgery.mnuActSignClick┘ 

Calls

Name Declaration Comments
SetImageFlag procedure SetImageFlag(ANode: TORTreeNode); -

Called-By

Name Declaration Comments
BuildCaseTree procedure BuildCaseTree(CaseList: TStrings; const Parent: string; Tree: TORTreeView; Node: TORTreeNode; CaseContext: TSurgCaseContext); -
TfrmSurgery.mnuActSignClick procedure mnuActSignClick(Sender: TObject); -


Source

202   procedure SetCaseTreeNodeImagesAndFormatting(Node: TORTreeNode; CurrentContext: TSurgCaseContext);
203   var
204     CaseNode: TORTreeNode;
205     i: integer;
206   (*  IMG_SURG_BLANK             = 0;
207       IMG_SURG_TOP_LEVEL         = 1;
208       IMG_SURG_GROUP_SHUT        = 2;
209       IMG_SURG_GROUP_OPEN        = 3;
210       IMG_SURG_CASE_EMPTY        = 4;
211       IMG_SURG_CASE_SHUT         = 5;
212       IMG_SURG_CASE_OPEN         = 6;
213       IMG_SURG_RPT_SINGLE        = 7;
214       IMG_SURG_RPT_ADDM          = 8;
215       IMG_SURG_ADDENDUM          = 9;
216       IMG_SURG_NON_OR_CASE_EMPTY = 10;
217       IMG_SURG_NON_OR_CASE_SHUT  = 11;
218       IMG_SURG_NON_OR_CASE_OPEN  = 12;
219   *)
220   begin
221     with Node, PCaseTreeObject(Node.Data)^ do
222       begin
223         i := Pos('*', DocTitle);
224         if i > 0 then i := i + 1 else i := 0;
225         if (Copy(DocTitle, i + 1, 8) = 'Addendum') then
226           ImageIndex := IMG_SURG_ADDENDUM
227         else if (DocHasChildren = '') then
228           begin
229             if PkgRef = '' then
230               begin
231                 if IsNonORProc then
232                   ImageIndex := IMG_SURG_NON_OR_CASE_EMPTY
233                 else
234                   ImageIndex := IMG_SURG_CASE_EMPTY;
235               end
236             else
237               ImageIndex := IMG_SURG_RPT_SINGLE;
238           end
239         else if DocParent = '0' then
240           begin
241             ImageIndex    := IMG_SURG_TOP_LEVEL;
242             SelectedIndex := IMG_SURG_TOP_LEVEL;
243             StateIndex := -1;
244             with CurrentContext, Node do
245               if GroupBy <> '' then
246                 case GroupBy[1] of
247                   'P': Text := SG_TV_TEXT + ' by Procedure';        
248                   'D': Text := SG_TV_TEXT + ' by Surgery Date';
249                   'S': Text := SG_TV_TEXT + ' by Surgeon';
250                   'T': Text := SG_TV_TEXT + ' by Type';
251                 end
252               else Text := SG_TV_TEXT;
253           end
254         else
255           case DocHasChildren[1] of
256             '+': if PkgRef <> '' then
257                    ImageIndex := IMG_SURG_RPT_ADDM
258                  else
259                    begin
260                      if IsNonORProc then
261                        ImageIndex := IMG_SURG_NON_OR_CASE_SHUT
262                      else
263                        ImageIndex := IMG_SURG_CASE_SHUT;
264                    end;
265             '%': begin
266                    StateIndex := -1;
267                    ImageIndex    := IMG_SURG_GROUP_SHUT;
268                    SelectedIndex := IMG_SURG_GROUP_OPEN;
269                  end;
270           end;
271         SelectedIndex := ImageIndex;
272         SetImageFlag(Node);
273         CaseNode := TORTreeView(Node.TreeView).FindPieceNode(CaseID, 1, U, nil);
274         if CaseNode <> nil then
275           begin
276             PCaseTreeObject(CaseNode.Data)^.ImageCount := PCaseTreeObject(CaseNode.Data)^.ImageCount + ImageCount;
277             SetImageFlag(CaseNode);
278           end;
279       end;
280   end;