Procedure

TfrmODMedIn.SetupDialog

Directives

Override

Module

fODMedIn

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public

Overrides

TfrmODBase.SetupDialog

Owner

TfrmODMedIn

Declaration

procedure SetupDialog(OrderAction: Integer; const ID: string); override;

Calls Hierarchy


TfrmODMedIn.SetupDialog
 ├TResponses.SetControl
 │ ├TResponses.FindResponseByName
 │ └AssignBPText
 │   ├DisplayGroupToLinkType
 │   │ └DisplayGroupByName
 │   ├TResponses.EValueFor
 │   ├GetServiceIEN
 │   ├TResponses.IValueFor
 │   ├GetProcedureIEN
 │   ├ExpandOrderObjects
 │   │ ├TdmodShared.BoilerplateOK
 │   │ │ ├ErrCount
 │   │ │ ├AddErr
 │   │ │ └TdmodShared.LoadTIUObjects
 │   │ │   └GetObjectList
 │   │ └GetTemplateText
 │   │   └TEncounter.GetVisitStr
 │   │     └TEncounter.GetVisitCategory
 │   ├SetTemplateDialogCanceled
 │   ├CheckBoilerplate4Fields
 │   ├ExecuteTemplateOrBoilerPlate
 │   └WasTemplateDialogCanceled
 ├TfrmODMedIn.ResetOnMedChange
 │ ├ClearControl
 │ └ResetControl
 ├TfrmODMedIn.SetOnOISelect
 │ ├TCtrlInits.LoadOrderItem
 │ │ ├TCtrlInits.ClearOI
 │ │ └TCtrlInits.ExtractInits
 │ │   └TCtrlInit.Create
 │ ├OIForMedIn
 │ ├TCtrlInits.SetControl
 │ │ ├ClearControl
 │ │ └TCtrlInits.FindInitByName
 │ ├TCtrlInits.DefaultText
 │ │ └TCtrlInits.FindInitByName
 │ ├TfrmODBase.OrderMessage
 │ │ └TfrmODBase.ShowOrderMessage
 │ └TCtrlInits.TextOf
 │   └TCtrlInits.FindInitByName
 ├TfrmODMedIn.SetAltCombo
 │ └TCtrlInits.SetListOnly
 │   └TCtrlInits.FindInitByName
 ├OrderIsReleased
 └TfrmODMedIn.ControlChange
   ├TResponses.Update
   │ ├TResponses.FindResponseByName
   │ └TResponses.IENForPrompt
   └TResponses.GetOrderText
     ├TResponses.NextInstance
     ├TResponses.FindResponseByName
     ├TResponses.FormatResponse
     │ └TResponses.FindResponseByIEN
     └TResponses.AppendChildren
       ├TResponses.FindPromptByIEN
       ├TResponses.FindResponseByIEN
       └TResponses.FormatResponse...

Calls

Name Declaration Comments
TfrmODMedIn.ControlChange procedure ControlChange(Sender: TObject); -
OrderIsReleased function OrderIsReleased(const ID: string): Boolean; -
TfrmODMedIn.ResetOnMedChange procedure ResetOnMedChange; -
TfrmODMedIn.SetAltCombo procedure SetAltCombo; -
TResponses.SetControl procedure SetControl(AControl: TControl; const APromptID: string; AnInstance: Integer); -
TfrmODMedIn.SetOnOISelect procedure SetOnOISelect; -


Source

126   procedure TfrmODMedIn.SetupDialog(OrderAction: Integer; const ID: string);
127   begin
128     inherited;
129     if OrderAction in [ORDER_COPY, ORDER_EDIT, ORDER_QUICK] then with Responses do
130     begin
131       Changing := True;                                     //v12a
132       SetControl(cboMedication, 'ORDERABLE', 1);
133       ResetOnMedChange;                                     //v12a
134       SetOnOISelect;                                        //v12a
135       SetAltCombo;                                          //v12a
136       //cboMedicationSelect(Self);
137       SetControl(cboDispense,   'DRUG',      1);
138       SetControl(txtDosage,     'INSTR',     1);
139       SetControl(cboRoute,      'ROUTE',     1);
140       SetControl(cboSchedule,   'SCHEDULE',  1);
141       SetControl(memComments,   'COMMENT',   1);
142       SetControl(cboPriority,   'URGENCY',   1);
143       { can't edit the orderable item for a med order that has been released }
144       if (OrderAction = ORDER_EDIT) and OrderIsReleased(EditOrder)
145         then FMedCombo.Enabled := False;
146       Changing := False;                                   //v12a
147       ControlChange(Self);                                 //v12a
148     end;
149     if OrderAction <> ORDER_EDIT then SetFocusedControl(FMedCombo);
150   end;