Procedure

TfrmODMedIn.cboMedicationSelect

Module

fODMedIn

Last Modified

7/15/2014 3:26:42 PM

Comments

Sets related controls whenever orderable item changes (MouseClick or Exit)

Visibility

Public/Published

Owner

TfrmODMedIn

Declaration

procedure cboMedicationSelect(Sender: TObject);

Calls Hierarchy


TfrmODMedIn.cboMedicationSelect
 ├TResponses.Clear
 ├TfrmODMedIn.ResetOnMedChange
 │ ├ClearControl
 │ └ResetControl
 ├TResponses.SetQuickOrder
 │ ├TResponses.Clear
 │ └LoadResponses
 │   └ExtractToResponses
 │     └ExpandOrderObjects
 │       ├TdmodShared.BoilerplateOK
 │       │ ├ErrCount
 │       │ ├AddErr
 │       │ └TdmodShared.LoadTIUObjects
 │       │   └GetObjectList
 │       └GetTemplateText
 │         └TEncounter.GetVisitStr
 │           └TEncounter.GetVisitCategory
 ├TResponses.SetControl
 │ ├TResponses.FindResponseByName
 │ └AssignBPText
 │   ├DisplayGroupToLinkType
 │   │ └DisplayGroupByName
 │   ├TResponses.EValueFor
 │   ├GetServiceIEN
 │   ├TResponses.IValueFor
 │   ├GetProcedureIEN
 │   ├ExpandOrderObjects...
 │   ├SetTemplateDialogCanceled
 │   ├CheckBoilerplate4Fields
 │   ├ExecuteTemplateOrBoilerPlate
 │   └WasTemplateDialogCanceled
 ├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.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...
 ├TfrmODMedIn.SetAltCombo
 │ └TCtrlInits.SetListOnly
 │   └TCtrlInits.FindInitByName
 └TfrmODMedIn.cboDispenseMouseClick
   ├TfrmODMedIn.CheckFormAlt
   │ ├SelectFormularyAlt
   │ │ ├LoadFormularyAlt
   │ │ └TfrmBase508Form.Create
   │ │   ├TfrmBase508Form.UpdateAccessibilityActions
   │ │   ├UnfocusableControlEnter
   │ │   └AdjustControls
   │ │     ├TfrmBase508Form.ModifyUnfocusableControl
   │ │     └..(rec)..
   │ └TfrmODMedIn.cboMedicationSelect...
   ├TfrmODBase.OrderMessage...
   └DispenseMessage

Called-By Hierarchy


         TfrmODMedIn.cboMedicationSelect
              TfrmODMedIn.CheckFormAlt┘ 
         TfrmODMedIn.cboDispenseExit┤   
   TfrmODMedIn.cboDispenseMouseClick┘   
TfrmODMedIn.cboMedicationSelect...┘     

Calls

Name Declaration Comments
TfrmODMedIn.cboDispenseMouseClick procedure cboDispenseMouseClick(Sender: TObject); -
TResponses.Clear procedure Clear; overload; -
TfrmODMedIn.ControlChange procedure ControlChange(Sender: TObject); -
TfrmODMedIn.ResetOnMedChange procedure ResetOnMedChange; -
TfrmODMedIn.SetAltCombo procedure SetAltCombo; -
TResponses.SetControl procedure SetControl(AControl: TControl; const APromptID: string; AnInstance: Integer); -
TfrmODMedIn.SetOnOISelect procedure SetOnOISelect; -
TResponses.SetQuickOrder procedure SetQuickOrder(AnIEN: Integer); -

Called-By

Name Declaration Comments
TfrmODMedIn.CheckFormAlt procedure CheckFormAlt; -


Source

253   procedure TfrmODMedIn.cboMedicationSelect(Sender: TObject);
254   { sets related controls whenever orderable item changes (MouseClick or Exit) }
255   begin
256     inherited;
257     with FMedCombo do
258     begin
259       if ItemID <> FLastMedID then FLastMedID := ItemID else Exit;
260       Changing := True;
261       if Sender <> Self then Responses.Clear;       // Sender=Self when called from SetupDialog
262       ResetOnMedChange;
263       if CharAt(ItemID, 1) = 'Q' then
264       begin
265         Responses.QuickOrder := ExtractInteger(ItemID);
266         Responses.SetControl(FMedCombo, 'ORDERABLE', 1);
267       end;
268       if ItemIEN > 0 then SetOnOISelect;
269     end;
270     with Responses do if QuickOrder > 0 then
271     begin
272       SetControl(FMedCombo,     'ORDERABLE', 1);
273       SetControl(cboDispense,   'DRUG',      1);
274       SetControl(txtDosage,     'INSTR',     1);
275       SetControl(cboRoute,      'ROUTE',     1);
276       SetControl(cboSchedule,   'SCHEDULE',  1);
277       SetControl(memComments,   'COMMENT',   1);
278       SetControl(cboPriority,   'URGENCY',   1);
279     end;
280     Changing := False;
281     ControlChange(Self);
282     if FMedCombo = cboMedication then SetAltCombo;
283     // if the Dispense drug was stuffed - still do the checks (form alt, refills)
284     if cboDispense.ItemIndex > -1 then cboDispenseMouseClick(Self);
285   end;