Module

fLkUpLocation

Path

C:\CPRS\CPRS30\fLkUpLocation.pas

Last Modified

7/15/2014 3:26:38 PM

Units Used in Interface

Name Comments
fAutoSz -

Units Used in Implementation

Name Comments
rCore -
uConst -

Classes

Name Comments
TfrmLkUpLocation -

Procedures

Name Owner Declaration Scope Comments
cboLocationNeedData TfrmLkUpLocation procedure cboLocationNeedData(Sender: TObject; const StartFrom: String; Direction, InsertAt: Integer); Public/Published -
cmdCancelClick TfrmLkUpLocation procedure cmdCancelClick(Sender: TObject); Public/Published -
cmdOKClick TfrmLkUpLocation procedure cmdOKClick(Sender: TObject); Public/Published -
FormCreate TfrmLkUpLocation procedure FormCreate(Sender: TObject); Public/Published -
LookupLocation - procedure LookupLocation(var IEN: Integer; var AName: string; const AType: integer; const HelpInfo: string); Interfaced -

Global Variables

Name Type Declaration Comments
LocType Integer LocType: integer; -


Module Source

1     unit fLkUpLocation;
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      TfrmLkUpLocation = class(TfrmAutoSz)
11        lblInfo: TLabel;
12        cboLocation: TORComboBox;
13        lblLocation: TLabel;
14        cmdOK: TButton;
15        cmdCancel: TButton;
16        procedure cmdCancelClick(Sender: TObject);
17        procedure FormCreate(Sender: TObject);
18        procedure cmdOKClick(Sender: TObject);
19        procedure cboLocationNeedData(Sender: TObject; const StartFrom: String;
20          Direction, InsertAt: Integer);
21      private
22        OKPressed: Boolean;
23      end;
24    
25    var
26      LocType:   integer;
27    
28    
29    procedure LookupLocation(var IEN: Integer; var AName: string; const AType: integer; const HelpInfo: string);
30    
31    implementation
32    
33    {$R *.DFM}
34    
35    uses rCore, uConst;
36    
37    procedure LookupLocation(var IEN: Integer; var AName: string; const AType: integer; const HelpInfo: string);
38    var
39      frmLkUpLocation: TfrmLkUpLocation;
40    begin
41      LocType := AType;
42      frmLkUpLocation := TfrmLkUpLocation.Create(Application);
43      try
44        ResizeFormToFont(TForm(frmLkUpLocation));
45        frmLkUpLocation.lblInfo.Caption := HelpInfo;
46        frmLkUpLocation.ShowModal;
47        IEN := 0;
48        AName := '';
49        if frmLkUpLocation.OKPressed then
50        begin
51          IEN := frmLkUpLocation.cboLocation.ItemIEN;
52          AName := frmLkUpLocation.cboLocation.Text;
53        end;
54      finally
55        frmLkUpLocation.Release;
56      end;
57    end;
58    
59    procedure TfrmLkUpLocation.FormCreate(Sender: TObject);
60    begin
61      inherited;
62      OKPressed := False;
63      cboLocation.InitLongList('');
64    end;
65    
66    procedure TfrmLkUpLocation.cboLocationNeedData(Sender: TObject; const StartFrom: string;
67      Direction, InsertAt: Integer);
68    begin
69      inherited;
70        case LocType of
71          LOC_ALL:   cboLocation.ForDataUse(SubSetOfLocations(StartFrom, Direction));
72          LOC_OUTP:  cboLocation.ForDataUse(SubSetOfClinics(StartFrom, Direction));
73          LOC_INP:   cboLocation.ForDataUse(SubSetOfInpatientLocations(StartFrom, Direction));
74        end;
75    
76    end;
77    
78    procedure TfrmLkUpLocation.cmdOKClick(Sender: TObject);
79    begin
80      inherited;
81      OKPressed := True;
82      Close;
83    end;
84    
85    procedure TfrmLkUpLocation.cmdCancelClick(Sender: TObject);
86    begin
87      inherited;
88      Close;
89    end;
90    
91    end.

Module Calls (2 levels)


fLkUpLocation
 ├fAutoSz
 │ └fBase508Form
 ├rCore
 │ └uCore
 └uConst

Module Called-By (2 levels)


               fLkUpLocation
                   uOrders┤ 
                   uCore┤ │ 
                 fODBase┤ │ 
                 rODBase┤ │ 
                  fFrame┤ │ 
                 fOrders┤ │ 
             fOrdersSign┤ │ 
                   fMeds┤ │ 
               fARTAllgy┤ │ 
                  fNotes┤ │ 
               fConsults┤ │ 
         fReminderDialog┤ │ 
                 fReview┤ │ 
            fOrdersRenew┤ │ 
               fOrdersCV┤ │ 
                 fODMeds┤ │ 
                 fOMNavA┤ │ 
         fOrderSaveQuick┤ │ 
                  fOMSet┤ │ 
          fOrdersRelease┤ │ 
                 fOMHTML┤ │ 
               fODMedNVA┤ │ 
fODChangeUnreleasedRenew┤ │ 
          fOrdersOnChart┤ │ 
         fODReleaseEvent┤ │ 
               fODActive┘ │ 
                fOrders...┤ 
                    fODRad┘ 
              uOrders...┘