Procedure

LateTrayCheck

Module

fODDietLT

Last Modified

7/15/2014 3:26:42 PM

Scope

Interfaced

Declaration

procedure LateTrayCheck(SomeResponses: TResponses; EventId: integer; IsOutpatient: boolean; var LateTrayFields: TLateTrayFields);

Calls Hierarchy


LateTrayCheck
 ├TResponses.FindResponseByName
 └CheckLateTray
   ├StrToFMDateTime
   ├FMToday
   │ └FMNow
   ├FMNow
   ├LoadDietParams
   ├SetAvailTimes
   │ └AMPMToFMTime
   └TfrmBase508Form.Create
     ├TfrmBase508Form.UpdateAccessibilityActions
     ├UnfocusableControlEnter
     └AdjustControls
       ├TfrmBase508Form.ModifyUnfocusableControl
       └..(rec)..

Called-By Hierarchy


                                             LateTrayCheck
                               TfrmODBase.cmdAcceptClick┤ 
                                   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┘     │ 
                               TfrmODDiet.cmdAcceptClick┘ 
                            TfrmODDiet.nbkDietChanging┘   

Calls

Name Declaration Comments
CheckLateTray procedure CheckLateTray(const StartTime: string; var LateTrayFields: TLateTrayFields; IsOutpatient: boolean; AMeal: char = #0); -
TResponses.FindResponseByName function FindResponseByName(const APromptID: string; AnInstance: Integer): TResponse; -

Called-By

Name Declaration Comments
TfrmODBase.cmdAcceptClick procedure cmdAcceptClick(Sender: TObject); -
TfrmODDiet.cmdAcceptClick procedure cmdAcceptClick(Sender: TObject); -


Source

196   procedure LateTrayCheck(SomeResponses: TResponses; EventId: integer; IsOutpatient: boolean; var LateTrayFields: TLateTrayFields);
197   var
198     AResponse, AnotherResponse: TResponse;
199   begin
200     if IsOutpatient then
201     begin
202       AResponse := SomeResponses.FindResponseByName('ORDERABLE', 1);
203       if (EventID = 0) and (AResponse <> nil) and (Copy(AResponse.EValue, 1, 3) <> 'NPO') then
204       begin
205         AResponse := SomeResponses.FindResponseByName('START', 1);
206         AnotherResponse := SomeResponses.FindResponseByName('MEAL', 1);
207         if (AResponse <> nil) and (AnotherResponse <> nil) then
208           CheckLateTray(AResponse.IValue, LateTrayFields, True, CharAt(AnotherResponse.IValue, 1));
209       end;
210     end
211     else
212     begin
213       AResponse := SomeResponses.FindResponseByName('ORDERABLE', 1);
214       if (EventID = 0) and (AResponse <> nil) and (Copy(AResponse.EValue, 1, 3) <> 'NPO') then
215       begin
216         AResponse := SomeResponses.FindResponseByName('START', 1);
217         if AResponse <> nil then CheckLateTray(AResponse.IValue, LateTrayFields, False);
218       end;
219     end;
220   end;