Function

AllowAccessToSensitivePatient

Module

uCore

Last Modified

7/15/2014 3:26:44 PM

Comments

AccessStatus: integer;

Scope

Interfaced

Declaration

function AllowAccessToSensitivePatient(NewDFN: string; var AccessStatus: integer): boolean;

Calls Hierarchy


AllowAccessToSensitivePatient
 ├CheckSensitiveRecordAccess
 ├LogSensitiveRecordAccess
 └TNotifications.DeleteForCurrentUser
   └DeleteAlertForUser

Called-By Hierarchy


              AllowAccessToSensitivePatient
                     TfrmPtSel.cmdOKClick┤ 
           TfrmPtSel.cboPatientDblClick┘ │ 
               TfrmFrame.mnuFileNextClick┘ 
             TfrmFrame.mnuFileOpenClick┤   
                 TfrmFrame.UMInitiate┤ │   
        TfrmFrame.mnuFileNextClick...┤ │   
        TfrmFrame.mnuFileRefreshClick┤ │   
        TfrmOrders.CheckOrderStatus┤ │ │   
    TfrmOrders.mnuActChgEvntClick┤ │ │ │   
       TfrmOrders.mnuActHoldClick┤ │ │ │   
     TfrmOrders.mnuActUnholdClick┤ │ │ │   
      TfrmOrders.mnuActRenewClick┤ │ │ │   
     TfrmOrders.mnuActChangeClick┤ │ │ │   
       TfrmOrders.mnuActCopyClick┘ │ │ │   
             TfrmMeds.mnuActDCClick┤ │ │   
            TfrmMeds.CheckMedStatus┘ │ │   
         TfrmMeds.mnuActHoldClick┤   │ │   
        TfrmMeds.mnuActRenewClick┤   │ │   
       TfrmMeds.mnuActUnholdClick┤   │ │   
       TfrmMeds.mnuActChangeClick┤   │ │   
         TfrmMeds.mnuActCopyClick┤   │ │   
       TfrmMeds.mnuActRefillClick┘   │ │   
                   TfrmFrame.ViewInfo┘ │   
                TfrmDCSumm.ViewInfo┤   │   
              TfrmConsults.ViewInfo┤   │   
      TfrmFrame.pnlRemindersMouseUp┤   │   
       TfrmFrame.RemindersChanged┘ │   │   
           TfrmFrame.FormCreate┘   │   │   
             TfrmFrame.pnlCIRNClick┤   │   
       TfrmFrame.pnlVistaWebClick┤ │   │   
            TfrmFrame.FormKeyDown┘ │   │   
          TfrmFrame.pnlPatientClick┤   │   
            TfrmFrame.pnlVisitClick┤   │   
      TfrmFrame.pnlPrimaryCareClick┤   │   
        TfrmFrame.pnlRemindersClick┤   │   
         TfrmFrame.pnlPostingsClick┤   │   
             TfrmFrame.pnlFlagClick┤   │   
               TfrmFrame.laMHVClick┤   │   
              TfrmFrame.laVAA2Click┤   │   
                TfrmOrders.ViewInfo┤   │   
                  TfrmMeds.ViewInfo┤   │   
               TfrmSurgery.ViewInfo┤   │   
                 TfrmNotes.ViewInfo┤   │   
              TfrmProblems.ViewInfo┘   │   
      TfrmFrame.mnuFileNotifRemoveClick┤   
              TfrmFrame.NextButtonClick┘   
            TfrmFrame.SetUpNextButton┘     
      TfrmFrame.mnuFileOpenClick...┤       
               TfrmFrame.FormResize┘       
             TfrmFrame.ChangeFont┘         
     TfrmFrame.LoadSizesForUser┤           
TfrmFrame.LoadUserPreferences┘ │           
       TfrmFrame.UMInitiate┘   │           
     TfrmFrame.mnuFontSizeClick┘           

Calls

Name Declaration Comments
CheckSensitiveRecordAccess procedure CheckSensitiveRecordAccess(const DFN: string; var AccessStatus: Integer; var MessageText: string); -
TNotifications.DeleteForCurrentUser procedure DeleteForCurrentUser; -
LogSensitiveRecordAccess function LogSensitiveRecordAccess(const DFN: string): Boolean; -

Called-By

Name Declaration Comments
TfrmPtSel.cmdOKClick procedure cmdOKClick(Sender: TObject); -
TfrmFrame.mnuFileNextClick procedure mnuFileNextClick(Sender: TObject); -


Source

461   function AllowAccessToSensitivePatient(NewDFN: string; var AccessStatus: integer): boolean;
462   const
463     TX_DGSR_ERR    = 'Unable to perform sensitive record checks';
464     TC_DGSR_ERR    = 'Error';
465     TC_DGSR_SHOW   = 'Restricted Record';
466     TC_DGSR_DENY   = 'Access Denied';
467     TX_DGSR_YESNO  = CRLF + 'Do you want to continue processing this patient record?';
468     TC_NEXT_NOTIF  = 'NEXT NOTIFICATION:  ';
469   var
470     //AccessStatus: integer;
471     AMsg, PrefixC, PrefixT: string;
472   begin
473     Result := TRUE;
474     if Notifications.Active then
475     begin
476       PrefixT := Piece(Notifications.RecordID, U, 1) + CRLF + CRLF;
477       PrefixC := TC_NEXT_NOTIF;
478     end
479     else
480     begin
481       PrefixT := '';
482       PrefixC := '';
483     end;
484     CheckSensitiveRecordAccess(NewDFN, AccessStatus, AMsg);
485     case AccessStatus of
486     DGSR_FAIL: begin
487                  InfoBox(PrefixT + TX_DGSR_ERR, PrefixC + TC_DGSR_ERR, MB_OK);
488                  Result := FALSE;
489                end;
490     DGSR_NONE: { Nothing - allow access to the patient. };
491     DGSR_SHOW: InfoBox(PrefixT + AMsg, PrefixC + TC_DGSR_SHOW, MB_OK);
492     DGSR_ASK:  if InfoBox(PrefixT + AMsg + TX_DGSR_YESNO, PrefixC + TC_DGSR_SHOW, MB_YESNO or MB_ICONWARNING or
493                  MB_DEFBUTTON2) = IDYES then LogSensitiveRecordAccess(NewDFN)
494                else Result := FALSE;
495     else       begin
496                  InfoBox(PrefixT + AMsg, PrefixC + TC_DGSR_DENY, MB_OK);
497                  if Notifications.Active then Notifications.DeleteForCurrentUser;
498                  Result := FALSE;
499                end;
500     end;
501   end;