Module

fPatientEd

Path

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

Last Modified

7/15/2014 3:26:36 PM

Initialization Code

initialization
  SpecifyFormIsNotADialog(TfrmPatientEd);

end.

Units Used in Interface

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

Units Used in Implementation

Name Comments
fEncounterFrame -

Classes

Name Comments
TfrmPatientEd -

Procedures

Name Owner Declaration Scope Comments
cboPatUnderstandingChange TfrmPatientEd procedure cboPatUnderstandingChange(Sender: TObject); Public/Published
//Name:procedure tfrmPatientEd.cboPatUnderstandingChange(Sender: TObject);
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description:Change the level of understanding assigned to the education item.
///////////////////////////////////////////////////////////////////////////////
FormCreate TfrmPatientEd procedure FormCreate(Sender: TObject); Public/Published -
UpdateControls TfrmPatientEd procedure UpdateControls; override; Protected -
UpdateNewItemStr TfrmPatientEd procedure UpdateNewItemStr(var x: string); override; Protected -

Global Variables

Name Type Declaration Comments
frmPatientEd TfrmPatientEd frmPatientEd: TfrmPatientEd; -


Module Source

1     unit fPatientEd;
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      TfrmPatientEd = class(TfrmPCEBaseMain)
12        lblUnderstanding: TLabel;
13        cboPatUnderstanding: TORComboBox;
14        procedure cboPatUnderstandingChange(Sender: TObject);
15        procedure FormCreate(Sender: TObject);
16      private
17      protected
18        procedure UpdateNewItemStr(var x: string); override;
19        procedure UpdateControls; override;
20      public
21      end;
22    
23    var
24      frmPatientEd: TfrmPatientEd;
25    
26    implementation
27    
28    {$R *.DFM}
29    
30    uses
31      fEncounterFrame, VA508AccessibilityRouter;
32    
33    {///////////////////////////////////////////////////////////////////////////////
34    //Name:procedure tfrmPatientEd.cboPatUnderstandingChange(Sender: TObject);
35    //Created: Jan 1999
36    //By: Robert Bott
37    //Location: ISL
38    //Description:Change the level of understanding assigned to the education item.
39    ///////////////////////////////////////////////////////////////////////////////}
40    procedure tfrmPatientEd.cboPatUnderstandingChange(Sender: TObject);
41    var
42      i: integer;
43    
44    begin
45      if(NotUpdating) and (cboPatUnderstanding.Text <> '') then
46      begin
47        for i := 0 to lbGrid.Items.Count-1 do
48          if(lbGrid.Selected[i]) then
49            TPCEPat(lbGrid.Items.Objects[i]).Level := cboPatUnderstanding.ItemID;
50        GridChanged;
51      end;
52    end;
53    
54    procedure TfrmPatientEd.FormCreate(Sender: TObject);
55    begin
56      inherited;
57      FTabName := CT_PedNm;
58      FPCEListCodesProc := ListPatientCodes;
59      FPCEItemClass := TPCEPat;
60      FPCECode := 'PED';
61      PCELoadORCombo(cboPatUnderstanding);
62    end;
63    
64    procedure TfrmPatientEd.UpdateNewItemStr(var x: string);
65    begin
66      SetPiece(x, U, pnumPEDLevel, NoPCEValue);
67    end;
68    
69    procedure TfrmPatientEd.UpdateControls;
70    var
71      ok, First: boolean;
72      SameLOU: boolean;
73      i: integer;
74      LOU: string;
75      Obj: TPCEPat;
76    
77    begin
78      inherited;
79      if(NotUpdating) then
80      begin
81        BeginUpdate;
82        try
83          ok := (lbGrid.SelCount > 0);
84          lblUnderstanding.Enabled := ok;
85          cboPatUnderstanding.Enabled := ok;
86          if(ok) then
87          begin
88            First := TRUE;
89            SameLOU := TRUE;
90            LOU := NoPCEValue;
91            for i := 0 to lbGrid.Items.Count-1 do
92            begin
93              if lbGrid.Selected[i] then
94              begin
95                Obj := TPCEPat(lbGrid.Items.Objects[i]);
96                if(First) then
97                begin
98                  First := FALSE;
99                  LOU := Obj.Level;
100               end
101               else
102               begin
103                 if(SameLOU) then
104                   SameLOU := (LOU = Obj.Level);
105               end;
106             end;
107           end;
108           if(SameLOU) then
109             cboPatUnderstanding.SelectByID(LOU)
110           else
111             cboPatUnderstanding.Text := '';
112         end
113         else
114         begin
115           cboPatUnderstanding.Text := '';
116         end;
117       finally
118         EndUpdate;
119       end;
120     end;
121   end;
122   
123   initialization
124     SpecifyFormIsNotADialog(TfrmPatientEd);
125   
126   end.

Module Calls (2 levels)


fPatientEd
 ├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)


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