source: cprs/trunk/CPRS-Chart/fGraphOthers.pas@ 1298

Last change on this file since 1298 was 830, checked in by Kevin Toppenberg, 14 years ago

Upgrading to version 27

File size: 2.7 KB
Line 
1unit fGraphOthers;
2
3interface
4
5uses
6 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7 Dialogs, StdCtrls, ComCtrls, ORCtrls, ExtCtrls, ORFn, uGraphs, rCore, uCore,
8 fBase508Form, VA508AccessibilityManager;
9
10type
11 TfrmGraphOthers = class(TfrmBase508Form)
12 pnlMain: TORAutoPanel;
13 lblOthers: TLabel;
14 cboOthers: TORComboBox;
15 lstViews: TORListBox;
16 memReport: TRichEdit;
17 pnlBottom: TPanel;
18 lblViews: TLabel;
19 lblInfo: TLabel;
20 lblDefinitions: TLabel;
21 btnClose: TButton;
22 btnCopy: TButton;
23 pnlTempData: TPanel;
24 lblSave: TLabel;
25 lblClose: TLabel;
26 lstActualItems: TORListBox;
27 lstDrugClass: TListBox;
28 lstScratch: TListBox;
29 lstTests: TListBox;
30 procedure cboOthersNeedData(Sender: TObject; const StartFrom: string;
31 Direction, InsertAt: Integer);
32 procedure FormShow(Sender: TObject);
33 procedure cboOthersClick(Sender: TObject);
34 procedure lstViewsClick(Sender: TObject);
35 private
36 procedure AddTests(tests: TStrings);
37 public
38 { Public declarations }
39 end;
40
41var
42 frmGraphOthers: TfrmGraphOthers;
43
44 procedure DialogGraphOthers(size: integer);
45
46implementation
47
48{$R *.dfm}
49
50uses
51 rGraphs, fGraphData, rLabs;
52
53procedure DialogGraphOthers(size: integer);
54var
55 aList: TStrings;
56 frmGraphOthers: TfrmGraphOthers;
57begin
58 aList := TStringList.Create;
59 frmGraphOthers := TfrmGraphOthers.Create(Application);
60 try
61 with frmGraphOthers do
62 begin
63 ResizeAnchoredFormToFont(frmGraphOthers);
64 ShowModal;
65 end;
66 finally
67 frmGraphOthers.Release;
68 aList.Free;
69 end;
70end;
71
72procedure TfrmGraphOthers.cboOthersClick(Sender: TObject);
73begin
74 FastAssign(TestGroups(cboOthers.ItemIEN), lstViews.Items);
75end;
76
77procedure TfrmGraphOthers.cboOthersNeedData(Sender: TObject;
78 const StartFrom: string; Direction, InsertAt: Integer);
79begin
80 //cboOthers.ForDataUse(SubSetOfPersons(StartFrom, Direction));
81 cboOthers.ForDataUse(Users(StartFrom, Direction));
82end;
83
84procedure TfrmGraphOthers.FormShow(Sender: TObject);
85begin
86 cboOthers.InitLongList(User.Name);
87 cboOthers.SelectByIEN(User.DUZ);
88 cboOthersClick(self);
89end;
90
91procedure TfrmGraphOthers.lstViewsClick(Sender: TObject);
92begin
93 AddTests(ATestGroup(lstViews.ItemIEN, cboOthers.ItemIEN));
94end;
95
96procedure TfrmGraphOthers.AddTests(tests: TStrings);
97var
98 i, j: integer;
99 ok: boolean;
100begin
101 for i := 0 to tests.Count - 1 do
102 begin
103 ok := true;
104 for j := 0 to memReport.Lines.Count - 1 do
105 if memReport.Lines[j] = tests[i] then
106 begin
107 ok := false;
108 end;
109 if ok then
110 begin
111 memReport.Lines.Add(tests[i]);
112 end;
113 end;
114end;
115
116end.
Note: See TracBrowser for help on using the repository browser.