Procedure

TfrmODGen.SetupDialog

Directives

Override

Module

fODGen

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public

Overrides

TfrmODBase.SetupDialog

Owner

TfrmODGen

Declaration

procedure SetupDialog(OrderAction: Integer; const ID: string); override;

Calls Hierarchy


TfrmODGen.SetupDialog
 ├TfrmODGen.SetDialogIEN
 │ ├IdentifyDialog
 │ ├TResponses.SetDialog
 │ │ ├LoadDialogDefinition
 │ │ └SortPromptsBySequence
 │ ├LoadOrderPrompting
 │ └TfrmODGen.PlaceControls
 │   ├TfrmODGen.PlaceDateTime
 │   │ ├TfrmODGen.SetComponentName
 │   │ ├TfrmODGen.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...
 │   │ └TfrmODGen.PlaceLabel
 │   ├TfrmODGen.PlaceFreeText
 │   │ ├TfrmODGen.SetComponentName
 │   │ ├TfrmODGen.ControlChange...
 │   │ └TfrmODGen.PlaceLabel
 │   ├TfrmODGen.PlaceHidden
 │   ├TfrmODGen.PlaceNumeric
 │   │ ├TfrmODGen.SetComponentName
 │   │ ├TfrmODGen.ControlChange...
 │   │ └TfrmODGen.PlaceLabel
 │   ├TfrmODGen.PlaceLookup
 │   │ ├GlobalRefForFile
 │   │ ├TfrmODGen.SetComponentName
 │   │ ├GetDefaultTSForEvt
 │   │ ├GetTSListForEvt
 │   │ ├TfrmODGen.LookupNeedData
 │   │ │ └SubsetOfEntries
 │   │ ├TfrmODGen.ControlChange...
 │   │ └TfrmODGen.PlaceLabel
 │   ├TfrmODGen.PlaceSetOfCodes
 │   │ ├TfrmODGen.SetComponentName
 │   │ ├TfrmODGen.ControlChange...
 │   │ └TfrmODGen.PlaceLabel
 │   ├TfrmODGen.PlaceMemo
 │   │ ├TfrmODGen.SetComponentName
 │   │ ├TfrmODGen.ControlChange...
 │   │ └TfrmODGen.PlaceLabel
 │   └TfrmODGen.PlaceYesNo
 │     ├TfrmODGen.SetComponentName
 │     ├TfrmODGen.ControlChange...
 │     └TfrmODGen.PlaceLabel
 ├DialogForOrder
 ├TResponses.GetIENForPrompt
 ├GetEventPromptID
 ├TResponses.FindResponseByName
 ├EventInfo1
 ├TResponses.SetControl
 │ ├TResponses.FindResponseByName
 │ └AssignBPText
 │   ├DisplayGroupToLinkType
 │   │ └DisplayGroupByName
 │   ├TResponses.EValueFor
 │   ├GetServiceIEN
 │   ├TResponses.IValueFor
 │   ├GetProcedureIEN
 │   ├ExpandOrderObjects
 │   │ ├TdmodShared.BoilerplateOK
 │   │ │ ├ErrCount
 │   │ │ ├AddErr
 │   │ │ └TdmodShared.LoadTIUObjects
 │   │ │   └GetObjectList
 │   │ └GetTemplateText
 │   │   └TEncounter.GetVisitStr
 │   │     └TEncounter.GetVisitCategory
 │   ├SetTemplateDialogCanceled
 │   ├CheckBoilerplate4Fields
 │   ├ExecuteTemplateOrBoilerPlate
 │   └WasTemplateDialogCanceled
 └TfrmODGen.ControlChange...

Calls

Name Declaration Comments
TfrmODGen.ControlChange procedure ControlChange(Sender: TObject); -
DialogForOrder function DialogForOrder(const ID: string): Integer; -
EventInfo1 function EventInfo1(AnEvtID: string): string; -
TResponses.FindResponseByName function FindResponseByName(const APromptID: string; AnInstance: Integer): TResponse; -
GetEventPromptID function GetEventPromptID: integer; -
TResponses.GetIENForPrompt function GetIENForPrompt(const APromptID: string): Integer; -
TResponses.SetControl procedure SetControl(AControl: TControl; const APromptID: string; AnInstance: Integer); -
TfrmODGen.SetDialogIEN procedure SetDialogIEN(Value: Integer); override; -


Source

160   procedure TfrmODGen.SetupDialog(OrderAction: Integer; const ID: string);
161   var
162     i: Integer;
163     theEvtInfo: string;
164     thePromptIen: integer;
165     AResponse: TResponse;
166     AnEvtResponse: TResponse;
167   begin
168     inherited;
169     if OrderAction in [ORDER_COPY, ORDER_EDIT, ORDER_QUICK] then with Responses do
170     begin
171       Changing := True;
172       // for copy & edit, SetDialogIEN hasn't been called yet
173       if (Length(ID) > 0) and (DialogIEN = 0) then SetDialogIEN(DialogForOrder(ID));
174       with FDialogCtrlList do for i := 0 to Count -1 do with TDialogCtrl(Items[i]) do
175       begin
176         if (ID = 'EVENT') and ( Responses.EventIFN > 0 ) then
177         begin
178           thePromptIen := GetIENForPrompt(ID);
179           if thePromptIen = 0 then
180             thePromptIen := GetEventPromptID;
181           AResponse := FindResponseByName('EVENT', 1);
182           if AResponse <> nil then
183           begin
184             theEvtInfo := EventInfo1(AResponse.IValue);
185             AResponse.EValue := Piece(theEvtInfo,'^',4);
186           end;
187           if AResponse = nil then
188           begin
189             AnEvtResponse := TResponse.Create;
190             AnEvtResponse.PromptID  := 'EVENT';
191             AnEvtResponse.PromptIEN := thePromptIen;
192             AnEvtResponse.Instance  := 1;
193             AnEvtResponse.IValue    := IntToStr(Responses.EventIFN);
194             theEvtInfo := EventInfo1(AnEvtResponse.IValue);
195             AnEvtResponse.EValue := Piece(theEvtInfo,'^',4);
196             Responses.TheList.Add(AnEvtResponse);
197           end;
198         end;
199         if Editor <> nil then SetControl(Editor, ID, 1);
200         if DataType = 'H' then
201         begin
202           AResponse := FindResponseByName(ID, 1);
203           if AResponse <> nil then
204           begin
205             IHidden := AResponse.IValue;
206             EHidden := AResponse.EValue;
207           end; {if AResponse}
208         end; {if DataType}
209       end; {with TDialogCtrl}
210       Changing := False;
211     end; {if OrderAction}
212     UpdateColorsFor508Compliance(Self);
213     ControlChange(Self);
214     if (FFirstCtrl <> nil) and (FFirstCtrl.Enabled) then SetFocusedControl(FFirstCtrl);
215   end;