Module

fNoteCslt

Path

C:\CPRS\CPRS30\fNoteCslt.pas

Last Modified

7/15/2014 3:26:38 PM

Units Used in Interface

Name Comments
fAutoSz -

Units Used in Implementation

Name Comments
rTIU -

Classes

Name Comments
TfrmNoteConsult -

Procedures

Name Owner Declaration Scope Comments
cmdCancelClick TfrmNoteConsult procedure cmdCancelClick(Sender: TObject); Public/Published -
cmdOKClick TfrmNoteConsult procedure cmdOKClick(Sender: TObject); Public/Published -
lstRequestsClick TfrmNoteConsult procedure lstRequestsClick(Sender: TObject); Public/Published -

Functions

Name Owner Declaration Scope Comments
SelectConsult - function SelectConsult: Integer; Interfaced -

Constants

Name Declaration Scope Comments
TX_NO_REQUEST 'There are no consult requests available for this patient.' + CRLF + Global -
TX_NO_REQUEST_CAP 'No Consult Requests' Global -


Module Source

1     unit fNoteCslt;
2     
3     interface
4     
5     uses
6       Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
7       fAutoSz, StdCtrls, ORCtrls, ORFn, VA508AccessibilityManager;
8     
9     type
10      TfrmNoteConsult = class(TfrmAutoSz)
11        Label1: TStaticText;
12        Label2: TStaticText;
13        lstRequests: TORListBox;
14        Label3: TLabel;
15        Label4: TLabel;
16        Label5: TLabel;
17        cmdOK: TButton;
18        cmdCancel: TButton;
19        Label6: TLabel;
20        Label7: TLabel;
21        procedure cmdCancelClick(Sender: TObject);
22        procedure cmdOKClick(Sender: TObject);
23        procedure lstRequestsClick(Sender: TObject);
24      private
25        { Private declarations }
26        FSelectedRequest: Integer;
27      public
28        { Public declarations }
29      end;
30    
31    function SelectConsult: Integer;
32    
33    implementation
34    
35    {$R *.DFM}
36    
37    uses rTIU;
38    
39    const
40      TX_NO_REQUEST = 'There are no consult requests available for this patient.' + CRLF +
41                       'Another progress note title must be selected.';
42      TX_NO_REQUEST_CAP = 'No Consult Requests';
43    
44    function SelectConsult: Integer;
45    var
46      frmNoteConsult: TfrmNoteConsult;
47      AConsultList: TStringList;
48    begin
49      Result := 0;
50      frmNoteConsult := TfrmNoteConsult.Create(Application);
51      AConsultList := TStringList.Create;
52      try
53        ListConsultRequests(AConsultList);
54        if AConsultList.Count > 0 then
55        begin
56          ResizeFormToFont(TForm(frmNoteConsult));
57          FastAssign(AConsultList, frmNoteConsult.lstRequests.Items);
58          frmNoteConsult.ShowModal;
59          Result := frmNoteConsult.FSelectedRequest;
60        end
61        else InfoBox(TX_NO_REQUEST, TX_NO_REQUEST_CAP, MB_OK);
62      finally
63        frmNoteConsult.Release;
64        AConsultList.Free;
65      end;
66    end;
67    
68    procedure TfrmNoteConsult.lstRequestsClick(Sender: TObject);
69    begin
70      inherited;
71      if lstRequests.ItemIEN > 0 then cmdOK.Enabled := True else cmdOK.Enabled := False;
72    end;
73    
74    procedure TfrmNoteConsult.cmdOKClick(Sender: TObject);
75    begin
76      inherited;
77      FSelectedRequest := lstRequests.ItemIEN;
78      Close;
79    end;
80    
81    procedure TfrmNoteConsult.cmdCancelClick(Sender: TObject);
82    begin
83      inherited;
84      FSelectedRequest := 0;
85      Close;
86    end;
87    
88    end.

Module Calls (2 levels)


fNoteCslt
 ├fAutoSz
 │ └fBase508Form
 └rTIU
   ├rCore
   ├uCore
   ├uConst
   ├uTIU
   └rMisc

Module Called-By (2 levels)

-