Changeset 460 for cprs/branches/foia-cprs/CPRS-Chart/Orders/rODAllergy.pas
- Timestamp:
- Jul 6, 2008, 8:20:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/foia-cprs/CPRS-Chart/Orders/rODAllergy.pas
r459 r460 49 49 end; 50 50 51 TARTClinUser = record 52 IsClinUser: boolean; 53 ReasonFailed: string; 54 AccessChecked: boolean; 55 end; 56 51 57 function SearchForAllergies(StringToMatch: string): TStrings; 52 58 function SubsetofSymptoms(const StartFrom: string; Direction: Integer): TStrings; … … 64 70 function RequireOriginatorComments: boolean; 65 71 function EnableErrorComments: boolean; 72 function IsARTClinicalUser(var AMessage: string): boolean; 66 73 67 74 implementation … … 73 80 uARTPatchInstalled: TARTPatchInstalled; 74 81 uGMRASiteParams: TGMRASiteParams; 82 uARTClinUser: TARTClinUser; 75 83 76 84 function ODForAllergies: TStrings; … … 326 334 end; 327 335 336 (*function IsARTClinicalUser(var AMessage: string): boolean; 337 const 338 TX_NO_AUTH = 'You are not authorized to perform this action.' + CRLF + 339 'Either the ORES or ORELSE key is required.'; 340 begin 341 Result := (User.UserClass > UC_CLERK); // User has ORES or ORELSE key 342 if not Result then AMessage := TX_NO_AUTH else AMessage := ''; 343 end;*) 344 345 function IsARTClinicalUser(var AMessage: string): boolean; 346 const 347 TX_NO_AUTH = 'You are not authorized to perform this action.' + CRLF; 348 var 349 x: string; 350 begin 351 with uARTClinUser do 352 begin 353 if not AccessChecked then 354 begin 355 x := sCallV('ORWDAL32 CLINUSER',[nil]); 356 IsClinUser := (Piece(x, U, 1) = '1'); 357 if not IsClinUser then ReasonFailed := TX_NO_AUTH + Piece(x, U, 2) else ReasonFailed := ''; 358 AccessChecked := True; 359 end; 360 Result := IsClinUser; 361 AMessage := ReasonFailed ; 362 end; 363 end; 364 328 365 end.
Note:
See TracChangeset
for help on using the changeset viewer.