Function

DaysToQty

Module

rODMeds

Last Modified

7/15/2014 3:26:42 PM

Scope

Interfaced

Declaration

function DaysToQty(DaysSupply: Integer; const UnitsPerDose, Schedule, Duration, Drug: string): Integer;

Called-By Hierarchy


                                                 DaysToQty
                                  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┘     │ 
                          TfrmODMeds.UpdateDefaultSupply┤ 
                       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┘     │ 
                         TfrmODMeds.UpdateSupplyQuantity┘ 
                    TfrmODMeds.timCheckChangesTimer...┘   

Called-By

Name Declaration Comments
TfrmODMeds.UpdateDefaultSupply procedure UpdateDefaultSupply(const CurUnits, CurSchedule, CurDuration, CurDispDrug: string; var CurSupply: Integer; var CurQuantity: double; var SkipQtyCheck: Boolean); -
TfrmODMeds.UpdateSupplyQuantity procedure UpdateSupplyQuantity(const CurUnits, CurSchedule, CurDuration, CurDispDrug, CurInstruct: string; var CurSupply: Integer; var CurQuantity: double); -
ValidateDrugAutoAccept function ValidateDrugAutoAccept(tempDrug, tempUnit, tempSch, tempDur: string; OI, tempSupply, tempRefills: integer; tempQuantity: Double): boolean; -


Source

240   function DaysToQty(DaysSupply: Integer; const UnitsPerDose, Schedule, Duration, Drug: string): Integer;
241   begin
242     Result := StrToIntDef(sCallV('ORWDPS2 DAY2QTY',
243       [DaysSupply, UnitsPerDose, Schedule, Duration, Patient.DFN, Drug]), 0);
244     if uDrugHasMaxData.CaptureMaxData = True then uDrugHasMaxData.MaxQuantity := Result;
245   end;