source: cprs/branches/foia-cprs/CPRS-Chart/uSurgery.pas@ 1071

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

Adding foia-cprs branch

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