1 | //kt -- Modified with SourceScanner on 8/7/2007
|
---|
2 | unit uSurgery;
|
---|
3 |
|
---|
4 | interface
|
---|
5 |
|
---|
6 | uses
|
---|
7 | SysUtils, Windows, Messages, Controls, Classes, StdCtrls, ORfn, dialogs;
|
---|
8 |
|
---|
9 | type
|
---|
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 |
|
---|
19 | function MakeSurgeryCaseDisplayText(InputString: string): string;
|
---|
20 | function 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
|
---|
29 | function SG_TV_TEXT : string; //kt
|
---|
30 |
|
---|
31 | const
|
---|
32 | OP_TOP_NEVER_SHOW = 0;
|
---|
33 | OP_TOP_ALWAYS_SHOW = 1;
|
---|
34 | OP_TOP_ASK_TO_SHOW = 2;
|
---|
35 |
|
---|
36 | implementation
|
---|
37 |
|
---|
38 | uses
|
---|
39 | uConst, rSurgery, fRptBox
|
---|
40 | , DKlang //kt
|
---|
41 | ;
|
---|
42 |
|
---|
43 | //kt Added entire function to replace constant declarations 8/7/2007
|
---|
44 | function SG_TV_TEXT : string;
|
---|
45 | begin Result := DKLangConstW('uSurgery_Surgery_Cases');
|
---|
46 | end;
|
---|
47 |
|
---|
48 |
|
---|
49 | constructor TSurgeryTitles.Create;
|
---|
50 | { creates an object to store Surgery titles so only obtained from server once }
|
---|
51 | begin
|
---|
52 | inherited Create;
|
---|
53 | ShortList := TStringList.Create;
|
---|
54 | end;
|
---|
55 |
|
---|
56 | destructor TSurgeryTitles.Destroy;
|
---|
57 | { frees the lists that were used to store the Surgery titles }
|
---|
58 | begin
|
---|
59 | ShortList.Free;
|
---|
60 | inherited Destroy;
|
---|
61 | end;
|
---|
62 |
|
---|
63 | function MakeSurgeryCaseDisplayText(InputString: string): string;
|
---|
64 | (*
|
---|
65 | CASE #^Operative Procedure^Date/Time of Operation^Surgeon^^^^^^^^^+^Context
|
---|
66 | *)
|
---|
67 | var
|
---|
68 | x: string;
|
---|
69 | begin
|
---|
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;
|
---|
74 | end;
|
---|
75 |
|
---|
76 | function MakeSurgeryReportDisplayText(RawText: string): string;
|
---|
77 | var
|
---|
78 | x: string;
|
---|
79 | begin
|
---|
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;
|
---|
84 | end;
|
---|
85 |
|
---|
86 | (*procedure DisplayOpTop(ANoteIEN: integer);
|
---|
87 | const
|
---|
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
|
---|
91 | var
|
---|
92 | AList: TStringList;
|
---|
93 | ACaseIEN: integer;
|
---|
94 | IsNonORProc: boolean;
|
---|
95 | ShouldShowOpTop: integer;
|
---|
96 | x: string;
|
---|
97 | ShowReport: boolean;
|
---|
98 | begin
|
---|
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;
|
---|
125 | end;*)
|
---|
126 |
|
---|
127 | end.
|
---|