Procedure

TfrmODMedIn.ControlChange

Module

fODMedIn

Last Modified

7/15/2014 3:26:42 PM

Comments

All controls

Visibility

Public/Published

Owner

TfrmODMedIn

Declaration

procedure ControlChange(Sender: TObject);

Calls Hierarchy


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...

Called-By Hierarchy


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

Calls

Name Declaration Comments
TResponses.GetOrderText function GetOrderText: string; -
TResponses.Update procedure Update(const APromptID: string; AnInstance: Integer; const AnIValue, AnEValue: string); -

Called-By

Name Declaration Comments
TfrmODMedIn.cboMedicationSelect procedure cboMedicationSelect(Sender: TObject); -
TfrmODMedIn.SetupDialog procedure SetupDialog(OrderAction: Integer; const ID: string); override; -


Source

340   procedure TfrmODMedIn.ControlChange(Sender: TObject);
341   begin
342     inherited;
343     if Changing then Exit;
344     with FMedCombo do if ItemIEN > 0
345       then Responses.Update('ORDERABLE', 1, ItemID, Piece(Items[ItemIndex], U, 3))
346       else Responses.Update('ORDERABLE', 1, '', '');
347     with cboDispense   do if ItemIEN > 0
348       then Responses.Update('DRUG', 1, ItemID, Piece(Items[ItemIndex], U, 2));
349     with txtDosage     do if Length(Text) > 0 then Responses.Update('INSTR', 1, Text, Text);
350     with cboRoute      do if ItemIndex > -1
351       then Responses.Update('ROUTE', 1, ItemID, Piece(Items[ItemIndex], U, 3))
352       else Responses.Update('ROUTE', 1, Text, Text);
353     with cboSchedule   do if Length(Text) > 0 then Responses.Update('SCHEDULE', 1, Text, Text);
354     with cboPriority   do if ItemIndex > -1   then Responses.Update('URGENCY', 1, ItemID, Text);
355     with memComments   do                          Responses.Update('COMMENT', 1, TX_WPTYPE, Text);
356     memOrder.Text := Responses.OrderText;
357   end;