Ignore:
Timestamp:
May 8, 2015, 7:52:55 AM (10 years ago)
Author:
healthsevak
Message:

Committing the files for first time to this new branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/HealthSevak-CPRS/CPRS-Chart/Orders/fOCAccept.pas

    r829 r1693  
    55uses
    66  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
    7   fAutoSz, StdCtrls, ComCtrls, ORFn, ExtCtrls, VA508AccessibilityManager;
     7  fAutoSz, StdCtrls, ComCtrls, ORFn, ExtCtrls, VA508AccessibilityManager, rOrders, fOCMonograph;
    88
    99type
     
    1313    cmdAccept: TButton;
    1414    cmdCancel: TButton;
     15    Button1: TButton;
     16    procedure Button1Click(Sender: TObject);
     17    procedure cmdCancelClick(Sender: TObject);
     18    procedure FormResize(Sender: TObject);
    1519  private
    1620    { Private declarations }
     
    2731function AcceptOrderWithChecks(OCList: TStringList): Boolean;
    2832var
    29   i: Integer;
     33  i,j: Integer;
    3034  frmOCAccept: TfrmOCAccept;
    31 begin
     35  substring: String;
     36  remOC: TStringList;
     37begin         
     38  remOC := TStringList.Create;
    3239  Result := True;
    3340  if OCList.Count > 0 then
     
    3643    try
    3744      ResizeFormToFont(TForm(frmOCAccept));
     45      frmOCAccept.Button1.Enabled := false;
     46      if IsMonograph then frmOCAccept.Button1.Enabled := true;
     47
    3848      for i := 0 to OCList.Count - 1 do
    3949      begin
    40         frmOCAccept.memChecks.Lines.Add(Piece(OCList[i], U, 4));
     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       
    4164        frmOCAccept.memChecks.Lines.Add('');
    4265      end;
     
    4669    finally
    4770      frmOCAccept.Release;
     71      remOC.Destroy;
    4872    end;
    4973  end;
    5074end;
    5175
     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
    5299end.
Note: See TracChangeset for help on using the changeset viewer.