source: cprs/branches/tmg-cprs/CPRS-Chart/uConst.pas@ 454

Last change on this file since 454 was 453, checked in by Kevin Toppenberg, 16 years ago

Initial upload of TMG-CPRS 1.0.26.69

File size: 16.5 KB
Line 
1//kt -- Modified with SourceScanner on 8/8/2007
2unit uConst;
3
4interface
5
6uses Messages;
7
8const
9
10 { User defined messages used by CPRS }
11// UM_SHOWPAGE = (WM_USER + 100); // originally in fFrame
12// UM_NEWORDER = (WM_USER + 101); // originally in fODBase
13// UM_TAKEFOCUS = (WM_USER + 102); // in fProbEdt
14// UM_CLOSEPROBLEM = (WM_USER + 103); // in fProbs
15// UM_PLFILTER = (WM_USER + 104); // in fProbs
16// UM_PLLEX = (WM_USER + 105); // in fProbs
17// UM_RESIZEPAGE = (WM_USER + 107); // originally in fPage
18// UM_DROPLIST = (WM_USER + 108); // originally in fODMedIn
19// UM_DESTROY = (WM_USER + 109); // used to notify owner when order dialog closes
20// UM_DELAYEVENT = (WM_USER + 110); // used with PostMessage to slightly delay an event
21
22 UM_SHOWPAGE = (WM_USER + 9236); // originally in fFrame
23 UM_NEWORDER = (WM_USER + 9237); // originally in fODBase
24 UM_TAKEFOCUS = (WM_USER + 9238); // in fProbEdt
25 UM_CLOSEPROBLEM = (WM_USER + 9239); // in fProbs
26 UM_PLFILTER = (WM_USER + 9240); // in fProbs
27 UM_PLLEX = (WM_USER + 9241); // in fProbs
28 UM_RESIZEPAGE = (WM_USER + 9242); // originally in fPage
29 UM_DROPLIST = (WM_USER + 9243); // originally in fODMedIn
30 UM_DESTROY = (WM_USER + 9244); // used to notify owner when order dialog closes
31 UM_DELAYEVENT = (WM_USER + 9245); // used with PostMessage to slightly delay an event
32 UM_INITIATE = (WM_USER + 9246); // used by fFrame to do initial stuff after FormCreate
33 UM_RESYNCREM = (WM_USER + 9247); // used by fReminderDialog to update reminder controls
34 UM_STILLDELAY = (WM_USER + 9248); // used by EDO related form fOrdersTS,fOrdersCopy,fMedsCopy
35 UM_EVENTOCCUR = (WM_USER + 9249); // used by EDO for background occured event
36 UM_NSSOTHER = (WM_USER + 9250); // used by NSS for auto-display schedule builder
37
38 { Tab Indexes, moved from fFrame }
39 CT_NOPAGE = -1; // chart tab - none selected
40 CT_UNKNOWN = 0; // chart tab - unknown (shouldn't happen)
41 CT_COVER = 1; // chart tab - cover sheet
42 CT_PROBLEMS = 2; // chart tab - problem list
43 CT_MEDS = 3; // chart tab - medications screen
44 CT_ORDERS = 4; // chart tab - doctor's orders
45 CT_HP = 5; // chart tab - history & physical
46 CT_NOTES = 6; // chart tab - progress notes
47 CT_CONSULTS = 7; // chart tab - consults
48 CT_DCSUMM = 8; // chart tab - discharge summaries
49 CT_LABS = 9; // chart tab - laboratory results
50 CT_REPORTS = 10; // chart tab - reports
51 CT_SURGERY = 11; // chart tab - surgery
52 CT_WEBTAB1 = 12; // chart tab - web browser //kt added
53 CT_WEBTAB2 = 13; // chart tab - web browser //kt added
54 CT_WEBTAB3 = 14; // chart tab - web browser //kt added
55 //kt Option: add more CT_WEBTAB#'s here. But set CT_LAST_WEBTAB= to last one...
56 CT_LAST_WEBTAB = CT_WEBTAB3; // Last web chart tab //kt added
57
58 { Changes object item types }
59 CH_DOC = 10; // TIU documents (progress notes)
60 CH_SUM = 12; // Discharge Summaries {*REV*}
61 CH_CON = 15; // Consults
62 CH_SUR = 18; // Surgery reports
63 CH_ORD = 20; // Orders
64 CH_PCE = 30; // Encounter Form items
65
66 { Changes object signature requirements }
67 CH_SIGN_YES = 1; // Obtain signature (checkbox is checked)
68 CH_SIGN_NO = 2; // Don't obtain signature (checkbox is unchecked)
69 CH_SIGN_NA = 0; // Signature not applicable (checkbox is greyed)
70
71 { Sign & release orders }
72 SS_ONCHART = '0';
73 SS_ESIGNED = '1';
74 SS_UNSIGNED = '2';
75 SS_NOTREQD = '3';
76 SS_DIGSIG = '7';
77 RS_HOLD = '0';
78 RS_RELEASE = '1';
79 NO_PROVIDER = 'E';
80 NO_VERBAL = 'V';
81 NO_PHONE = 'P';
82 NO_POLICY = 'I';
83 NO_WRITTEN = 'W';
84
85 { Actions on orders }
86 ORDER_NEW = 0;
87 ORDER_DC = 1;
88 ORDER_RENEW = 2;
89 ORDER_HOLD = 3;
90 ORDER_EDIT = 4;
91 ORDER_COPY = 5;
92 ORDER_QUICK = 9;
93 ORDER_ACT = 10;
94 ORDER_SIGN = 11;
95 ORDER_CPLXRN = 12;
96
97 { Order action codes }
98 OA_COPY = 'RW';
99 OA_CHANGE = 'XX';
100 OA_RENEW = 'RN';
101 OA_HOLD = 'HD';
102 OA_DC = 'DC';
103 OA_UNHOLD = 'RL';
104 OA_FLAG = 'FL';
105 OA_UNFLAG = 'UF';
106 OA_COMPLETE = 'CP';
107 OA_ALERT = 'AL';
108 OA_REFILL = 'RF';
109 OA_VERIFY = 'VR';
110 OA_CHART = 'CR';
111 OA_RELEASE = 'RS';
112 OA_SIGN = 'ES';
113 OA_ONCHART = 'OC';
114 OA_COMMENT = 'CM';
115 OA_TRANSFER = 'XFR';
116 OA_CHGEVT = 'EV';
117 OA_EDREL = 'MN';
118
119 { Ordering Dialog Form IDs }
120 OD_ACTIVITY = 100;
121 OD_ALLERGY = 105;
122 OD_CONSULT = 110;
123 OD_PROCEDURE = 112;
124 OD_DIET_TXT = 115;
125 OD_DIET = 117;
126 OD_LAB = 120;
127 OD_BB = 125;
128 OD_MEDINPT = 130;
129 OD_MEDS = 135;
130 OD_MEDOUTPT = 140;
131 OD_MEDNONVA = 145;
132 OD_NURSING = 150;
133 OD_MISC = 151;
134 OD_GENERIC = 152;
135 OD_IMAGING = 160;
136 OD_VITALS = 171; // use 170 for ORWD GENERIC VITALS, 171 for GMRVOR
137 OD_MEDIV = 180;
138 OD_TEXTONLY = 999;
139 OM_NAV = 1001;
140 OM_QUICK = 1002;
141 OM_TABBED = 1003;
142 OM_TREE = 1004;
143 OM_ALLERGY = 1105;
144 OM_HTML = 1200;
145 OD_AUTOACK = 9999;
146
147 { Ordering role }
148 OR_NOKEY = 0;
149 OR_CLERK = 1;
150 OR_NURSE = 2;
151 OR_PHYSICIAN = 3;
152 OR_STUDENT = 4;
153 OR_BADKEYS = 5;
154
155 { Quick Orders }
156 QL_DIALOG = 0;
157 QL_AUTO = 1;
158 QL_VERIFY = 2;
159 QL_REJECT = 8;
160 QL_CANCEL = 9;
161 MAX_KEYVARS = 10;
162
163 { Order Signature Statuses }
164 OSS_UNSIGNED = 2;
165 OSS_NOT_REQUIRE = 3;
166
167 { Special Strings }
168 TX_WPTYPE = '^WP^'; // used to identify fields passed as word processing
169
170 { Pharmacy Variables }
171 PST_UNIT_DOSE = 'U';
172 PST_IV_FLUIDS = 'F';
173 PST_OUTPATIENT = 'O';
174
175 { Status groups for medications }
176 MED_ACTIVE = 0; // status is an active status (active, hold, on call)
177 MED_PENDING = 1; // status is a pending status (non-verified)
178 MED_NONACTIVE = 2; // status is a non-active status (expired, dc'd, ...)
179
180 { Actions for medications }
181 MED_NONE = 0;
182 MED_NEW = 1;
183 MED_DC = 2;
184 MED_HOLD = 3;
185 MED_RENEW = 4;
186 MED_REFILL = 5;
187
188 { Validate Date/Times }
189 DT_FUTURE = 'F';
190 DT_PAST = 'P';
191 DT_MMDDREQ = 'E';
192 DT_TIMEOPT = 'T';
193 DT_TIMEREQ = 'R';
194
195 { Change Context Types }
196 CC_CLICK = 0;
197 CC_INIT_PATIENT = 1;
198 CC_NOTIFICATION = 2;
199 CC_REFRESH = 3;
200 CC_RESUME = 4;
201
202 { Notification Types }
203 NF_LAB_RESULTS = 3;
204 NF_FLAGGED_ORDERS = 6;
205 NF_ORDER_REQUIRES_ELEC_SIGNATURE = 12;
206 NF_ABNORMAL_LAB_RESULTS = 14;
207 NF_IMAGING_RESULTS = 22;
208 NF_CONSULT_REQUEST_RESOLUTION = 23;
209 NF_ABNORMAL_IMAGING_RESULTS = 25;
210 NF_IMAGING_REQUEST_CANCEL_HELD = 26;
211 NF_NEW_SERVICE_CONSULT_REQUEST = 27;
212 NF_CONSULT_REQUEST_CANCEL_HOLD = 30;
213 NF_SITE_FLAGGED_RESULTS = 32;
214 NF_ORDERER_FLAGGED_RESULTS = 33;
215 NF_ORDER_REQUIRES_COSIGNATURE = 37;
216 NF_LAB_ORDER_CANCELED = 42;
217 NF_STAT_RESULTS = 44;
218 NF_DNR_EXPIRING = 45;
219 NF_MEDICATIONS_EXPIRING_INPT = 47;
220 NF_UNVERIFIED_MEDICATION_ORDER = 48;
221 NF_NEW_ORDER = 50;
222 NF_IMAGING_RESULTS_AMENDED = 53;
223 NF_CRITICAL_LAB_RESULTS = 57;
224 NF_UNVERIFIED_ORDER = 59;
225 NF_FLAGGED_OI_RESULTS = 60;
226 NF_FLAGGED_OI_ORDER = 61;
227 NF_DC_ORDER = 62;
228 NF_CONSULT_REQUEST_UPDATED = 63;
229 NF_FLAGGED_OI_EXP_INPT = 64;
230 NF_FLAGGED_OI_EXP_OUTPT = 65;
231 NF_CONSULT_PROC_INTERPRETATION = 66;
232 NF_IMAGING_REQUEST_CHANGED = 67;
233 NF_LAB_THRESHOLD_EXCEEDED = 68;
234 NF_MAMMOGRAM_RESULTS = 69;
235 NF_PAP_SMEAR_RESULTS = 70;
236 NF_ANATOMIC_PATHOLOGY_RESULTS = 71;
237 NF_MEDICATIONS_EXPIRING_OUTPT = 72;
238 NF_DCSUMM_UNSIGNED_NOTE = 901;
239 NF_CONSULT_UNSIGNED_NOTE = 902;
240 NF_NOTES_UNSIGNED_NOTE = 903;
241 NF_SURGERY_UNSIGNED_NOTE = 904;
242
243 { Notify Application Events }
244 NAE_OPEN = 'BEG';
245 NAE_CLOSE = 'END';
246 NAE_NEWPT = 'XPT';
247 NAE_REPORT = 'RPT';
248 NAE_ORDER = 'ORD';
249
250 { TIU Delete Document Reasons }
251 DR_PRIVACY = 'P';
252 DR_ADMIN = 'A';
253 DR_NOTREQ = '';
254 DR_CANCEL = 'CANCEL';
255
256 { TIU Document Types }
257 TYP_PROGRESS_NOTE = 3;
258 TYP_ADDENDUM = 81;
259 TYP_DC_SUMM = 244;
260
261 { TIU National Document Class Names }
262 DCL_CONSULTS = 'CONSULTS';
263 DCL_CLINPROC = 'CLINICAL PROCEDURES';
264 DCL_SURG_OR = 'SURGICAL REPORTS';
265 DCL_SURG_NON_OR = 'PROCEDURE REPORT (NON-O.R.)';
266
267 { TIU View Contexts }
268 NC_RECENT = 0; // Note context - last n signed notes
269 NC_ALL = 1; // Note context - all signed notes
270 NC_UNSIGNED = 2; // Note context - all unsigned notes
271 NC_UNCOSIGNED = 3; // Note context - all uncosigned notes
272 NC_BY_AUTHOR = 4; // Note context - signed notes by author
273 NC_BY_DATE = 5; // Note context - signed notes by date range
274 NC_CUSTOM = 6; // Note Context - custom view
275 //Text Search CQ: HDS00002856
276 NC_SEARCHTEXT = 7; // Note Content - search for text
277
278 { Surgery View Contexts }
279 SR_RECENT = 0;
280 SR_ALL = 1;
281 SR_BY_DATE = 5;
282 SR_CUSTOM = 6;
283
284 { Surgery TreeView Icons }
285 IMG_SURG_BLANK = 0;
286 IMG_SURG_TOP_LEVEL = 1;
287 IMG_SURG_GROUP_SHUT = 2;
288 IMG_SURG_GROUP_OPEN = 3;
289 IMG_SURG_CASE_EMPTY = 4;
290 IMG_SURG_CASE_SHUT = 5;
291 IMG_SURG_CASE_OPEN = 6;
292 IMG_SURG_RPT_SINGLE = 7;
293 IMG_SURG_RPT_ADDM = 8;
294 IMG_SURG_ADDENDUM = 9;
295 IMG_SURG_NON_OR_CASE_EMPTY = 10;
296 IMG_SURG_NON_OR_CASE_SHUT = 11;
297 IMG_SURG_NON_OR_CASE_OPEN = 12;
298
299 { TIU TreeView icons }
300 IMG_TOP_LEVEL = 0;
301 IMG_GROUP_SHUT = 1;
302 IMG_GROUP_OPEN = 2;
303 IMG_SINGLE = 3;
304 IMG_PARENT = 4;
305 IMG_IDNOTE_SHUT = 5;
306 IMG_IDNOTE_OPEN = 6;
307 IMG_IDPAR_ADDENDA_SHUT = 7;
308 IMG_IDPAR_ADDENDA_OPEN = 8;
309 IMG_ID_CHILD = 9;
310 IMG_ID_CHILD_ADD = 10;
311 IMG_ADDENDUM = 11;
312
313 { Consults Treeview Icons }
314 IMG_GMRC_TOP_LEVEL = 0;
315 IMG_GMRC_GROUP_SHUT = 1;
316 IMG_GMRC_GROUP_OPEN = 2;
317 IMG_GMRC_CONSULT = 3;
318 IMG_GMRC_PROC = 4;
319 IMG_GMRC_CLINPROC = 5;
320 IMG_GMRC_ALL_PROC = 6;
321 IMG_GMRC_IFC_CONSULT = 7;
322 IMG_GMRC_IFC_PROC = 8;
323
324
325 { TIU Imaging icons }
326 IMG_NO_IMAGES = 6;
327 IMG_1_IMAGE = 1;
328 IMG_2_IMAGES = 2;
329 IMG_MANY_IMAGES = 3;
330 IMG_CHILD_HAS_IMAGES = 4;
331 IMG_IMAGES_HIDDEN = 5;
332
333
334 { TIU ListView sort indicators }
335 IMG_NONE = -1;
336 IMG_ASCENDING = 12;
337 IMG_DESCENDING = 13;
338 IMG_BLANK = 14;
339
340 { TIU TreeView context strings}
341(* //kt replaced with a function (see code lower in this file)
342 NC_TV_TEXT: array[CT_NOTES..CT_DCSUMM] of array[NC_RECENT..NC_BY_DATE] of string =
343 (('Recent Signed Notes','All signed notes','All unsigned notes','All uncosigned notes','Signed notes by author','Signed notes by date range'),
344 ('','Related Documents','Medicine Results',' ',' ',' '),
345 ('Recent Signed Summaries','All signed summaries','All unsigned summaries','All uncosigned summaries','Signed summaries by author','Signed summaries by date range'));
346*)
347
348 CC_ALL = 1; // Consult context - all Consults
349 CC_BY_STATUS = 2; // Consult context - Consults by Status
350 CC_BY_SERVICE = 4; // Consult context - Consults by Service
351 CC_BY_DATE = 5; // Consult context - Consults by date range
352 CC_CUSTOM = 6; // Custom consults list
353
354(* //kt replaced with a function (see code lower in this file)
355 CC_TV_TEXT: array[CC_ALL..CC_CUSTOM] of string =
356 ('All consults','Consults by Status', '', 'Consults by Service','Consults by Date Range','Custom List');
357*)
358
359 PKG_CONSULTS = 'GMR(123,';
360 PKG_SURGERY = 'SRF(';
361 PKG_PRF = 'PRF';
362
363 { New Person Filters }
364 NPF_ALL = 0;
365 NPF_PROVIDER = 1;
366// NPF_ENCOUNTER = 2;
367 NPF_SUPPRESS = 9;
368
369 { Location Types }
370 LOC_ALL = 0;
371 LOC_OUTP = 1;
372 LOC_INP = 2;
373
374 { File Numbers }
375 FN_HOSPITAL_LOCATION = 44;
376 FN_NEW_PERSON = 200;
377
378 UpperCaseLetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
379 LowerCaseLetters = 'abcdefghijklmnopqrstuvwxyz';
380 Digits = '0123456789';
381
382 MAX_ENTRY_WIDTH = 80; //Change in 23.9 for D/S, Consult, and Surgery Notes AGP
383 MAX_PROGRESSNOTE_WIDTH = 80;
384
385 DISCONTINUED_ORDER = '2';
386
387
388var
389 ScrollBarWidth: integer = 0;
390
391 //Group Name
392 // NONVAMEDGROUP = 'Non-VA Meds'; <-- original line. //kt 8/8/2007
393 function NONVAMEDGROUP : string; //kt added 8/8/2007
394
395 // NONVAMEDTXT = 'Non-VA'; <-- original line. //kt 8/8/2007
396 function NONVAMEDTXT : string; //kt added 8/8/2007
397
398{ TIU TreeView context strings}
399 //kt 8-7-07 added to allow just-in-time translation (not just at program startup)
400 function NC_TV_TEXT(TabIndex,ViewContext : integer) : string;
401
402 //kt 8-7-07 added to allow just-in-time translation (not just at program startup)
403 function CC_TV_TEXT(ConsultContext : integer) : string;
404
405
406implementation
407
408uses
409 DKLang,
410 Windows;
411
412function NONVAMEDGROUP : string; //kt added 8/8/2007
413begin
414 Result := DKLangConstW('uConst_NonxVA_Meds');
415end;
416
417function NONVAMEDTXT : string;
418begin
419 Result := DKLangConstW('uConst_NonxVA'); //kt added 8/8/2007
420end;
421
422
423function NC_TV_TEXT(TabIndex,ViewContext : integer) : string;
424begin
425 Result := '';
426 Case TabIndex of
427 CT_NOTES : begin
428 case ViewContext of
429 NC_RECENT : Result := DKLangConstW('uConst_Recent_Signed_Notes');
430 NC_ALL : Result := DKLangConstW('uConst_All_signed_notes');
431 NC_UNSIGNED : Result := DKLangConstW('uConst_All_unsigned_notes');
432 NC_UNCOSIGNED : Result := DKLangConstW('uConst_All_uncosigned_notes');
433 NC_BY_AUTHOR : Result := DKLangConstW('uConst_Signed_notes_by_author');
434 NC_BY_DATE : Result := DKLangConstW('uConst_Signed_notes_by_date_range');
435 end; {case}
436 end;
437 CT_CONSULTS : begin
438 case ViewContext of
439 NC_RECENT : Result := '';
440 NC_ALL : Result := DKLangConstW('uConst_Related_Documents');
441 NC_UNSIGNED : Result := DKLangConstW('uConst_Medicine_Results');
442 NC_UNCOSIGNED : Result := '';
443 NC_BY_AUTHOR : Result := '';
444 NC_BY_DATE : Result := '';
445 end; {case}
446 end;
447 CT_DCSUMM : begin
448 case ViewContext of
449 NC_RECENT : Result := DKLangConstW('uConst_Recent_Signed_Summaries');
450 NC_ALL : Result := DKLangConstW('uConst_All_signed_summaries');
451 NC_UNSIGNED : Result := DKLangConstW('uConst_All_unsigned_summaries');
452 NC_UNCOSIGNED : Result := DKLangConstW('uConst_All_uncosigned_summaries');
453 NC_BY_AUTHOR : Result := DKLangConstW('uConst_Signed_summaries_by_author');
454 NC_BY_DATE : Result := DKLangConstW('uConst_Signed_summaries_by_date_range');
455 end; {case}
456 end;
457 end; {case}
458end;
459
460//kt 8-7-07 added to allow just-in-time translation (not just at program startup)
461function CC_TV_TEXT(ConsultContext : integer) : string;
462begin
463 case consultContext of
464 CC_ALL : Result := DKLangConstW('uConst_All_consults');
465 CC_BY_STATUS : Result := DKLangConstW('uConst_Consults_by_Status');
466 CC_BY_SERVICE : Result := DKLangConstW('uConst_Consults_by_Service');
467 CC_BY_DATE : Result := DKLangConstW('uConst_Consults_by_Date_Range');
468 CC_CUSTOM : Result := DKLangConstW('uConst_Custom_List');
469 end; {case}
470end;
471
472
473initialization
474 ScrollBarWidth := GetSystemMetrics(SM_CXVSCROLL);
475
476end.
477
478
Note: See TracBrowser for help on using the repository browser.