Function

AcceptOrderWithChecks

Module

fOCAccept

Last Modified

7/15/2014 3:26:40 PM

Scope

Interfaced

Declaration

function AcceptOrderWithChecks(OCList: TStringList): Boolean;

Calls Hierarchy


AcceptOrderWithChecks
 ├TfrmBase508Form.Create
 │ ├TfrmBase508Form.UpdateAccessibilityActions
 │ ├UnfocusableControlEnter
 │ └AdjustControls
 │   ├TfrmBase508Form.ModifyUnfocusableControl
 │   └..(rec)..
 ├IsMonograph
 └GetXtraTxt

Called-By Hierarchy


                                         AcceptOrderWithChecks
                                TfrmODBase.AcceptOrderChecks┤ 
                                      TfrmODBase.ValidSave┘ │ 
                               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┘     │   │ 
                               TfrmODBase.FormCloseQuery┤   │ 
                                     TfrmODBase.TabClose┤   │ 
                            TfrmODAllergy.cmdAcceptClick┘   │ 
                     TfrmRenewOrders.AcceptOrderCheckOnRenew┘ 
                                        ExecuteRenewOrders┘   
                             TfrmOrders.mnuActRenewClick┤     
                               TfrmMeds.mnuActRenewClick┘     

Calls

Name Declaration Comments
TfrmBase508Form.Create constructor Create(AOwner: TComponent); override; -
GetXtraTxt procedure GetXtraTxt(OCText: TStringList; x: String; y: String); -
IsMonograph function IsMonograph(): Boolean; procedure DeleteMonograph(); procedure GetMonographList(ListOfMonographs: TStringList); procedure GetMonograph(Monograph: TStringList; x: Integer); procedure GetXtraTxt(OCText: TStringList; x: String; y: String); function FillerIDForDialog(IEN: Integer): string; function OrderChecksEnabled: Boolean; function OrderChecksOnDisplay(const FillerID: string): string; procedure OrderChecksOnAccept(ListOfChecks: TStringList; const FillerID, StartDtTm: string; OIList: TStringList; DupORIFN: string; Renewal: string); procedure OrderChecksOnDelay(ListOfChecks: TStringList; const FillerID, StartDtTm: string; OIList: TStringList); procedure OrderChecksForSession(ListOfChecks, OrderList: TStringList); procedure SaveOrderChecksForSession(const AReason: string; ListOfChecks: TStringList); function DeleteCheckedOrder(const OrderID: string): Boolean; function DataForOrderCheck(const OrderID: string): string; { Copay } procedure GetCoPay4Orders; procedure SaveCoPayStatus(AList: TStrings); {IMO: inpatient medication for outpatient} function IsValidIMOLoc(LocID: integer; PatientID: string): boolean; -

Called-By

Name Declaration Comments
TfrmRenewOrders.AcceptOrderCheckOnRenew function AcceptOrderCheckOnRenew(const AnOrderID: string; var OCList: TStringList): boolean; -
TfrmODBase.AcceptOrderChecks function AcceptOrderChecks: Boolean; -


Source

31    function AcceptOrderWithChecks(OCList: TStringList): Boolean;
32    var
33      i,j: Integer;
34      frmOCAccept: TfrmOCAccept;
35      substring: String;
36      remOC: TStringList;
37    begin          
38      remOC := TStringList.Create;
39      Result := True;
40      if OCList.Count > 0 then
41      begin
42        frmOCAccept := TfrmOCAccept.Create(Application);
43        try
44          ResizeFormToFont(TForm(frmOCAccept));
45          frmOCAccept.Button1.Enabled := false;
46          if IsMonograph then frmOCAccept.Button1.Enabled := true;
47    
48          for i := 0 to OCList.Count - 1 do
49          begin
50            substring := Copy(Piece(OCList[i], U, 4),0,2);
51            if substring='||' then
52            begin
53              substring := Copy(Piece(OCList[i], U, 4),3,Length(Piece(OCList[i], U, 4)));
54              GetXtraTxt(remOC,Piece(substring,'&',1),Piece(substring,'&',2));
55              frmOCAccept.memChecks.Lines.Add('('+inttostr(i+1)+' of '+inttostr(OCList.Count)+')  ' + Piece(substring,'&',2));
56              for j:= 0 to remOC.Count - 1 do frmOCAccept.memChecks.Lines.Add('      '+remOC[j]);
57    //          frmOCAccept.memChecks.Lines.Add('           ');
58            end
59            else
60            begin
61              frmOCAccept.memChecks.Lines.Add('('+inttostr(i+1)+' of '+inttostr(OCList.Count)+')  ' + Piece(OCList[i], U, 4));
62            end;
63           
64            frmOCAccept.memChecks.Lines.Add('');
65          end;
66          frmOCAccept.memChecks.SelStart := 0;
67          frmOCAccept.memChecks.SelLength := 0;
68          Result := frmOCAccept.ShowModal = mrYes;
69        finally
70          frmOCAccept.Release;
71          remOC.Destroy;
72        end;
73      end;
74    end;