Procedure

TfrmODAllergy.ControlChange

Module

fODAllgy

Last Modified

7/15/2014 3:26:40 PM

Visibility

Public/Published

Owner

TfrmODAllergy

Declaration

procedure ControlChange(Sender: TObject);

Calls Hierarchy


TfrmODAllergy.ControlChange
 ├TResponses.Clear
 ├TResponses.Update
 │ ├TResponses.FindResponseByName
 │ └TResponses.IENForPrompt
 ├ValidDateTimeStr
 └TResponses.GetOrderText
   ├TResponses.NextInstance
   ├TResponses.FindResponseByName
   ├TResponses.FormatResponse
   │ └TResponses.FindResponseByIEN
   └TResponses.AppendChildren
     ├TResponses.FindPromptByIEN
     ├TResponses.FindResponseByIEN
     └TResponses.FormatResponse...

Called-By Hierarchy


                TfrmODAllergy.ControlChange
                TfrmODAllergy.SetupDialog┤ 
            TfrmODAllergy.grpObsHistClick┤ 
           TfrmODAllergy.lstAllergySelect┤ 
              TfrmODAllergy.SetupDialog┤ │ 
                              ..(rec)..┘ │ 
            TfrmODAllergy.memCommentsExit┤ 
              TfrmODAllergy.btnAgentClick┤ 
               TfrmODAllergy.FormCreate┘ │ 
           TfrmODAllergy.cboSymptomsClick┤ 
    TfrmODAllergy.ckNoKnownAllergiesClick┤ 
      TfrmODAllergy.cboSymptomsMouseClick┘ 
       TfrmODAllergy.cboSymptomsKeyDown┘   

Calls

Name Declaration Comments
TResponses.Clear procedure Clear; overload; -
TResponses.GetOrderText function GetOrderText: string; -
TResponses.Update procedure Update(const APromptID: string; AnInstance: Integer; const AnIValue, AnEValue: string); -
ValidDateTimeStr function ValidDateTimeStr(const AString, Flags: string): TFMDateTime; -

Called-By

Name Declaration Comments
TfrmODAllergy.btnAgentClick procedure btnAgentClick(Sender: TObject); -
TfrmODAllergy.cboSymptomsClick procedure cboSymptomsClick(Sender: TObject); -
TfrmODAllergy.cboSymptomsMouseClick procedure cboSymptomsMouseClick(Sender: TObject); -
TfrmODAllergy.ckNoKnownAllergiesClick procedure ckNoKnownAllergiesClick(Sender: TObject); -
TfrmODAllergy.grpObsHistClick procedure grpObsHistClick(Sender: TObject); -
TfrmODAllergy.lstAllergySelect procedure lstAllergySelect(Sender: TObject); -
TfrmODAllergy.memCommentsExit procedure memCommentsExit(Sender: TObject); -
TfrmODAllergy.SetupDialog procedure SetupDialog(OrderAction: Integer; const ID: string); override; -


Source

239   procedure TfrmODAllergy.ControlChange(Sender: TObject);
240   var
241     i: integer;
242     tmpDate: TFMDateTime;
243   begin
244     inherited;
245     if Changing then Exit;
246     Responses.Clear;
247     if ckNoKnownAllergies.Checked then
248       begin
249         Responses.Update('NKA',       1, 'NKA', 'No Known Allergies');
250         with cboOriginator       do if ItemIEN      > 0 then Responses.Update('PROVIDER',  1, ItemID, Text);
251       end
252     else
253       with lstAllergy          do
254         if (Items.Count > 0) then
255           if (Piece(Items[0], U, 1) <>  '-1') and (Length(DisplayText[0]) > 0) then
256             begin
257               Responses.Update('ITEM', 1, DisplayText[0], DisplayText[0]);
258               with cboReactionType     do if ItemID     <> '' then Responses.Update('TYPE', 1, ItemID, Text);
259               with lstSelectedSymptoms do for i := 0 to Items.Count - 1 do
260                 begin
261                   Responses.Update('REACTION', i+1, Piece(Items[i],U,1), Piece(Items[i],U,2));
262                   Responses.Update('REACTDT',  i+1, Piece(Items[i],U,3), Piece(Items[i],U,4));
263                 end;
264               with grpObsHist          do if ItemIndex   > -1 then
265                                           if ItemIndex = 0    then Responses.Update('OBSERVED',     1, 'o', 'Observed')
266                                           else                     Responses.Update('OBSERVED',     1, 'h', 'Historical');
267               with calObservedDate do
268                 begin
269                   tmpDate := ValidDateTimeStr(calObservedDate.Text, 'TS');
270                   if tmpDate   > 0 then Responses.Update('START',     1, FloatToStr(tmpDate), Text);
271                 end;
272               with cboSeverity         do if ItemID     <> '' then Responses.Update('SEVERITY',     1, ItemID, Text);
273               with cboOriginator       do if ItemIEN      > 0 then Responses.Update('PROVIDER',  1, ItemID, Text);
274               with memComments         do if GetTextLen   > 0 then Responses.Update('COMMENT',   1, TX_WPTYPE, Text);
275             end;
276     memOrder.Text := Responses.OrderText;
277   end;