Procedure

ResetDialogProperties

Module

uOrders

Last Modified

7/15/2014 3:26:42 PM

Scope

Interfaced

Declaration

procedure ResetDialogProperties(const AnID: string; AnEvent: TOrderDelayEvent; var ResolvedDialog: TOrderDialogResolved);

Calls Hierarchy


ResetDialogProperties
 └IsPassEvt

Called-By Hierarchy


                                   ResetDialogProperties
                                   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┘     

Calls

Name Declaration Comments
IsPassEvt function IsPassEvt(APtEvtID: integer; APtEvtType: char): boolean; -

Called-By

Name Declaration Comments
ActivateOrderDialog function ActivateOrderDialog(const AnID: string; AnEvent: TOrderDelayEvent; AnOwner: TComponent; ARefNum: Integer; ANeedVerify: boolean = True): Boolean; -


Source

450   procedure ResetDialogProperties(const AnID: string; AnEvent: TOrderDelayEvent; var ResolvedDialog: TOrderDialogResolved);
451   begin
452     if StrToIntDef(AnID,0)>0 then
453       Exit;
454     if XfInToOutNow then
455     begin
456       ResolvedDialog.DisplayGroup := OutptDisp;
457       ResolvedDialog.DialogIEN    := MedsOutDlgIen;
458       ResolvedDialog.FormID       := MedsOutDlgFormID;
459       ResolvedDialog.QuickLevel   := 0;
460       Exit;
461     end;
462     //if ResolvedDialog.DisplayGroup in [MedsDisp, OutptDisp, InptDisp, NonVADisp, ClinDisp] then
463     if (ResolvedDialog.DisplayGroup = InptDisp) or
464       (ResolvedDialog.DisplayGroup = OutptDisp) or
465       (ResolvedDialog.DisplayGroup = MedsDisp) or
466       (ResolvedDialog.DisplayGroup =  NonVADisp) or
467       (ResolvedDialog.DisplayGroup =  ClinDisp) then
468     begin
469       if (AnEvent.EventType <> 'D') and (AnEvent.EventIFN > 0) then
470       begin
471         if (AnEvent.EventType = 'T') and IsPassEvt(AnEvent.PtEventIFN,'T') then
472         begin
473           ResolvedDialog.DisplayGroup := OutptDisp;
474           ResolvedDialog.DialogIEN    := MedsOutDlgIen;
475           ResolvedDialog.FormID       := MedsOutDlgFormID;
476           ResolvedDialog.QuickLevel   := 0;
477         end
478         else
479         begin
480           //AGP changes to handle IMO INV Dialog opening the unit dose dialog.
481           if (ResolvedDialog.DisplayGroup = ClinDisp) and (Resolveddialog.DialogIEN = MedsIVDlgIEN) and (ResolvedDialog.FormID = MedsIVDlgFormId) then
482             begin
483               ResolvedDialog.DisplayGroup := IVDisp;
484               ResolvedDialog.DialogIEN    := MedsIVDlgIen;
485               ResolvedDialog.FormID       := MedsIVDlgFormId;
486             end
487           else
488             begin
489               ResolvedDialog.DisplayGroup := InptDisp;
490               ResolvedDialog.DialogIEN    := MedsInDlgIen;
491               ResolvedDialog.FormID       := MedsInDlgFormId;
492             end;
493           if Length(ResolvedDialog.ShowText)>0 then
494             ResolvedDialog.QuickLevel   := 2;
495         end;
496       end
497       else if (AnEvent.EventType = 'D') and (AnEvent.EventIFN > 0) then
498       begin
499         ResolvedDialog.DisplayGroup := OutptDisp;
500         ResolvedDialog.DialogIEN    := MedsOutDlgIen;
501         ResolvedDialog.FormID       := MedsOutDlgFormID;
502         ResolvedDialog.QuickLevel   := 0;
503       end;
504   
505       if XferOutToInOnMeds then
506       begin
507         ResolvedDialog.DisplayGroup := InptDisp;
508         ResolvedDialog.DialogIEN    := MedsInDlgIen;
509         ResolvedDialog.FormID       := MedsInDlgFormId;
510         ResolvedDialog.QuickLevel := 0;
511       end;
512     end;
513     if ResolvedDialog.DisplayGroup = IVDisp then
514     begin
515       if Length(ResolvedDialog.ShowText)>0 then
516         ResolvedDialog.QuickLevel   := 2;
517     end;
518     if (CharAt(AnID,1) = 'C') and (ResolvedDialog.DisplayGroup in [CsltDisp, ProcDisp]) then
519       ResolvedDialog.QuickLevel   := 0;  // CSV - force dialog, to validate ICD code being copied into new order {RV}
520   end;