Function

CalcMaxRefills

Module

rODMeds

Last Modified

7/15/2014 3:26:42 PM

Scope

Interfaced

Declaration

function CalcMaxRefills(const Drug: string; Days, OrdItem: Integer; Discharge: Boolean): Integer;

Called-By Hierarchy


                                            CalcMaxRefills
                                  ValidateDrugAutoAccept┤ 
                                   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┘     │ 
                               ExecuteChangeRenewedOrder┤ 
                                       ChangeOrders...┘ │ 
                                TfrmODMeds.UpdateRefills┤ 
                                   TfrmODMeds.Validate┤ │ 
                       TfrmODMeds.timCheckChangesTimer┘ │ 
                            TfrmODMeds.UpdateRelated┘   │ 
                            TfrmODMeds.SetupDialog┤     │ 
                         TfrmODMeds.btnSelectClick┤     │ 
                         TfrmODMeds.UMDelayClick┘ │     │ 
                         TfrmODMeds.cboDosageClick┤     │ 
                       TfrmODMeds.cboDosageKeyUp┘ │     │ 
                        TfrmODMeds.cboDosageChange┤     │ 
                          TfrmODMeds.cboDosageExit┤     │ 
                       TfrmODMeds.cboScheduleClick┤     │ 
                       TfrmODMeds.cmdAcceptClick┤ │     │ 
                          TfrmODMeds.chkPRNClick┤ │     │ 
                          TfrmODMeds.txtNSSClick┤ │     │ 
                     TfrmODMeds.cboScheduleEnter┤ │     │ 
                     TfrmODMeds.UMShowNSSBuilder┘ │     │ 
                      TfrmODMeds.cboScheduleChange┤     │ 
                        TfrmODMeds.txtSupplyChange┤     │ 
                      TfrmODMeds.txtQuantityChange┤     │ 
                           TfrmODMeds.grdDosesExit┤     │ 
                       TfrmODMeds.cboXDosageChange┤     │ 
                        TfrmODMeds.cboXDosageClick┤     │ 
                       TfrmODMeds.cboXDosageExit┤ │     │ 
                      TfrmODMeds.cboXDosageKeyUp┘ │     │ 
                         TfrmODMeds.cboXDosageExit┤     │ 
                     TfrmODMeds.cboXScheduleChange┤     │ 
                          TfrmODMeds.txtNSSClick┘ │     │ 
                      TfrmODMeds.cboXScheduleClick┤     │ 
                         TfrmODMeds.chkXPRNClick┤ │     │ 
                     TfrmODMeds.pnlXScheduleExit┘ │     │ 
                       TfrmODMeds.pnlXScheduleExit┤     │ 
                     TfrmODMeds.txtXDurationChange┤     │ 
                     TfrmODMeds.popDurationClick┘ │     │ 
                       TfrmODMeds.pnlXDurationExit┤     │ 
                            TfrmODMeds.chkPRNClick┤     │ 
                        TfrmODMeds.cboScheduleExit┤     │ 
                         TfrmODMeds.cboDosageKeyUp┤     │ 
                        TfrmODMeds.cboXDosageKeyUp┘     │ 
                                      ExecuteRenewOutMed┘ 
                        TfrmRenewOrders.cmdChangeClick┘   

Called-By

Name Declaration Comments
ExecuteChangeRenewedOrder procedure ExecuteChangeRenewedOrder(const AnID: string; var param1, param2: string; Category: integer; AnEvent: TOrderDelayEvent); -
ExecuteRenewOutMed function ExecuteRenewOutMed(var Refills: Integer; var Comments, Pickup: string; AnOrder: TOrder): Boolean; -
TfrmODMeds.UpdateRefills procedure UpdateRefills(const CurDispDrug: string; CurSupply: Integer); -
ValidateDrugAutoAccept function ValidateDrugAutoAccept(tempDrug, tempUnit, tempSch, tempDur: string; OI, tempSupply, tempRefills: integer; tempQuantity: Double): boolean; -


Source

258   function CalcMaxRefills(const Drug: string; Days, OrdItem: Integer; Discharge: Boolean): Integer;
259   begin
260     Result := StrToIntDef(sCallV('ORWDPS2 MAXREF', [Patient.DFN, Drug, Days, OrdItem, Discharge]), 0);
261     if uDrugHasMaxData.CaptureMaxData = True then uDrugHasMaxData.MaxRefills := Result;
262   end;