Procedure

TfrmODMedOut.cboMedicationSelect

Module

fODMedOut

Last Modified

7/15/2014 3:26:42 PM

Comments

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

Visibility

Public/Published

Owner

TfrmODMedOut

Declaration

procedure cboMedicationSelect(Sender: TObject);

Calls Hierarchy


TfrmODMedOut.cboMedicationSelect
 ├TResponses.Clear
 ├TfrmODMedOut.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
 ├TfrmODMedOut.SetOnOISelect
 │ ├TCtrlInits.LoadOrderItem
 │ │ ├TCtrlInits.ClearOI
 │ │ └TCtrlInits.ExtractInits
 │ │   └TCtrlInit.Create
 │ ├OIForMedOut
 │ ├TCtrlInits.SetControl
 │ │ ├ClearControl
 │ │ └TCtrlInits.FindInitByName
 │ ├TCtrlInits.DefaultText
 │ │ └TCtrlInits.FindInitByName
 │ ├TfrmODMedOut.SetupNouns
 │ │ ├TCtrlInits.SetPopupMenu
 │ │ │ └TCtrlInits.FindInitByName
 │ │ └TfrmODMedOut.UnitClick
 │ ├TfrmODBase.OrderMessage
 │ │ └TfrmODBase.ShowOrderMessage
 │ └TCtrlInits.TextOf
 │   └TCtrlInits.FindInitByName
 ├TfrmODMedOut.SetInstructions
 │ ├TResponses.InstanceCount
 │ ├TResponses.EValueFor
 │ ├TResponses.SetControl...
 │ ├TfrmODMedOut.SetSimple
 │ ├TResponses.NextInstance
 │ ├TResponses.IValueFor
 │ ├TfrmODMedOut.SetComplex
 │ └TResponses.GetOrderText
 │   ├TResponses.NextInstance
 │   ├TResponses.FindResponseByName
 │   ├TResponses.FormatResponse
 │   │ └TResponses.FindResponseByIEN
 │   └TResponses.AppendChildren
 │     ├TResponses.FindPromptByIEN
 │     ├TResponses.FindResponseByIEN
 │     └TResponses.FormatResponse...
 ├TfrmODMedOut.ControlChange
 │ ├TResponses.Update
 │ │ ├TResponses.FindResponseByName
 │ │ └TResponses.IENForPrompt
 │ └TResponses.GetOrderText...
 ├TfrmODMedOut.SetAltCombo
 │ └TCtrlInits.SetListOnly
 │   └TCtrlInits.FindInitByName
 └TfrmODMedOut.cboDispenseMouseClick
   ├TfrmODMedOut.SetMaxRefills
   ├TfrmODMedOut.CheckFormAlt
   │ ├SelectFormularyAlt
   │ │ ├LoadFormularyAlt
   │ │ └TfrmBase508Form.Create
   │ │   ├TfrmBase508Form.UpdateAccessibilityActions
   │ │   ├UnfocusableControlEnter
   │ │   └AdjustControls
   │ │     ├TfrmBase508Form.ModifyUnfocusableControl
   │ │     └..(rec)..
   │ ├TfrmODMedOut.cboMedicationSelect...
   │ └TfrmODMedOut.SetAskSC
   │   └RequiresCopay
   ├TfrmODBase.OrderMessage...
   └DispenseMessage

Called-By Hierarchy


         TfrmODMedOut.cboMedicationSelect
              TfrmODMedOut.CheckFormAlt┘ 
         TfrmODMedOut.cboDispenseExit┤   
   TfrmODMedOut.cboDispenseMouseClick┘   
TfrmODMedOut.cboMedicationSelect...┘     

Calls

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

Called-By

Name Declaration Comments
TfrmODMedOut.CheckFormAlt procedure CheckFormAlt; -


Source

316   procedure TfrmODMedOut.cboMedicationSelect(Sender: TObject);
317   { sets related controls whenever orderable item changes (MouseClick or Exit) }
318   begin
319     inherited;
320     with FMedCombo do
321     begin
322       if ItemID <> FLastMedID then FLastMedID := ItemID else Exit;
323       Changing := True;
324       if Sender <> Self then Responses.Clear;       // Sender=Self when called from SetupDialog
325       ResetOnMedChange;
326       if CharAt(ItemID, 1) = 'Q' then
327       begin
328         Responses.QuickOrder := ExtractInteger(ItemID);
329         Responses.SetControl(FMedCombo, 'ORDERABLE', 1);
330       end;
331       if ItemIEN > 0 then SetOnOISelect;
332     end;
333     with Responses do if QuickOrder > 0 then
334     begin
335       SetControl(FMedCombo,     'ORDERABLE', 1);
336       SetControl(cboDispense,   'DRUG',      1);
337       SetInstructions;
338       SetControl(txtQuantity,   'QTY',       1);
339       SetControl(txtRefills,    'REFILLS',   1);
340       spnRefills.Position := StrToIntDef(txtRefills.Text, 0);
341       SetControl(cboPickup,     'PICKUP',    1);
342       SetControl(memComments,   'COMMENT',   1);
343       SetControl(cboPriority,   'URGENCY',   1);
344     end;
345     Changing := False;
346     ControlChange(Self);
347     if FMedCombo = cboMedication then SetAltCombo;
348     // if the Dispense drug was stuffed - still do the checks (form alt, refills)
349     if cboDispense.ItemIndex > -1 then cboDispenseMouseClick(Self);
350   end;