Function

TfrmGAF.BADData

Module

fGAF

Last Modified

7/15/2014 3:26:36 PM

Visibility

Private

Owner

TfrmGAF

Declaration

function BADData(ShowMessage: boolean): boolean;

Calls Hierarchy


TfrmGAF.BADData
 ├ValidateGAFDate
 │ ├TPatient.GetDateDied
 │ │ └DateOfDeath
 │ └FMToday
 │   └FMNow
 ├TPCEProviderList.PCEProvider
 │ ├Check
 │ │ └TPCEProviderList.IndexOfProvider
 │ └TPCEProviderList.PrimaryIEN
 │   └TPCEProviderList.GetPrimaryIdx
 └TPCEProviderList.PCEProviderName
   ├TPCEProviderList.PCEProvider...
   └ExternalName

Called-By Hierarchy


                        TfrmGAF.BADData
           TfrmGAF.cboGAFProviderExit┤ 
               TfrmGAF.AllowTabChange┤ 
                  TfrmGAF.GetGAFScore┤ 
        TfrmEncounterFrame.SendData┘ │ 
TfrmEncounterFrame.FormCloseQuery┘   │ 
                 TfrmGAF.FormActivate┘ 
                   TfrmGAF.FormShow┤   
                 TfrmGAF.FormCreate┘   

Calls

Name Declaration Comments
TPCEProviderList.PCEProvider function PCEProvider: Int64; -
TPCEProviderList.PCEProviderName function PCEProviderName: string; -
ValidateGAFDate function ValidateGAFDate(var GafDate: TFMDateTime): string; -

Called-By

Name Declaration Comments
TfrmGAF.AllowTabChange procedure AllowTabChange(var AllowChange: boolean); override; -
TfrmGAF.cboGAFProviderExit procedure cboGAFProviderExit(Sender: TObject); -
TfrmGAF.FormActivate procedure FormActivate(Sender: TObject); -
TfrmGAF.GetGAFScore procedure GetGAFScore(var Score: integer; var Date: TFMDateTime; var Staff: Int64); -


Source

90    function TfrmGAF.BADData(ShowMessage: boolean): boolean;
91    var
92      PName, msg: string;
93      GAFDate: TFMDateTime;
94      UIEN: Int64;
95    
96    begin
97      GAFDate := dteGAF.FMDateTime;
98      msg := ValidateGAFDate(GAFDate);
99      if(dteGAF.FMDateTime <> GAFDate) then
100       dteGAF.FMDateTime := GAFDate;
101   
102     if(cboGAFProvider.ItemID = '') then
103     begin
104       if(msg <> '') then
105         msg := msg + CRLF;
106       msg := msg + 'A determining party is required to enter a GAF score.';
107       UIEN := uProviders.PCEProvider;
108       if(UIEN <> 0) then
109       begin
110         PName := uProviders.PCEProviderName;
111         msg := msg + '  Determined By changed to ' + PName + '.';
112         cboGAFProvider.SelectByIEN(UIEN);
113         if(cboGAFProvider.ItemID = '') then
114         begin
115           cboGAFProvider.InitLongList(PName);
116           cboGAFProvider.SelectByIEN(UIEN);
117         end;
118       end;
119     end;
120   
121     if(ShowMessage and (msg <> '')) then
122       InfoBox(msg, 'Invalid GAF Data', MB_OK);
123   
124     if(udScore.Position > udScore.Min) then
125       Result := (msg <> '')
126     else
127       Result := FALSE;
128   end;