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

Last change on this file since 1216 was 729, checked in by Kevin Toppenberg, 15 years ago

Added functions to Templates, and Images tab

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