source: cprs/branches/tmg-cprs/CPRS-Chart/uSurgery.pas@ 736

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

Initial upload of TMG-CPRS 1.0.26.69

File size: 4.3 KB
Line 
1//kt -- Modified with SourceScanner on 8/7/2007
2unit uSurgery;
3
4interface
5
6uses
7 SysUtils, Windows, Messages, Controls, Classes, StdCtrls, ORfn, dialogs;
8
9type
10 TSurgeryTitles = class
11 ClassName: string;
12 DfltTitle: Integer;
13 DfltTitleName: string;
14 ShortList: TStringList;
15 constructor Create;
16 destructor Destroy; override;
17 end;
18
19function MakeSurgeryCaseDisplayText(InputString: string): string;
20function MakeSurgeryReportDisplayText(RawText: string): string;
21//procedure DisplayOpTop(ANoteIEN: integer);
22
23//const
24(* SG_ALL = 1; // Case context - all cases
25 SG_BY_SURGEON = 2; // Case context - all cases by surgeon
26 SG_BY_DATE = 3; // Case context - all cases by date range*)
27
28//SG_TV_TEXT = 'Surgery Cases'; <-- original line. //kt 8/7/2007
29function SG_TV_TEXT : string; //kt
30
31const
32 OP_TOP_NEVER_SHOW = 0;
33 OP_TOP_ALWAYS_SHOW = 1;
34 OP_TOP_ASK_TO_SHOW = 2;
35
36implementation
37
38uses
39 uConst, rSurgery, fRptBox
40 , DKlang //kt
41 ;
42
43//kt Added entire function to replace constant declarations 8/7/2007
44function SG_TV_TEXT : string;
45begin Result := DKLangConstW('uSurgery_Surgery_Cases');
46end;
47
48
49constructor TSurgeryTitles.Create;
50{ creates an object to store Surgery titles so only obtained from server once }
51begin
52 inherited Create;
53 ShortList := TStringList.Create;
54end;
55
56destructor TSurgeryTitles.Destroy;
57{ frees the lists that were used to store the Surgery titles }
58begin
59 ShortList.Free;
60 inherited Destroy;
61end;
62
63function MakeSurgeryCaseDisplayText(InputString: string): string;
64(*
65CASE #^Operative Procedure^Date/Time of Operation^Surgeon^^^^^^^^^+^Context
66*)
67var
68 x: string;
69begin
70 x := InputString;
71 x := FormatFMDateTime('mmm dd yyyy', MakeFMDateTime(Piece(x, U, 3))) + ' ' + Piece(x, U, 2) +
72 ', ' + Piece(Piece(x, U, 4), ';', 2) + ', ' + 'Case #: ' + Piece(x, u, 1);
73 Result := x;
74end;
75
76function MakeSurgeryReportDisplayText(RawText: string): string;
77var
78 x: string;
79begin
80 x := RawText;
81 x := FormatFMDateTime('mmm dd,yy', MakeFMDateTime(Piece(x, U, 3))) + ' ' + Piece(x, U, 2) +
82 ' (#' + Piece(x, U, 1) + '), ' + Piece(x, U, 6) + ', ' + Piece(Piece(x, U, 5), ';', 2);
83 Result := x;
84end;
85
86(*procedure DisplayOpTop(ANoteIEN: integer);
87const
88{ TODO -oRich V. -cSurgery/TIU : What should be the text of the prompt for display OpTop on signature? }
89//TX_OP_TOP_PROMPT = 'Would you like to first review the OpTop for this surgery report?'; <-- original line. //kt 8/7/2007
90 TX_OP_TOP_PROMPT = DKLangConstW('uSurgery_Would_you_like_to_first_review_the_OpTop_for_this_surgery_reportx'); //kt added 8/7/2007
91var
92 AList: TStringList;
93 ACaseIEN: integer;
94 IsNonORProc: boolean;
95 ShouldShowOpTop: integer;
96 x: string;
97 ShowReport: boolean;
98begin
99 AList := TStringList.Create;
100 try
101 ShowReport := False;
102 x := GetSurgCaseRefForNote(ANoteIEN);
103 ACaseIEN := StrToIntDef(Piece(x, ';', 1), 0);
104 ShouldShowOpTop := ShowOpTopOnSignature(ACaseIEN);
105 case ShouldShowOpTop of
106 OP_TOP_NEVER_SHOW : ; // do nothing
107 OP_TOP_ALWAYS_SHOW : begin
108 x := GetSingleCaseListItemWithoutDocs(ANoteIEN);
109 IsNonORProc := IsNonORProcedure(ACaseIEN);
110 LoadOpTop(AList, ACaseIEN, IsNonORProc, ShowReport);
111 ReportBox(AList, MakeSurgeryCaseDisplayText(x), True);
112 end;
113// OP_TOP_ASK_TO_SHOW : if InfoBox(TX_OP_TOP_PROMPT, 'Confirmation', MB_YESNO or MB_ICONQUESTION) = IDYES then <-- original line. //kt 8/7/2007
114 OP_TOP_ASK_TO_SHOW : if InfoBox(TX_OP_TOP_PROMPT, DKLangConstW('uSurgery_Confirmation'), MB_YESNO or MB_ICONQUESTION) = IDYES then //kt added 8/7/2007
115 begin
116 x := GetSingleCaseListItemWithoutDocs(ANoteIEN);
117 IsNonORProc := IsNonORProcedure(ACaseIEN);
118 LoadOpTop(AList, ACaseIEN, IsNonORProc, ShowReport);
119 ReportBox(AList, MakeSurgeryCaseDisplayText(x), True);
120 end;
121 end;
122 finally
123 AList.Free;
124 end;
125end;*)
126
127end.
Note: See TracBrowser for help on using the repository browser.