Function

AllowActionOnIMO

Module

uOrders

Last Modified

7/15/2014 3:26:42 PM

Scope

Interfaced

Declaration

function AllowActionOnIMO(AnEvtTyp: char): boolean;

Calls Hierarchy


AllowActionOnIMO
 ├FMToday
 │ └FMNow
 ├IsValidIMOLoc
 └IMOTimeFrame
   └FMNow

Called-By Hierarchy


                                          AllowActionOnIMO
                                     IMOActionValidation┘ 
                                   ActivateOrderDialog┤   
                           TfrmRemDlg.btnFinishClick┤ │   
           TfrmConsults.mnuActNewConsultRequestClick┤ │   
                   TfrmConsults.cmdNewConsultClick┘ │ │   
                TfrmConsults.mnuActNewProcedureClick┤ │   
                      TfrmConsults.cmdNewProcClick┘ │ │   
                                        ChangeOrders┤ │   
                      TfrmOrders.mnuActChangeClick┤ │ │   
                        TfrmMeds.mnuActChangeClick┘ │ │   
                                     ChangeOrdersEvt┤ │   
                                          CopyOrders┤ │   
                        TfrmOrders.mnuActCopyClick┤ │ │   
                          TfrmMeds.mnuActCopyClick┤ │ │   
                           TfrmODActive.btnOKClick┘ │ │   
                                      TransferOrders┤ │   
                        TfrmOrders.mnuActCopyClick┤ │ │   
                          TfrmMeds.mnuActCopyClick┤ │ │   
                           TfrmODActive.btnOKClick┘ │ │   
                            TfrmOrders.lstWriteClick┤ │   
               TfrmOrders.PlaceOrderForDefaultDialog┤ │   
                  TfrmOrders.DisplayDefaultDlgList┤ │ │   
                       TfrmOrders.ResetOrderPage┘ │ │ │   
               TfrmOrders.btnDelayedOrderClick┘   │ │ │   
                                 DisplayEvntDialog┤ │ │   
                             SetDelayEventForMed┘ │ │ │   
                      TfrmMeds.mnuActCopyClick┘   │ │ │   
                                 DisplayEvntDialog┤ │ │   
                                  SetViewForCopy┘ │ │ │   
                    TfrmOrders.mnuActCopyClick┘   │ │ │   
                                 DisplayEvntDialog┘ │ │   
                                ExecuteChangeEvt┘   │ │   
                 TfrmOrders.mnuActChgEvntClick┘     │ │   
                             TfrmMeds.mnuActNewClick┤ │   
                           TfrmOMNavA.ActivateDialog┤ │   
                         TfrmOMNavA.grdMenuKeyDown┤ │ │   
                         TfrmOMNavA.grdMenuMouseUp┘ │ │   
                                TfrmOMSet.DoNextItem┘ │   
                              TfrmOMSet.InsertList┤   │   
                               ActivateOrderList┘ │   │   
                     TfrmRemDlg.btnFinishClick┤   │   │   
                             ActivateOrderHTML┤   │   │   
                    TfrmOrders.lstWriteClick┤ │   │   │   
    TfrmOrders.PlaceOrderForDefaultDialog...┘ │   │   │   
                              ActivateOrderSet┤   │   │   
                   TfrmRemDlg.btnFinishClick┤ │   │   │   
TfrmConsults.mnuActNewConsultRequestClick...┤ │   │   │   
     TfrmConsults.mnuActNewProcedureClick...┤ │   │   │   
                    TfrmOrders.lstWriteClick┤ │   │   │   
    TfrmOrders.PlaceOrderForDefaultDialog...┤ │   │   │   
                     TfrmMeds.mnuActNewClick┤ │   │   │   
                TfrmOMNavA.ActivateDialog...┤ │   │   │   
                     TfrmOMSet.DoNextItem...┘ │   │   │   
                       TfrmOMNavA.DoSelectList┘   │   │   
                     TfrmOMNavA.grdMenuKeyUp┤     │   │   
                   TfrmOMNavA.grdMenuMouseUp┘     │   │   
                                        SkipToNext┤   │   
                         TfrmOMSet.DoNextItem...┘ │   │   
                            TfrmOMSet.UMDelayEvent┘   │   
                                    ExecuteRenewOrders┘   
                         TfrmOrders.mnuActRenewClick┤     
                           TfrmMeds.mnuActRenewClick┘     

Calls

Name Declaration Comments
FMToday function FMToday: TFMDateTime; -
IMOTimeFrame function IMOTimeFrame: TFMDateTime; -
IsValidIMOLoc function IsValidIMOLoc(LocID: integer; PatientID: string): boolean; -

Called-By

Name Declaration Comments
IMOActionValidation function IMOActionValidation(AnId: string; var IsIMOOD: boolean; var x: string; AnEventType: char): boolean; -


Source

2120  function AllowActionOnIMO(AnEvtTyp: char): boolean;
2121  var
2122    Td: TFMDateTime;
2123  begin
2124    Result := False;
2125    if (Patient.Inpatient) then
2126    begin
2127      Td := FMToday;
2128      if IsValidIMOLoc(Encounter.Location,Patient.DFN) and (Encounter.DateTime > Td) then
2129        Result := True;
2130    end
2131    else
2132    begin
2133      //CQ #15188 - allow IMO functionality 23 hours after encounter date/time - TDP
2134      //Td := FMToday;
2135      Td := IMOTimeFrame;
2136      if IsValidIMOLoc(Encounter.Location,Patient.DFN) and (Encounter.DateTime > Td) then
2137        Result := True
2138      else if AnEvtTyp in ['A','T'] then
2139        Result := True;
2140    end;
2141  end;