Function

AMPMToFMTime

Module

fODDietLT

Last Modified

7/15/2014 3:26:42 PM

Scope

Local

Local subprogram to

CheckLateTray

Declaration

function AMPMToFMTime(const x: string): Extended;

Called-By Hierarchy


                                                    AMPMToFMTime
                                                 SetAvailTimes┘ 
                                               CheckLateTray┘   
                                             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┘         

Called-By

Name Declaration Comments
SetAvailTimes procedure SetAvailTimes(ATime: Extended; var ACount: Integer; var TimeList: string); -


Source

61    function AMPMToFMTime(const x: string): Extended;
62    var
63      IntTime: Integer;
64    begin
65      Result := 0;
66      if Pos(':', x) = 0 then Exit;
67      IntTime := StrToIntDef(Piece(x, ':', 1) + Copy(Piece(x, ':', 2), 1, 2), 0);
68      if (Pos('P', x) > 0) and (IntTime < 1200) then IntTime := IntTime + 1200;
69      if (Pos('A', x) > 0) and (IntTime > 1200) then IntTime := IntTime - 1200;
70      Result := IntTime / 10000;
71    end;