Procedure

TfrmODCslt.ControlChange

Module

fODConsult

Last Modified

7/15/2014 3:26:34 PM

Visibility

Public/Published

Owner

TfrmODCslt

Declaration

procedure ControlChange(Sender: TObject);

Calls Hierarchy


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


             TfrmODCslt.ControlChange
             TfrmODCslt.SetupDialog┤ 
       TfrmODCslt.radInpatientClick┤ 
      TfrmODCslt.radOutpatientClick┤ 
        TfrmODCslt.treServiceChange┤ 
     TfrmODCslt.treServiceKeyDown┘ │ 
           TfrmODCslt.memReasonExit┤ 
        TfrmODCslt.cboServiceSelect┤ 
        TfrmODCslt.cboServiceExit┘ │ 
TfrmODCslt.SetProvDiagPromptingMode┤ 
            TfrmODCslt.InitDialog┤ │ 
          TfrmODCslt.FormCreate┘ │ │ 
           TfrmODCslt.SetupDialog┤ │ 
   TfrmODCslt.treServiceChange...┤ │ 
   TfrmODCslt.cboServiceSelect...┤ │ 
   TfrmODCslt.ReadServerVariables┘ │ 
         TfrmODCslt.SetupDialog┘   │ 
 TfrmODCslt.mnuPopProvDxDeleteClick┤ 
       TfrmODCslt.txtProvDiagChange┘ 

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
TfrmODCslt.cboServiceSelect procedure cboServiceSelect(Sender: TObject); -
TfrmODCslt.memReasonExit procedure memReasonExit(Sender: TObject); -
TfrmODCslt.mnuPopProvDxDeleteClick procedure mnuPopProvDxDeleteClick(Sender: TObject); -
TfrmODCslt.radInpatientClick procedure radInpatientClick(Sender: TObject); -
TfrmODCslt.radOutpatientClick procedure radOutpatientClick(Sender: TObject); -
TfrmODCslt.SetProvDiagPromptingMode procedure SetProvDiagPromptingMode; -
TfrmODCslt.SetupDialog procedure SetupDialog(OrderAction: Integer; const ID: string); override; -
TfrmODCslt.treServiceChange procedure treServiceChange(Sender: TObject; Node: TTreeNode); -
TfrmODCslt.txtProvDiagChange procedure txtProvDiagChange(Sender: TObject); -


Source

699   procedure TfrmODCslt.ControlChange(Sender: TObject);
700   var
701     x: string;
702     i: integer;
703   begin
704     inherited;
705     if Changing or (cboService.ItemIEN = 0) then Exit;
706     with cboService    do
707       begin
708         if (ItemIEN > 0) and (Piece(Items[ItemIndex], U, 5) <> '1') then
709           begin
710             i := Pos('<', Text);
711             if i > 0 then
712               begin
713                 x := Piece(Copy(Text, i + 1, 99), '>', 1);
714                 x := UpperCase(Copy(x, 1, 1)) + Copy(x, 2, 99);
715               end
716             else
717               x := Text;
718             Responses.Update('ORDERABLE', 1, Piece(Items[ItemIndex], U, 6), x);
719           end
720         else Responses.Update('ORDERABLE', 1, '', '');
721       end;
722     with memReason     do  Responses.Update('COMMENT',   1, TX_WPTYPE, Text);
723     with cboCategory   do  Responses.Update('CLASS',     1, ItemID, Text);
724     with cboUrgency    do  Responses.Update('URGENCY',   1, ItemID, Text);
725     with cboPlace      do  Responses.Update('PLACE',     1, ItemID, Text);
726     with txtAttn       do  Responses.Update('PROVIDER',  1, ItemID, Text);
727     with calEarliest   do if Length(Text) > 0 then Responses.Update('EARLIEST',  1, Text,   Text);
728     //with txtProvDiag   do if Length(Text) > 0 then Responses.Update('MISC',      1, Text,   Text);
729     if Length(ProvDx.Text)                > 0 then Responses.Update('MISC',      1, ProvDx.Text,   ProvDx.Text)
730      else Responses.Update('MISC',      1, '',   '');
731     if Length(ProvDx.Code)                > 0 then Responses.Update('CODE',      1, ProvDx.Code,   ProvDx.Code)
732      else Responses.Update('CODE',      1, '',   '');
733   
734     memOrder.Text := Responses.OrderText;
735   end;