Module

fHealthFactor

Path

C:\CPRS\CPRS30\Encounter\fHealthFactor.pas

Last Modified

7/15/2014 3:26:36 PM

Initialization Code

initialization
  SpecifyFormIsNotADialog(TfrmHealthFactors);

end.

Units Used in Interface

Name Comments
fPCEBase -
fPCEBaseMain -
fPCELex -
fPCEOther -
rPCE -
uPCE -

Units Used in Implementation

Name Comments
fEncounterFrame -

Classes

Name Comments
TfrmHealthFactors -

Procedures

Name Owner Declaration Scope Comments
cboHealthLevelChange TfrmHealthFactors procedure cboHealthLevelChange(Sender: TObject); Public/Published -
FormCreate TfrmHealthFactors procedure FormCreate(Sender: TObject); Public/Published -
UpdateControls TfrmHealthFactors procedure UpdateControls; override; Protected -
UpdateNewItemStr TfrmHealthFactors procedure UpdateNewItemStr(var x: string); override; Protected -

Global Variables

Name Type Declaration Comments
frmHealthFactors TfrmHealthFactors frmHealthFactors: TfrmHealthFactors; -


Module Source

1     unit fHealthFactor;
2     
3     interface
4     
5     uses
6       Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
7       fPCEBase, StdCtrls, ORCtrls, CheckLst, ExtCtrls, Buttons, uPCE, rPCE, ORFn,
8       fPCELex, fPCEOther, ComCtrls, fPCEBaseMain, VA508AccessibilityManager;
9     
10    type
11      TfrmHealthFactors = class(TfrmPCEBaseMain)
12        lblHealthLevel: TLabel;
13        cboHealthLevel: TORComboBox;
14    
15        procedure cboHealthLevelChange(Sender: TObject);
16        procedure FormCreate(Sender: TObject);
17      private
18      protected
19        procedure UpdateNewItemStr(var x: string); override;
20        procedure UpdateControls; override;
21      public
22      end;
23    
24    var
25      frmHealthFactors: TfrmHealthFactors;
26    
27    implementation
28    
29    {$R *.DFM}
30    
31    uses
32      fEncounterFrame, VA508AccessibilityRouter;
33    
34    procedure tfrmHealthFactors.cboHealthLevelChange(Sender: TObject);
35    var
36      i: integer;
37    
38    begin
39      if(NotUpdating) and (cboHealthLevel.Text <> '') then
40      begin
41        for i := 0 to lbGrid.Items.Count-1 do
42          if(lbGrid.Selected[i]) then
43            TPCEPat(lbGrid.Items.Objects[i]).Level := cboHealthLevel.ItemID;
44        GridChanged;
45      end;
46    end;
47    
48    procedure TfrmHealthFactors.FormCreate(Sender: TObject);
49    begin
50      inherited;
51      FTabName := CT_HlthNm;
52      FPCEListCodesProc := ListHealthCodes;
53      FPCEItemClass := TPCEHealth;
54      FPCECode := 'HF';
55      PCELoadORCombo(cboHealthLevel);
56    end;
57    
58    procedure TfrmHealthFactors.UpdateNewItemStr(var x: string);
59    begin
60      SetPiece(x, U, pnumHFLevel, NoPCEValue);
61    end;
62    
63    procedure TfrmHealthFactors.UpdateControls;
64    var
65      ok, First: boolean;
66      SameHL: boolean;
67      i: integer;
68      HL: string;
69      Obj: TPCEHealth;
70    
71    begin
72      inherited;
73      if(NotUpdating) then
74      begin
75        BeginUpdate;
76        try
77          ok := (lbGrid.SelCount > 0);
78          lblHealthLevel.Enabled := ok;
79          cboHealthLevel.Enabled := ok;
80          if(ok) then
81          begin
82            First := TRUE;
83            SameHL := TRUE;
84            HL := NoPCEValue;
85            for i := 0 to lbGrid.Items.Count-1 do
86            begin
87              if lbGrid.Selected[i] then
88              begin
89                Obj := TPCEHealth(lbGrid.Items.Objects[i]);
90                if(First) then
91                begin
92                  First := FALSE;
93                  HL := Obj.Level;
94                end
95                else
96                begin
97                  if(SameHL) then
98                    SameHL := (HL = Obj.Level);
99                end;
100             end;
101           end;
102           if(SameHL) then
103             cboHealthLevel.SelectByID(HL)
104           else
105             cboHealthLevel.Text := '';
106         end
107         else
108         begin
109           cboHealthLevel.Text := '';
110         end;
111       finally
112         EndUpdate;
113       end;
114     end;
115   end;
116   
117   initialization
118     SpecifyFormIsNotADialog(TfrmHealthFactors);
119   
120   end.

Module Calls (2 levels)


fHealthFactor
 ├fPCEBase
 │ ├uConst
 │ ├fAutoSz
 │ ├fBase508Form
 │ └fEncounterFrame
 ├uPCE
 │ ├uConst
 │ ├uCore
 │ ├rPCE
 │ ├rCore
 │ ├rTIU
 │ ├fEncounterFrame...
 │ ├uVitals
 │ ├fFrame
 │ ├fPCEProvider
 │ └rVitals
 ├rPCE...
 ├fPCEBaseMain
 │ ├fPCEBaseGrid
 │ ├rPCE...
 │ ├uPCE...
 │ ├fPCELex
 │ ├fPCEOther
 │ ├fEncounterFrame...
 │ ├fHFSearch
 │ ├fBase508Form...
 │ └UBAConst
 └fEncounterFrame...

Module Called-By (2 levels)


       fHealthFactor
   fEncounterFrame┘ 
            uPCE┤   
            rPCE┤   
        fPCEBase┤   
      fVisitType┤   
      fDiagnoses┤   
    fPCEBaseMain┤   
      fProcedure┤   
       fPCEOther┤   
   fImmunization┤   
       fSkinTest┤   
      fPatientEd┤   
fHealthFactor...┤   
           fExam┤   
      fEncVitals┤   
          fNotes┤   
       fConsults┤   
         fDCSumm┤   
        fSurgery┤   
            fGAF┤   
        fPCEEdit┤   
       fHFSearch┘