source: cprs/trunk/CPRS-Chart/Orders/fOCAccept.pas@ 1800

Last change on this file since 1800 was 1679, checked in by healthsevak, 10 years ago

Updating the working copy to CPRS version 28

File size: 2.6 KB
Line 
1unit fOCAccept;
2
3interface
4
5uses
6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
7 fAutoSz, StdCtrls, ComCtrls, ORFn, ExtCtrls, VA508AccessibilityManager, rOrders, fOCMonograph;
8
9type
10 TfrmOCAccept = class(TfrmAutoSz)
11 memChecks: TRichEdit;
12 pnlBottom: TPanel;
13 cmdAccept: TButton;
14 cmdCancel: TButton;
15 Button1: TButton;
16 procedure Button1Click(Sender: TObject);
17 procedure cmdCancelClick(Sender: TObject);
18 procedure FormResize(Sender: TObject);
19 private
20 { Private declarations }
21 public
22 { Public declarations }
23 end;
24
25function AcceptOrderWithChecks(OCList: TStringList): Boolean;
26
27implementation
28
29{$R *.DFM}
30
31function AcceptOrderWithChecks(OCList: TStringList): Boolean;
32var
33 i,j: Integer;
34 frmOCAccept: TfrmOCAccept;
35 substring: String;
36 remOC: TStringList;
37begin
38 remOC := TStringList.Create;
39 Result := True;
40 if OCList.Count > 0 then
41 begin
42 frmOCAccept := TfrmOCAccept.Create(Application);
43 try
44 ResizeFormToFont(TForm(frmOCAccept));
45 frmOCAccept.Button1.Enabled := false;
46 if IsMonograph then frmOCAccept.Button1.Enabled := true;
47
48 for i := 0 to OCList.Count - 1 do
49 begin
50 substring := Copy(Piece(OCList[i], U, 4),0,2);
51 if substring='||' then
52 begin
53 substring := Copy(Piece(OCList[i], U, 4),3,Length(Piece(OCList[i], U, 4)));
54 GetXtraTxt(remOC,Piece(substring,'&',1),Piece(substring,'&',2));
55 frmOCAccept.memChecks.Lines.Add('('+inttostr(i+1)+' of '+inttostr(OCList.Count)+') ' + Piece(substring,'&',2));
56 for j:= 0 to remOC.Count - 1 do frmOCAccept.memChecks.Lines.Add(' '+remOC[j]);
57 frmOCAccept.memChecks.Lines.Add(' ');
58 end
59 else
60 begin
61 frmOCAccept.memChecks.Lines.Add('('+inttostr(i+1)+' of '+inttostr(OCList.Count)+') ' + Piece(OCList[i], U, 4));
62 end;
63
64 frmOCAccept.memChecks.Lines.Add('');
65 end;
66 frmOCAccept.memChecks.SelStart := 0;
67 frmOCAccept.memChecks.SelLength := 0;
68 Result := frmOCAccept.ShowModal = mrYes;
69 finally
70 frmOCAccept.Release;
71 remOC.Destroy;
72 end;
73 end;
74end;
75
76procedure TfrmOCAccept.Button1Click(Sender: TObject);
77var
78 monoList: TStringList;
79begin
80 inherited;
81 monoList := TStringList.Create;
82 GetMonographList(monoList);
83 ShowMonographs(monoList);
84 monoList.Free;
85end;
86
87procedure TfrmOCAccept.cmdCancelClick(Sender: TObject);
88begin
89 inherited;
90 DeleteMonograph;
91end;
92
93procedure TfrmOCAccept.FormResize(Sender: TObject);
94begin
95 inherited;
96 memChecks.Refresh;
97end;
98
99end.
Note: See TracBrowser for help on using the repository browser.