Function

IsIMODialog

Module

uOrders

Last Modified

7/15/2014 3:26:42 PM

Comments

Inpatient medication for Outpatient
function GetQOAltOI: integer;
begin
  Result := QOAltOI.OI;
end; 

IMO

Scope

Interfaced

Declaration

function IsIMODialog(DlgID: integer): boolean;

Calls Hierarchy


IsIMODialog
 ├IMOTimeFrame
 │ └FMNow
 ├IsInptQO
 ├IsIVQO
 └IsValidIMOLoc

Called-By Hierarchy


                                             IsIMODialog
                                   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┘     

Calls

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

Called-By

Name Declaration Comments
ActivateOrderDialog function ActivateOrderDialog(const AnID: string; AnEvent: TOrderDelayEvent; AnOwner: TComponent; ARefNum: Integer; ANeedVerify: boolean = True): Boolean; -


Source

2104  function IsIMODialog(DlgID: integer): boolean; //IMO
2105  var
2106    IsInptDlg, IsIMOLocation: boolean;
2107    Td: TFMDateTime;
2108  begin
2109    result := False;
2110    IsInptDlg := False;
2111    //CQ #15188 - allow IMO functionality 23 hours after encounter date/time - TDP
2112    //Td := FMToday;
2113    Td := IMOTimeFrame;
2114    if ( (DlgID = MedsInDlgIen) or (DlgID = MedsIVDlgIen) or (IsInptQO(dlgId)) or (IsIVQO(dlgId))) then IsInptDlg := TRUE;
2115    IsIMOLocation := IsValidIMOLoc(Encounter.Location,Patient.DFN);
2116    if (IsInptDlg or IsInptQO(DlgID)) and (not Patient.Inpatient) and IsIMOLocation and (Encounter.DateTime > Td) then
2117      result := True;
2118  end;