Procedure

TfrmODProc.ControlChange

Module

fODProc

Last Modified

7/15/2014 3:26:34 PM

Visibility

Public/Published

Owner

TfrmODProc

Declaration

procedure ControlChange(Sender: TObject);

Calls Hierarchy


TfrmODProc.ControlChange
 ├TResponses.Update
 │ ├TResponses.FindResponseByName
 │ └TResponses.IENForPrompt
 ├TfrmODProc.updateService
 │ ├TfrmODProc.setup508Label
 │ └TResponses.Update...
 └TResponses.GetOrderText
   ├TResponses.NextInstance
   ├TResponses.FindResponseByName
   ├TResponses.FormatResponse
   │ └TResponses.FindResponseByIEN
   └TResponses.AppendChildren
     ├TResponses.FindPromptByIEN
     ├TResponses.FindResponseByIEN
     └TResponses.FormatResponse...

Called-By Hierarchy


             TfrmODProc.ControlChange
             TfrmODProc.SetupDialog┤ 
       TfrmODProc.radInpatientClick┤ 
      TfrmODProc.radOutpatientClick┤ 
           TfrmODProc.cboProcSelect┤ 
           TfrmODProc.memReasonExit┤ 
TfrmODProc.SetProvDiagPromptingMode┤ 
            TfrmODProc.InitDialog┤ │ 
          TfrmODProc.FormCreate┤ │ │ 
       TfrmODProc.cboProcSelect┘ │ │ 
           TfrmODProc.SetupDialog┤ │ 
         TfrmODProc.cboProcSelect┤ │ 
   TfrmODProc.ReadServerVariables┘ │ 
          TfrmODProc.FormCreate┤   │ 
         TfrmODProc.SetupDialog┘   │ 
        TfrmODProc.cboServiceChange┤ 
 TfrmODProc.mnuPopProvDxDeleteClick┤ 
       TfrmODProc.txtProvDiagChange┘ 

Calls

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

Called-By

Name Declaration Comments
TfrmODProc.cboProcSelect procedure cboProcSelect(Sender: TObject); -
TfrmODProc.cboServiceChange procedure cboServiceChange(Sender: TObject); -
TfrmODProc.memReasonExit procedure memReasonExit(Sender: TObject); -
TfrmODProc.mnuPopProvDxDeleteClick procedure mnuPopProvDxDeleteClick(Sender: TObject); -
TfrmODProc.radInpatientClick procedure radInpatientClick(Sender: TObject); -
TfrmODProc.radOutpatientClick procedure radOutpatientClick(Sender: TObject); -
TfrmODProc.SetProvDiagPromptingMode procedure SetProvDiagPromptingMode; -
TfrmODProc.SetupDialog procedure SetupDialog(OrderAction: Integer; const ID: string); override; -
TfrmODProc.txtProvDiagChange procedure txtProvDiagChange(Sender: TObject); -


Source

366   procedure TfrmODProc.ControlChange(Sender: TObject);
367   var
368     x: string;
369     i: integer;
370   begin
371     inherited;
372     if Changing or (cboProc.ItemIEN = 0) then Exit;
373     with cboProc do
374       begin
375         if ItemIEN > 0 then
376           begin
377             i := Pos('<', Text);
378             if i > 0 then
379               begin
380                 x := Piece(Copy(Text, i + 1, 99), '>', 1);
381                 x := UpperCase(Copy(x, 1, 1)) + Copy(x, 2, 99);
382               end
383             else
384               x := Text;
385             Responses.Update('ORDERABLE', 1, ItemID, x);
386           end
387         else Responses.Update('ORDERABLE', 1, '', '');
388       end;
389     updateService();
390     with memReason     do if GetTextLen   > 0 then Responses.Update('COMMENT',   1, TX_WPTYPE, Text);
391     with cboCategory   do if ItemID     <> '' then Responses.Update('CLASS',     1, ItemID, Text);
392     with cboUrgency    do if ItemIEN      > 0 then Responses.Update('URGENCY',   1, ItemID, Text);
393     with cboPlace      do if ItemID     <> '' then Responses.Update('PLACE',     1, ItemID, Text);
394     with txtAttn       do if ItemIEN      > 0 then Responses.Update('PROVIDER',  1, ItemID, Text);
395     with calEarliest   do if Length(Text) > 0 then Responses.Update('EARLIEST',  1, Text, Text);
396     if Length(ProvDx.Text)                > 0 then Responses.Update('MISC',      1, ProvDx.Text,   ProvDx.Text)
397      else Responses.Update('MISC',      1, '',   '');
398     if Length(ProvDx.Code)                > 0 then Responses.Update('CODE',      1, ProvDx.Code,   ProvDx.Code)
399      else Responses.Update('CODE',      1, '',   '');
400   
401     memOrder.Text := Responses.OrderText;
402   end;