Function

DeleteEmptyEvt

Module

rOrders

Last Modified

7/15/2014 3:26:42 PM

Comments

Event Delay Enhancement

Scope

Interfaced

Declaration

function DeleteEmptyEvt(APtEvntID: string; var APtEvntName: string; Ask: boolean = True): boolean;

Calls Hierarchy


DeleteEmptyEvt
 ├PtEvtEmpty
 ├GetEventName
 └DeletePtEvent

Called-By Hierarchy


                                         DeleteEmptyEvt
                            TfrmOrders.lstSheetsClick┤ 
                       TfraEvntDelayList.CheckMatch┤ │ 
                          TfrmOrdersTS.cmdOKClick┘ │ │ 
TfrmOrdersTS.fraEvntDelayListmlstEventsDblClick┤   │ │ 
                       TfrmOrdersTS.FormKeyDown┘   │ │ 
                 TfraEvntDelayList.mlstEventsChange┤ │ 
   TfrmOrdersTS.fraEvntDelayListcboEvntListChange┤ │ │ 
    TfrmOrdersTS.fraEvntDelayListmlstEventsChange┤ │ │ 
    TfrmMedCopy.fraEvntDelayListcboEvntListChange┤ │ │ 
     TfrmMedCopy.fraEvntDelayListmlstEventsChange┤ │ │ 
 TfrmCopyOrders.fraEvntDelayListcboEvntListChange┤ │ │ 
  TfrmCopyOrders.fraEvntDelayListmlstEventsChange┘ │ │ 
                    TfrmOrders.mnuViewDfltShowClick┤ │ 
                           TfrmOrders.DisplayPage┘ │ │ 
                                          ..(rec)..┤ │ 
                           TfrmOrders.lstWriteClick┤ │ 
                         TfrmOrders.mnuActCopyClick┤ │ 
                         TfrmOrders.mnuActSignClick┤ │ 
                          TfrmOrders.ResetOrderPage┤ │ 
                  TfrmOrders.btnDelayedOrderClick┘ │ │ 
              TfrmOrders.PlaceOrderForDefaultDialog┤ │ 
                 TfrmOrders.DisplayDefaultDlgList┤ │ │ 
                   TfrmOrders.ResetOrderPage...┘ │ │ │ 
                                DisplayEvntDialog┤ │ │ 
                            SetDelayEventForMed┘ │ │ │ 
                     TfrmMeds.mnuActCopyClick┘   │ │ │ 
                                DisplayEvntDialog┤ │ │ 
                                 SetViewForCopy┘ │ │ │ 
                   TfrmOrders.mnuActCopyClick┘   │ │ │ 
                                DisplayEvntDialog┘ │ │ 
                               ExecuteChangeEvt┘   │ │ 
                TfrmOrders.mnuActChgEvntClick┘     │ │ 
                           TfrmOrders.ClickLstSheet┤ │ 
            TfraEvntDelayList.mlstEventsChange...┤ │ │ 
                     TfrmOrders.ResetOrderPage...┤ │ │ 
                        ExecuteReleaseEventOrders┘ │ │ 
                      TfrmOrders.mnuActRelClick┘   │ │ 
                        TfrmOrders.InitOrderSheets2┤ │ 
                     TfrmFrame.mnuFileReviewClick┘ │ │ 
                          TfrmOrders.PtEvtCompleted┤ │ 
                       TfrmFrame.DetermineNextTab┤ │ │ 
                     TfrmFrame.mnuFileOpenClick┤ │ │ │ 
                         TfrmFrame.UMInitiate┤ │ │ │ │ 
                   TfrmFrame.mnuFileNextClick┤ │ │ │ │ 
              TfrmFrame.mnuFileOpenClick...┤ │ │ │ │ │ 
          TfrmFrame.mnuFileNotifRemoveClick┤ │ │ │ │ │ 
                  TfrmFrame.NextButtonClick┘ │ │ │ │ │ 
                TfrmFrame.SetUpNextButton┘   │ │ │ │ │ 
          TfrmFrame.mnuFileOpenClick...┤     │ │ │ │ │ 
                   TfrmFrame.FormResize┘     │ │ │ │ │ 
                 TfrmFrame.ChangeFont┘       │ │ │ │ │ 
         TfrmFrame.LoadSizesForUser┤         │ │ │ │ │ 
    TfrmFrame.LoadUserPreferences┘ │         │ │ │ │ │ 
           TfrmFrame.UMInitiate┘   │         │ │ │ │ │ 
         TfrmFrame.mnuFontSizeClick┘         │ │ │ │ │ 
                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.UpdateCCOWContext┘ │ │ │ 
                TfrmFrame.mnuFileOpenClick...┤   │ │ │ 
              TfrmFrame.ctxContextorCommitted┤   │ │ │ 
               TfrmFrame.StartCCOWContextor┘ │   │ │ │ 
                     TfrmFrame.FormCreate┘   │   │ │ │ 
       TfrmFrame.mnuFileResumeContextGetClick┘   │ │ │ 
                     TfrmFrame.mnuFileReviewClick┤ │ │ 
                     TfrmOrders.lstSheetsClick...┤ │ │ 
                         TfrmOrders.lstWriteClick┤ │ │ 
                         TfrmOrders.mnuActDCClick┤ │ │ 
                    TfrmOrders.mnuActChgEvntClick┤ │ │ 
                       TfrmOrders.mnuActHoldClick┤ │ │ 
                       TfrmOrders.mnuActFlagClick┤ │ │ 
                    TfrmOrders.mnuActCommentClick┤ │ │ 
                     TfrmOrders.mnuActChangeClick┤ │ │ 
                       TfrmOrders.mnuActCopyClick┤ │ │ 
                       TfrmOrders.mnuActSignClick┤ │ │ 
                  TfrmOrders.btnDelayedOrderClick┤ │ │ 
                         TfrmMeds.mnuActCopyClick┤ │ │ 
                          TfrmODActive.btnOKClick┘ │ │ 
                            TfrmOrders.UMEventOccur┤ │ 
                           TfrmMeds.mnuActCopyClick┤ │ 
                            TfrmMeds.mnuActNewClick┤ │ 
                             SetDelayEventForMed...┤ │ 
                                  SetViewForCopy...┤ │ 
                          TfrmCopyOrders.cmdOKClick┤ │ 
                      TfrmCopyOrders.UMStillDelay┤ │ │ 
TfrmCopyOrders.fraEvntDelayListmlstEventsDblClick┤ │ │ 
                       TfrmCopyOrders.FormKeyDown┘ │ │ 
                                ExecuteChangeEvt...┤ │ 
                                    ExecuteDCOrders┘ │ 
                         TfrmOrders.mnuActDCClick┤   │ 
                           TfrmMeds.mnuActDCClick┘   │ 
                     TfrmChgEvent.FilterOutEmptyPtEvt┤ 
                                ExecuteChangeEvt...┤ │ 
                             TfrmChgEvent.Highlight┘ │ 
                              ExecuteChangeEvt...┘   │ 
                                   ExecuteDCOrders...┘ 

Calls

Name Declaration Comments
DeletePtEvent procedure DeletePtEvent(APtEvtID: string); -
GetEventName function GetEventName(const AEvntID: string): string; -
PtEvtEmpty function PtEvtEmpty(APtEvtID: string): Boolean; -

Called-By

Name Declaration Comments
ExecuteDCOrders function ExecuteDCOrders(SelectedList: TList; var DelEvt: boolean): Boolean; -
TfrmChgEvent.FilterOutEmptyPtEvt procedure FilterOutEmptyPtEvt; -
TfrmOrders.lstSheetsClick procedure lstSheetsClick(Sender: TObject); -


Source

2161  function DeleteEmptyEvt(APtEvntID: string; var APtEvntName: string; Ask: boolean): boolean;
2162  const
2163    TX_EVTDEL1 = 'There are no orders tied to ';
2164    TX_EVTDEL2 = ', Would you like to cancel it?';
2165  begin
2166    Result := false;
2167    if APtEvntID = '0' then
2168    begin
2169      Result := True;
2170      Exit;
2171    end;
2172    if PtEvtEmpty(APtEvntID) then
2173    begin
2174      if Length(APtEvntName)=0 then
2175        APtEvntName := GetEventName(APtEvntID);
2176      if Ask then
2177      begin
2178        if InfoBox(TX_EVTDEL1 + APtEvntName + TX_EVTDEL2, 'Confirmation', MB_YESNO or MB_ICONQUESTION) = IDYES then
2179        begin
2180          DeletePtEvent(APtEvntID);
2181          Result := True;
2182        end;
2183      end;
2184      if not Ask then
2185      begin
2186        DeletePtEvent(APtEvntID);
2187        Result := True;
2188      end;
2189  
2190    end;
2191  end;