Module

uHelpManager

Path

C:\CPRS\CPRS30\uHelpManager.pas

Last Modified

7/15/2014 3:26:44 PM

Initialization Code

initialization

Finalization Code

finalization
  if assigned(HelpManager) then
    HelpManager.Free;

end.

Classes

Name Comments
THelpManager -

Functions

Name Owner Declaration Scope Comments
ExecHelp THelpManager function ExecHelp(Command: Word; Data: Integer; var CallHelp: Boolean): Boolean; Public
===========================================
  Substitued for Application.OnHelp event  
  ---------------------------------------  
  Command  : Type of help command          
  Data     : Context                       
  CallHelp : Call Win help system          
  Returns true if help called              
===========================================
GetInstance THelpManager class function GetInstance: THelpManager; Public -

Global Variables

Name Type Declaration Comments
HelpManager THelpManager HelpManager: THelpManager; -

Constants

Name Declaration Scope Comments
CONTEXT_FILES array[THelpContexts] of string = ('cprs.htm', Global
Context html files for contexts

 hcNone
CONTEXT_VALUES array[THelpContexts] of integer = ( 0, Global
Context ids for contexts

 hcNone
hcConnect THelpContexts Global -
hcConsults THelpContexts Global -
hcCover THelpContexts Global -
hcDischargeSumm THelpContexts Global -
hcLabs THelpContexts Global -
hcLogin THelpContexts Global -
hcMeds THelpContexts Global -
hcNone THelpContexts Global List of contexts currently in use
hcNotes THelpContexts Global -
hcOptCancel THelpContexts Global -
hcOptClose THelpContexts Global -
hcOptComb THelpContexts Global -
hcOptCombAdd THelpContexts Global -
hcOptCombAddBy THelpContexts Global -
hcOptCombAddByType THelpContexts Global -
hcOptCombination THelpContexts Global -
hcOptCombRemove THelpContexts Global -
hcOptCombView THelpContexts Global -
hcOptCover THelpContexts Global -
hcOptCoverDay THelpContexts Global -
hcOptCoverRemind THelpContexts Global -
hcOptDay THelpContexts Global -
hcOptDayLabDef THelpContexts Global -
hcOptDayLabInp THelpContexts Global -
hcOptDayLabOutp THelpContexts Global -
hcOptDayVisitDef THelpContexts Global -
hcOptDown THelpContexts Global -
hcOptions THelpContexts Global -
hcOptionsApply THelpContexts Global -
hcOptionsCancel THelpContexts Global -
hcOptionsOK THelpContexts Global -
hcOptList THelpContexts Global -
hcOptListAdd THelpContexts Global -
hcOptListAddAll THelpContexts Global -
hcOptListAddBy THelpContexts Global -
hcOptListAddByType THelpContexts Global -
hcOptListDelete THelpContexts Global -
hcOptListNew THelpContexts Global -
hcOptListPat THelpContexts Global -
hcOptListPersList THelpContexts Global -
hcOptListPersPat THelpContexts Global -
hcOptListPersPatR THelpContexts Global -
hcOptListPersPatRA THelpContexts Global -
hcOptListSave THelpContexts Global -
hcOptListTeam THelpContexts Global -
hcOptNewList THelpContexts Global -
hcOptNewListText THelpContexts Global -
hcOptNotes THelpContexts Global -
hcOptNotesAskSubj THelpContexts Global -
hcOptNotesBtn THelpContexts Global -
hcOptNotesCosigner THelpContexts Global -
hcOptNotesSave THelpContexts Global -
hcOptNotesTab THelpContexts Global -
hcOptNotesTitle THelpContexts Global -
hcOptNotesVerify THelpContexts Global -
hcOptNotif THelpContexts Global -
hcOptNotifFlag THelpContexts Global -
hcOptNotifRemove THelpContexts Global -
hcOptNotifView THelpContexts Global -
hcOptOK THelpContexts Global -
hcOptOrderCheck THelpContexts Global -
hcOptOrderCheckView THelpContexts Global -
hcOptOther THelpContexts Global -
hcOptOtherLast THelpContexts Global -
hcOptOtherParam THelpContexts Global -
hcOptOtherTab THelpContexts Global -
hcOptPatSel THelpContexts Global -
hcOptPatSelBtn THelpContexts Global -
hcOptPatSelDayOfWeek THelpContexts Global -
hcOptPatSelListSrc THelpContexts Global -
hcOptPatSelProvider THelpContexts Global -
hcOptPatSelSort THelpContexts Global -
hcOptPatSelTeam THelpContexts Global -
hcOptPatSelTreating THelpContexts Global -
hcOptPatSelVisitStart THelpContexts Global -
hcOptPatSelVisitStop THelpContexts Global -
hcOptPatSelWard THelpContexts Global -
hcOptPersList THelpContexts Global -
hcOptRemAdd THelpContexts Global -
hcOptRemDelete THelpContexts Global -
hcOptRemDisp THelpContexts Global -
hcOptRemind THelpContexts Global -
hcOptRemNotDisp THelpContexts Global -
hcOptStartStop THelpContexts Global -
hcOptSurr THelpContexts Global -
hcOptSurrBtn THelpContexts Global -
hcOptSurrDate THelpContexts Global -
hcOptSurrRemove THelpContexts Global -
hcOptTeam THelpContexts Global -
hcOptTeamBtn THelpContexts Global -
hcOptTeamLst THelpContexts Global -
hcOptTeamPat THelpContexts Global -
hcOptTeamPers THelpContexts Global -
hcOptTeamRemove THelpContexts Global -
hcOptTeamRestrict THelpContexts Global -
hcOptTeamSubscr THelpContexts Global -
hcOptTeamUser THelpContexts Global -
hcOptTitle THelpContexts Global -
hcOptTitleAdd THelpContexts Global -
hcOptTitleDefault THelpContexts Global -
hcOptTitleDocClass THelpContexts Global -
hcOptTitleDocTitle THelpContexts Global -
hcOptTitleRemove THelpContexts Global -
hcOptTitleSave THelpContexts Global -
hcOptTitleYours THelpContexts Global -
hcOptUp THelpContexts Global -
hcOrderAlert THelpContexts Global -
hcOrders THelpContexts Global -
hcPatientSelectCbo THelpContexts Global -
hcPatientSelectForm THelpContexts Global -
hcProblem THelpContexts Global -
hcReminderDlg THelpContexts Global -
hcReminderTree THelpContexts Global -
hcReminderView THelpContexts Global -
hcReports THelpContexts Global -
hcSignon THelpContexts Global -
hcTemplateEditor THelpContexts Global -
hcUnknown THelpContexts Global -


Module Source

1     unit uHelpManager;
2     
3     interface
4     
5     uses Windows;
6     
7     type
8       THelpManager = class(TObject)
9       private
10        InProgress: boolean;
11        constructor Create;
12      public
13        HelpHandle: hWnd;
14        class function GetInstance: THelpManager;
15        function ExecHelp(Command: Word; Data: Integer; var CallHelp: Boolean): Boolean;
16      end;
17    
18    implementation
19    
20    uses ORSystem, SysUtils, Dialogs, ShellAPI, Forms;
21    
22    var
23      HelpManager: THelpManager;
24    
25    {=======================================================}
26    {  THelpManager - class used to manage the help system  }
27    {=======================================================}
28    
29    type
30      //  List of contexts currently in use
31      THelpContexts = (hcNone,
32                       hcLogin,
33                       hcSignon,
34                       hcConnect,
35                       hcPatientSelectCbo,
36                       hcPatientSelectForm,
37                       hcCover,
38                       hcProblem,
39                       hcMeds,
40                       hcOrders,
41                       hcNotes,
42                       hcConsults,
43                       hcDischargeSumm,
44                       hcLabs,
45                       hcReports,
46                       hcOptCoverDay,
47                       hcOptCoverRemind,
48                       hcOptOtherParam,
49                       hcOptionsOK,
50                       hcOptionsCancel,
51                       hcOptionsApply,
52                       hcOptDay,
53                       hcOptDayLabDef,
54                       hcOptDayVisitDef,
55                       hcOptDayLabInp,
56                       hcOptDayLabOutp,
57                       hcOptStartStop,
58                       hcOptRemind,
59                       hcOptUp,
60                       hcOptDown,
61                       hcOptRemDelete,
62                       hcOptRemAdd,
63                       hcOptRemDisp,
64                       hcOptRemNotDisp,
65                       hcOptNotif,
66                       hcOptNotifRemove,
67                       hcOptNotifFlag,
68                       hcOptSurrBtn,
69                       hcOptNotifView,
70                       hcOptOrderCheck,
71                       hcOptOrderCheckView,
72                       hcOptListTeam,
73                       hcOptPatSelBtn,
74                       hcOptPersList,
75                       hcOptTeamBtn,
76                       hcOptCombination,
77                       hcOptPatSel,
78                       hcOptPatSelListSrc,
79                       hcOptPatSelSort,
80                       hcOptPatSelProvider,
81                       hcOptPatSelTreating,
82                       hcOptPatSelTeam,
83                       hcOptPatSelWard,
84                       hcOptPatSelDayOfWeek,
85                       hcOptPatSelVisitStart,
86                       hcOptPatSelVisitStop,
87                       hcOptList,
88                       hcOptListAddByType,
89                       hcOptListAddBy,
90                       hcOptListPat,
91                       hcOptListPersList,
92                       hcOptListPersPat,
93                       hcOptListAdd,
94                       hcOptListAddAll,
95                       hcOptListPersPatR,
96                       hcOptListPersPatRA,
97                       hcOptListSave,
98                       hcOptListNew,
99                       hcOptListDelete,
100                      hcOptNewList,
101                      hcOptNewListText,
102                      hcOptTeam,
103                      hcOptTeamPat,
104                      hcOptTeamLst,
105                      hcOptTeamUser,
106                      hcOptTeamRemove,
107                      hcOptTeamSubscr,
108                      hcOptTeamPers,
109                      hcOptTeamRestrict,
110                      hcOptSurr,
111                      hcOptSurrRemove,
112                      hcOrderAlert,
113                      hcOptSurrDate,
114                      hcOptOther,
115                      hcOptOtherTab,
116                      hcOptOtherLast,
117                      hcOptComb,
118                      hcOptCombAddByType,
119                      hcOptCombAddBy,
120                      hcOptCombView,
121                      hcOptCombAdd,
122                      hcOptCombRemove,
123                      hcOptNotesTab,
124                      hcOptNotesBtn,
125                      hcOptNotesTitle,
126                      hcOptNotes,
127                      hcOptNotesSave,
128                      hcOptNotesVerify,
129                      hcOptNotesAskSubj,
130                      hcOptNotesCosigner,
131                      hcOptTitle,
132                      hcOptTitleDocClass,
133                      hcOptTitleDocTitle,
134                      hcOptTitleAdd,
135                      hcOptTitleRemove,
136                      hcOptTitleSave,
137                      hcOptTitleDefault,
138                      hcOptTitleYours,
139                      hcOptCover,
140                      hcOptOK,
141                      hcOptCancel,
142                      hcOptClose,
143                      hcOptions,
144                      hcTemplateEditor,
145                      hcReminderDlg,
146                      hcReminderTree,
147                      hcReminderView,
148                      hcUnknown);
149   
150   const
151     // Context ids for contexts
152     CONTEXT_VALUES: array[THelpContexts] of integer = (    0, // hcNone
153                                                            1, // hcLogin
154                                                            2, // hcSignon
155                                                            4, // hcConnect
156                                                           10, // hcPatientSelectCbo
157                                                           20, // hcPatientSelectForm
158                                                         1000, // hcCover
159                                                         2000, // hcProblem
160                                                         3000, // hcMeds
161                                                         4000, // hcOrders
162                                                         5000, // hcNotes
163                                                         6000, // hcConsults
164                                                         7000, // hcDischargeSumm
165                                                         8000, // hcLabs
166                                                         9000, // hcReports
167                                                         9001, // hcOptCoverDay
168                                                         9002, // hcOptCoverRemind
169                                                         9003, // hcOptOtherParam
170                                                         9007, // hcOptionsOK    
171                                                         9008, // hcOptionsCancel
172                                                         9009, // hcOptionsApply
173                                                         9010, // hcOptDay
174                                                         9011, // hcOptDayLabDef
175                                                         9012, // hcOptDayVisitDef
176                                                         9013, // hcOptDayLabInp
177                                                         9014, // hcOptDayLabOutp
178                                                         9015, // hcOptStartStop
179                                                         9020, // hcOptRemind
180                                                         9021, // hcOptUp
181                                                         9022, // hcOptDown
182                                                         9023, // hcOptRemDelete
183                                                         9024, // hcOptRemAdd
184                                                         9025, // hcOptRemDisp
185                                                         9026, // hcOptRemNotDisp
186                                                         9030, // hcOptNotif
187                                                         9031, // hcOptNotifRemove
188                                                         9032, // hcOptNotifFlag
189                                                         9033, // hcOptSurrBtn
190                                                         9035, // hcOptNotifView
191                                                         9040, // hcOptOrderCheck
192                                                         9041, // hcOptOrderCheckView
193                                                         9050, // hcOptListTeam
194                                                         9051, // hcOptPatSelBtn
195                                                         9052, // hcOptPersList
196                                                         9053, // hcOptTeamBtn
197                                                         9054, // hcOptCombination
198                                                         9060, // hcOptPatSel
199                                                         9061, // hcOptPatSelListSrc
200                                                         9062, // hcOptPatSelSort
201                                                         9063, // hcOptPatSelProvider
202                                                         9064, // hcOptPatSelTreating
203                                                         9065, // hcOptPatSelTeam
204                                                         9066, // hcOptPatSelWard
205                                                         9067, // hcOptPatSelDayOfWeek
206                                                         9068, // hcOptPatSelVisitStart
207                                                         9069, // hcOptPatSelVisitStop
208                                                         9070, // hcOptList
209                                                         9071, // hcOptListAddByType
210                                                         9072, // hcOptListAddBy
211                                                         9073, // hcOptListPat
212                                                         9074, // hcOptListPersList
213                                                         9075, // hcOptListPersPat
214                                                         9076, // hcOptListAdd
215                                                         9077, // hcOptListAddAll
216                                                         9078, // hcOptListPersPatR
217                                                         9079, // hcOptListPersPatRA
218                                                         9080, // hcOptListSave
219                                                         9081, // hcOptListNew
220                                                         9082, // hcOptListDelete
221                                                         9085, // hcOptNewList
222                                                         9086, // hcOptNewListText
223                                                         9090, // hcOptTeam
224                                                         9091, // hcOptTeamPat
225                                                         9092, // hcOptTeamLst
226                                                         9093, // hcOptTeamUser
227                                                         9094, // hcOptTeamRemove
228                                                         9095, // hcOptTeamSubscr
229                                                         9096, // hcOptTeamPers
230                                                         9097, // hcOptTeamRestrict
231                                                         9100, // hcOptSurr
232                                                         9101, // hcOptSurrRemove
233                                                         9102, // hcOrderAlert
234                                                         9103, // hcOptSurrDate
235                                                         9110, // hcOptOther
236                                                         9111, // hcOptOtherTab
237                                                         9112, // hcOptOtherLast
238                                                         9120, // hcOptComb
239                                                         9121, // hcOptCombAddByType
240                                                         9122, // hcOptCombAddBy
241                                                         9123, // hcOptCombView
242                                                         9124, // hcOptCombAdd
243                                                         9125, // hcOptCombRemove
244                                                         9200, // hcOptNotesTab
245                                                         9201, // hcOptNotesBtn
246                                                         9202, // hcOptNotesTitle
247                                                         9210, // hcOptNotes
248                                                         9213, // hcOptNotesSave
249                                                         9214, // hcOptNotesVerify
250                                                         9215, // hcOptNotesAskSubj
251                                                         9216, // hcOptNotesCosigner
252                                                         9230, // hcOptTitle
253                                                         9231, // hcOptTitleDocClass
254                                                         9232, // hcOptTitleDocTitle
255                                                         9233, // hcOptTitleAdd
256                                                         9234, // hcOptTitleRemove
257                                                         9235, // hcOptTitleSave
258                                                         9236, // hcOptTitleDefault
259                                                         9237, // hcOptTitleYours
260                                                         9700, // hcOptCover
261                                                         9996, // hcOptOK
262                                                         9997, // hcOptCancel
263                                                         9998, // hcOptClose
264                                                         9999, // hcOptions
265                                                        10000, // hcTemplateEditor
266                                                        11100, // hcReminderDlg
267                                                        11200, // hcReminderTree
268                                                        11300, // hcReminderView
269                                                          -1); // hcUnknown
270     // Context html files for contexts
271     CONTEXT_FILES: array[THelpContexts] of string = ('cprs.htm',                                     // hcNone
272                                                      'Signing_In_to_CPRS.htm',                       // hcLogin
273                                                      'cprs.htm',                                     // hcSignon
274                                                      'cprs.htm',                                     // hcConnect
275                                                      'cprs.htm',                                     // hcPatientSelectCbo
276                                                      'Selecting_a_Patient.htm',                      // hcPatientSelectForm
277                                                      'Overview__What_is_the_Cover_Sheet_.htm',       // hcCover
278                                                      'Problem_List.htm',                             // hcProblem
279                                                      'Viewing_Medications.htm',                      // hcMeds
280                                                      'Viewing_orders.htm',                           // hcOrders
281                                                      'Viewing_Progress_Notes.htm',                   // hcNotes
282                                                      'Consults.htm',                                 // hcConsults
283                                                      'Discharge_Summaries.htm',                      // hcDischargeSumm
284                                                      'Viewing_Laboratory_Test_Results.htm',          // hcLabs
285                                                      'Viewing_a_Report.htm',                         // hcReports
286                                                      'Cover_Sheet_Date_Range_Defaults.htm',          // hcOptCoverDay
287                                                      'cprs.htm',                                     // hcOptCoverRemind
288                                                      'Other_Parameters.htm',                         // hcOptOtherParam
289                                                      'cprs.htm',                                     // hcOptionsOK
290                                                      'Cancel_button.htm',                            // hcOptionsCancel
291                                                      'Apply_button.htm',                             // hcOptionsApply
292                                                      'cprs.htm',                                     // hcOptDay
293                                                      'cprs.htm',                                     // hcOptDayLabDef
294                                                      'cprs.htm',                                     // hcOptDayVisitDef
295                                                      'Inpatient_Days.htm',                           // hcOptDayLabInp
296                                                      'Outpatient_Days.htm',                          // hcOptDayLabOutp
297                                                      'Start-Stop.htm',                               // hcOptStartStop
298                                                      'Clinical_Reminders.htm',                       // hcOptRemind
299                                                      'Up_arrow.htm',                                 // hcOptUp
300                                                      'Down_arrow.htm',                               // hcOptDown
301                                                      'cprs.htm',                                     // hcOptRemDelete
302                                                      'cprs.htm',                                     // hcOptRemAdd
303                                                      'cprs.htm',                                     // hcOptRemDisp
304                                                      'cprs.htm',                                     // hcOptRemNotDisp
305                                                      'Notifications_Tab_(Tools___Options).htm',      // hcOptNotif
306                                                      'Remove_Pending_Notifications.htm',             // hcOptNotifRemove
307                                                      'cprs.htm',                                     // hcOptNotifFlag
308                                                      'Surrogate_Settings.htm',                       // hcOptSurrBtn
309                                                      'Notifications_list.htm',                       // hcOptNotifView
310                                                      'cprs.htm',                                     // hcOptOrderCheck
311                                                      'Order_Check_list.htm',                         // hcOptOrderCheckView
312                                                      'cprs.htm',                                     // hcOptListTeam
313                                                      'Patient_Selection_Defaults.htm',               // hcOptPatSelBtn
314                                                      'Personal_Lists.htm',                           // hcOptPersList
315                                                      'Teams_Information.htm',                        // hcOptTeamBtn
316                                                      'Source_Combinations.htm',                      // hcOptCombination
317                                                      'cprs.htm',                                     // hcOptPatSel
318                                                      'List_Source.htm',                              // hcOptPatSelListSrc
319                                                      'Sort_Order.htm',                               // hcOptPatSelSort
320                                                      'Primary_Provider.htm',                         // hcOptPatSelProvider
321                                                      'Treating_Specialty.htm',                       // hcOptPatSelTreating
322                                                      'Team_Personal.htm',                            // hcOptPatSelTeam
323                                                      'Ward.htm',                                     // hcOptPatSelWard
324                                                      'Start-Stop_(Patient_Selection).htm',           // hcOptPatSelDayOfWeek
325                                                      'Start-Stop_(Patient_Selection).htm',           // hcOptPatSelVisitStart
326                                                      'cprs.htm',                                     // hcOptPatSelVisitStop
327                                                      'cprs.htm',                                     // hcOptList
328                                                      'Select_Patients_by.htm',                       // hcOptListAddByType
329                                                      'Patient.htm',                                  // hcOptListAddBy
330                                                      'Patients_to_add.htm',                          // hcOptListPat
331                                                      'Personal_Lists_(Personal_Lists).htm',          // hcOptListPersList
332                                                      'Patients_on_personal_list.htm',                // hcOptListPersPat
333                                                      'Add_button_(Personal_Lists).htm',              // hcOptListAdd
334                                                      'Add_All_button_(Personal_Lists).htm',          // hcOptListAddAll
335                                                      'Remove_button_(Personal_Lists).htm',           // hcOptListPersPatR
336                                                      'Remove_All_button_(Personal_Lists).htm',       // hcOptListPersPatRA
337                                                      'Save_Changes_button_(Personal_Lists).htm',     // hcOptListSave
338                                                      'New_List_button.htm',                          // hcOptListNew
339                                                      'Delete_List_button.htm',                       // hcOptListDelete
340                                                      'cprs.htm',                                     // hcOptNewList
341                                                      'cprs.htm',                                     // hcOptNewListText
342                                                      'cprs.htm',                                     // hcOptTeam
343                                                      'Patients_on_selected_teams.htm',               // hcOptTeamPat
344                                                      'Team_members.htm',                             // hcOptTeamLst
345                                                      'You_are_on_these_teams.htm',                   // hcOptTeamUser
346                                                      'Remove_yourself_from_this_team.htm',           // hcOptTeamRemove
347                                                      'Subscribe_to_a_team.htm',                      // hcOptTeamSubscr
348                                                      'Include_personal_lists.htm',                   // hcOptTeamPers
349                                                      'Restrict_Team_List_View.htm',                  // hcOptTeamRestrict
350                                                      'Surrogate.htm',                                // hcOptSurr
351                                                      'Remove_Surrogate.htm',                         // hcOptSurrRemove
352                                                      'Send_MailMan_bulletin.htm',                    // hcOrderAlert
353                                                      'Surrogate_Date_Range.htm',                     // hcOptSurrDate
354                                                      'cprs.htm',                                     // hcOptOther
355                                                      'Initial_tab_when_CPRS_starts.htm',             // hcOptOtherTab
356                                                      'Use_last_selected_tab.htm',                    // hcOptOtherLast
357                                                      'cprs.htm',                                     // hcOptComb
358                                                      'Select_Combination_source_by.htm',             // hcOptCombAddByType
359                                                      'Ward_(Source_Combinations).htm',               // hcOptCombAddBy
360                                                      'Combinations.htm',                             // hcOptCombView
361                                                      'Add_button_(Source_Combinations).htm',         // hcOptCombAdd
362                                                      'Remove_button_(Source_Combinations).htm',      // hcOptCombRemove
363                                                      'cprs.htm',                                     // hcOptNotesTab
364                                                      'Notes_button.htm',                             // hcOptNotesBtn
365                                                      'Document_Titles_button.htm',                   // hcOptNotesTitle
366                                                      'cprs.htm',                                     // hcOptNotes
367                                                      'Interval_for_autosave.htm',                    // hcOptNotesSave
368                                                      'Verify_note_title.htm',                        // hcOptNotesVerify
369                                                      'Ask_subject.htm',                              // hcOptNotesAskSubj
370                                                      'Default_cosigner.htm',                         // hcOptNotesCosigner
371                                                      'cprs.htm',                                     // hcOptTitle
372                                                      'Document_class.htm',                           // hcOptTitleDocClass
373                                                      'Document_titles.htm',                          // hcOptTitleDocTitle
374                                                      'Add_button_(Document_Titles).htm',             // hcOptTitleAdd
375                                                      'Remove_button_(Document_Titles).htm',          // hcOptTitleRemove
376                                                      'Save_Changes_(Document_Titles).htm',           // hcOptTitleSave
377                                                      'Set_Default_Note_button.htm',                  // hcOptTitleDefault
378                                                      'Your_list_of_titles.htm',                      // hcOptTitleYours
379                                                      'cprs.htm',                                     // hcOptCover
380                                                      'cprs.htm',                                     // hcOptOK
381                                                      'Cancel_button_2.htm',                          // hcOptCancel
382                                                      'Close_button.htm',                             // hcOptClose
383                                                      'cprs.htm',                                     // hcOptions
384                                                      'Document_Templates_(overview).htm',            // hcTemplateEditor
385                                                      'The_Main_Reminders_Processing_Dialog.htm',     // hcReminderDlg
386                                                      'The_Reminders_Button_Tree_View.htm',           // hcReminderTree
387                                                      'Write_a_New_Progress_Note.htm',                // hcReminderView
388                                                      'cprs.htm');                                    // hcUnknown
389   
390   
391   {===========================================}
392   {  Substitued for Application.OnHelp event  }
393   {  ---------------------------------------  }
394   {  Command  : Type of help command          }
395   {  Data     : Context                       }
396   {  CallHelp : Call Win help system          }
397   {  Returns true if help called              }
398   {===========================================}
399   function THelpManager.ExecHelp(Command: word; Data: integer; var CallHelp: boolean): boolean;
400   var
401     hc: THelpContexts; // loop variable
402     errorcode: integer;
403     FilePath, FileName: string;
404   begin
405     CallHelp := False; // don't run the win help system
406     if not InProgress then begin
407       InProgress := True;
408       hc := hcNone;
409       while (hc <> hcUnknown) and (CONTEXT_VALUES[hc] <> Data) do inc(hc); // loop through and find a context
410       Filepath := FullToPathPart(Application.ExeName) + 'Help\';
411       Filename := Filepath + CONTEXT_FILES[hc];
412   //    ShowMessage('Help: ' + inttostr(Data) + ' ' + Context_Files[hc]); errorcode := 33; // diagnostic
413       errorcode := ShellExecute(HelpHandle, 'open', PChar(Filename), nil, nil, SW_SHOWNORMAL); // Tell windows to bring up the html file with the default browser
414       case errorcode of
415         0:                      ShowMessage('Help system: The operating system is out of memory or resources.');
416         ERROR_FILE_NOT_FOUND:   ShowMessage('Help system: ' + CONTEXT_FILES[hc] + ' was not found in ' + FilePath + '.');
417         ERROR_PATH_NOT_FOUND:   ShowMessage('Help system: ' + FilePath + ' was not found.');
418         ERROR_BAD_FORMAT:       ShowMessage('Help system: The .exe file is invalid (non-Microsoft Win32 .exe or error in .exe image).');
419         SE_ERR_ACCESSDENIED:    ShowMessage('Help system: The operating system denied access to ' + Filename + '.');
420         SE_ERR_ASSOCINCOMPLETE: ShowMessage('Help system: The file name association is incomplete or invalid. (.htm)');
421         SE_ERR_DDEBUSY:         ShowMessage('Help system: The Dynamic Data Exchange (DDE) transaction could not be completed because other DDE transactions were being processed.');
422         SE_ERR_DDEFAIL:         ShowMessage('Help system: The DDE transaction failed.');
423         SE_ERR_DDETIMEOUT:      ShowMessage('Help system: The DDE transaction could not be completed because the request timed out.');
424         SE_ERR_DLLNOTFOUND:     ShowMessage('Help system: The specified dynamic-link library (DLL) was not found.');
425         SE_ERR_NOASSOC:         ShowMessage('Help system: There is no application associated with the given file name extension. (.htm)');
426         SE_ERR_OOM:             ShowMessage('Help system: There was not enough memory to complete the operation.');
427         SE_ERR_SHARE:           ShowMessage('Help system: A sharing violation occurred.');
428       end;
429       Result := (errorcode >= 32);
430       InProgress := False;
431     end else begin
432       Result := True;
433     end;
434   end;
435   
436   
437   { THelpManager }
438   
439   constructor THelpManager.Create;
440   begin
441     inherited;
442     HelpHandle := Application.Handle;
443     InProgress := False;
444   end;
445   
446   class function THelpManager.GetInstance: THelpManager;
447   begin
448     if not assigned(HelpManager) then
449       HelpManager := THelpManager.Create;
450     Result := HelpManager;
451   end;
452   
453   initialization
454   
455   finalization
456     if assigned(HelpManager) then
457       HelpManager.Free;
458   
459   end.

Module Calls (2 levels)

-

Module Called-By (2 levels)


                uHelpManager
              fBase508Form┘ 
               CPRSChart┤   
                   fPage┤   
                 fAutoSz┤   
                  fFrame┤   
              fODMedOIFA┤   
                fDrawers┤   
         fTemplateDialog┤   
              uReminders┤   
                 fPCELex┤   
         fEncounterFrame┤   
                fPCEBase┤   
            fPCEBaseMain┤   
             fVitalsDate┤   
                 fVitals┤   
               fPtSelMsg┤   
                  fPtSel┤   
             fOrdersSign┤   
                 fRptBox┤   
                fReports┤   
                  fVisit┤   
                  fEncnt┤   
                  fProbs┤   
                fProbEdt┤   
                fProbflt┤   
                fProbLex┤   
           fProbFreetext┤   
                fProbCmt┤   
           fReportsPrint┤   
                 fGraphs┤   
          fGraphSettings┤   
              fGraphData┤   
          fGraphProfiles┤   
            fGraphOthers┤   
            fPCEProvider┤   
           fTemplateView┤   
         fTemplateEditor┤   
         fTemplateImport┤   
         fReminderDialog┤   
                 fMHTest┤   
                   fLabs┤   
                fLabTest┤   
               fLabTests┤   
          fLabTestGroups┤   
               fLabPrint┤   
                 fPtDemo┤   
                 fReview┤   
                fxBroker┤   
                 fxLists┤   
                fxServer┤   
                 fSplash┤   
           fReminderTree┤   
                fOptions┤   
              fODMessage┤   
            fOrdersPrint┤   
            fSurgeryView┤   
           fRemVisitInfo┤   
           fDefaultEvent┤   
             fPtSelOptns┤   
           fPtSelOptSave┤   
                 fDupPts┤   
                 fPtSens┤   
             fPtSelDemog┤   
       fPatientFlagMulti┤   
           fAlertForward┤   
               fOrdersDC┤   
                  fODGen┤   
              fConsultBS┤   
              fConsultBD┤   
               fSignItem┤   
             fConsultBSt┤   
           fConsultsView┤   
             fConsultAct┤   
               fCsltNote┤   
            fAddlSigners┤   
              fNoteProps┤   
                 fNoteBA┤   
                 fNoteBD┤   
                fTIUView┤   
            fDCSummProps┤   
    fTemplateFieldEditor┤   
         fTemplateFields┤   
               fEditProc┤   
            fEditConsult┤   
         fConsultAlertTo┤   
                 fPreReq┤   
              fCombatVet┤   
          fODRadApproval┤   
          fODRadConShRes┤   
       fODLabOthCollSamp┤   
           fODLabOthSpec┤   
         fODLabImmedColl┤   
           fLabCollTimes┤   
                 fOMNavA┤   
                  fOMSet┤   
         fODReleaseEvent┤   
             fOrdersCopy┤   
                fMedCopy┤   
       fODValidateAction┤   
            fRenewOutMed┤   
        fTemplateObjects┤   
        fTemplateAutoGen┤   
          fRemCoverSheet┤   
        fRemCoverPreview┤   
                fPCEEdit┤   
            fOptionsDays┤   
       fOptionsReminders┤   
       fOptionsSurrogate┤   
fOptionsPatientSelection┤   
           fOptionsLists┤   
         fOptionsNewList┤   
           fOptionsTeams┤   
    fOptionsCombinations┤   
           fOptionsOther┤   
           fOptionsNotes┤   
          fOptionsTitles┤   
   fOptionsReportsCustom┤   
  fOptionsReportsDefault┤   
            fODRadImType┤   
     fOptionsPrimaryList┤   
       fOptionsSubscribe┤   
               fPostings┘