source: cprs/branches/tmg-cprs/CPRS-Chart/fNoteCslt.pas@ 1156

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

Initial upload of TMG-CPRS 1.0.26.69

File size: 2.8 KB
RevLine 
[453]1//kt -- Modified with SourceScanner on 7/19/2007
2unit fNoteCslt;
3
4interface
5
6uses
7 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
8 fAutoSz, StdCtrls, ORCtrls, ORFn, DKLang;
9
10type
11 TfrmNoteConsult = class(TfrmAutoSz)
12 Label1: TStaticText;
13 Label2: TStaticText;
14 lstRequests: TORListBox;
15 Label3: TLabel;
16 Label4: TLabel;
17 Label5: TLabel;
18 cmdOK: TButton;
19 cmdCancel: TButton;
20 Label6: TLabel;
21 Label7: TLabel;
22 procedure cmdCancelClick(Sender: TObject);
23 procedure cmdOKClick(Sender: TObject);
24 procedure lstRequestsClick(Sender: TObject);
25 private
26 { Private declarations }
27 FSelectedRequest: Integer;
28 public
29 { Public declarations }
30 end;
31
32function SelectConsult: Integer;
33
34implementation
35
36{$R *.DFM}
37
38uses rTIU;
39
40//const
41//TX_NO_REQUEST = 'There are no consult requests available for this patient.' + CRLF + <-- original line. //kt 7/19/2007
42// 'Another progress note title must be selected.'; <-- original line. //kt 7/19/2007
43//TX_NO_REQUEST_CAP = 'No Consult Requests'; <-- original line. //kt 7/19/2007
44
45//kt Begin Mod (change Consts to Vars) 7/19/2007
46var
47 TX_NO_REQUEST : string; //kt
48 TX_NO_REQUEST_CAP : string; //kt
49//kt End Mod -------------------
50
51
52procedure SetupVars;
53//kt Added entire function to replace constant declarations 7/19/2007
54begin
55 TX_NO_REQUEST := DKLangConstW('fNoteCslt_There_are_no_consult_requests_available_for_this_patientx') + CRLF +
56 DKLangConstW('fNoteCslt_Another_progress_note_title_must_be_selectedx');
57 TX_NO_REQUEST_CAP := DKLangConstW('fNoteCslt_No_Consult_Requests');
58end;
59
60function SelectConsult: Integer;
61var
62 frmNoteConsult: TfrmNoteConsult;
63 AConsultList: TStringList;
64begin
65 SetupVars; //kt added 7/19/2007 to replace constants with vars.
66 Result := 0;
67 frmNoteConsult := TfrmNoteConsult.Create(Application);
68 AConsultList := TStringList.Create;
69 try
70 ListConsultRequests(AConsultList);
71 if AConsultList.Count > 0 then
72 begin
73 ResizeFormToFont(TForm(frmNoteConsult));
74 frmNoteConsult.lstRequests.Items.Assign(AConsultList);
75 frmNoteConsult.ShowModal;
76 Result := frmNoteConsult.FSelectedRequest;
77 end
78 else InfoBox(TX_NO_REQUEST, TX_NO_REQUEST_CAP, MB_OK);
79 finally
80 frmNoteConsult.Release;
81 AConsultList.Free;
82 end;
83end;
84
85procedure TfrmNoteConsult.lstRequestsClick(Sender: TObject);
86begin
87 inherited;
88 if lstRequests.ItemIEN > 0 then cmdOK.Enabled := True else cmdOK.Enabled := False;
89end;
90
91procedure TfrmNoteConsult.cmdOKClick(Sender: TObject);
92begin
93 inherited;
94 FSelectedRequest := lstRequests.ItemIEN;
95 Close;
96end;
97
98procedure TfrmNoteConsult.cmdCancelClick(Sender: TObject);
99begin
100 inherited;
101 FSelectedRequest := 0;
102 Close;
103end;
104
105end.
Note: See TracBrowser for help on using the repository browser.