Class

TResponses

Module

fODBase

Last Modified

7/15/2014 3:26:40 PM

Scope

Interfaced

Inherits from

TObject

Declaration


TResponses = class
private
  FDialog: string;
  FDialogDisplayName: string;
  FResponseList: TList;
  FPrompts: TList;
  FCopyOrder: string;
  FEditOrder: string;
  FTransferOrder: string;
  FDisplayGroup: Integer;
  FQuickOrder: Integer;
  FOrderChecks: TStringList;
  FVarLeading:  string;
  FVarTrailing: string;
  FEventType: Char;
  FEventIFN: Integer;
  FEventName: string;
  FSpecialty: Integer;
  FEffective: TFMDateTime;
  FParentEvent: TParentEvent;
  FLogTime:   TFMDateTime;
  FViewName: string;
  FCancel: boolean;
  FOrderContainsObjects: boolean;
  function FindResponseByIEN(APromptIEN, AnInstance: Integer): TResponse;
  function GetOrderText: string;
  function IENForPrompt(const APromptID: string): Integer;
  procedure SetDialog(Value: string);
  procedure SetCopyOrder(const AnID: string);
  procedure SetEditOrder(const AnID: string);
  procedure SetQuickOrder(AnIEN: Integer);
  procedure SetQuickOrderByID(const AnID: string);
  procedure FormatResponse(var FormattedText: string; var ExcludeText: Boolean;
            APrompt: TPrompt; const x: string; AnInstance: Integer);
  function FindPromptByIEN(AnIEN: Integer): TPrompt;
  procedure AppendChildren(var ParentText: string; ChildPrompts: string; AnInstance: Integer);
  procedure BuildOCItems(AList: TStringList; var AStartDtTm: string; const AFillerID: string);
public
  constructor Create;
  destructor Destroy; override;
  procedure Clear; overload;
  procedure Clear(const APromptID: string; SaveInstance: Integer = 0); overload;
  function EValueFor(const APromptID: string; AnInstance: Integer): string;
  function GetIENForPrompt(const APromptID: string): Integer;
  function FindResponseByName(const APromptID: string; AnInstance: Integer): TResponse;
  function PromptExists(const APromptID: string):boolean;
  function InstanceCount(const APromptID: string): Integer;
  function IValueFor(const APromptID: string; AnInstance: Integer): string;
  function NextInstance(const APromptID: string; LastInstance: Integer): Integer;
  function OrderCRC: string;
  procedure Remove(const APromptID: string; AnInstance: Integer);
  procedure SaveQuickOrder(var ANewIEN: Integer; const ADisplayName: string);
  procedure SaveOrder(var AnOrder: TOrder; DlgIEN: Integer; IsIMOOrder: boolean = False);
  procedure SetControl(AControl: TControl; const APromptID: string; AnInstance: Integer);
  procedure SetEventDelay(AnEvent: TOrderDelayEvent);
  procedure SetPromptFormat(const APromptID, NewFormat: string);
  procedure Update(const APromptID: string; AnInstance: Integer;
    const AnIValue, AnEValue: string);
  property Dialog: string            read FDialog         write SetDialog;
  property DialogDisplayName: string read FDialogDisplayName write FDialogDisplayName;
  property DisplayGroup: Integer     read FDisplayGroup   write FDisplayGroup;
  property CopyOrder:    string      read FCopyOrder      write SetCopyOrder;
  property EditOrder:    string      read FEditOrder;  //  write SetEditOrder;
  property TransferOrder:string      read FTransferOrder  write FTransferOrder;
  property EventType:    Char        read FEventType;
  property EventIFN:     integer     read FEventIFN       write FEventIFN;
  property EventName:    string      read FEventName      write FEventName;
  property LogTime:      TFMDateTime read FLogTime        write FLogTime;
  property QuickOrder:   Integer     read FQuickOrder     write SetQuickOrder;
  property OrderChecks:  TStringList read FOrderChecks    write FOrderChecks;
  property OrderText:    string      read GetOrderText;
  property VarLeading:   string      read FVarLeading     write FVarLeading;
  property VarTrailing:  string      read FVarTrailing    write FVarTrailing;
  property TheList:      TList       read FResponseList   write FResponseList;
  property Cancel:       boolean     read FCancel         write FCancel;
  property OrderContainsObjects: boolean read FOrderContainsObjects write FOrderContainsObjects;
end;

Class Hierarchy


TObject
 └TResponses

Class Fields

Name Type Scope Comments
FCancel Boolean Private -
FCopyOrder UnicodeString Private -
FDialog UnicodeString Private -
FDialogDisplayName UnicodeString Private -
FDisplayGroup Integer Private -
FEditOrder UnicodeString Private -
FEffective TFMDateTime Private -
FEventIFN Integer Private -
FEventName UnicodeString Private -
FEventType Char Private -
FLogTime TFMDateTime Private -
FOrderChecks TStringList Private -
FOrderContainsObjects Boolean Private -
FParentEvent TParentEvent Private -
FPrompts TList Private -
FQuickOrder Integer Private -
FResponseList TList Private -
FSpecialty Integer Private -
FTransferOrder UnicodeString Private -
FVarLeading UnicodeString Private -
FVarTrailing UnicodeString Private -
FViewName UnicodeString Private -

Properties

Name Type Scope Comments
Cancel Boolean Public -
CopyOrder UnicodeString Public -
Dialog UnicodeString Public -
DialogDisplayName UnicodeString Public -
DisplayGroup Integer Public -
EditOrder UnicodeString Public Write SetEditOrder;
EventIFN Integer Public -
EventName UnicodeString Public -
EventType Char Public -
LogTime TFMDateTime Public -
OrderChecks TStringList Public -
OrderContainsObjects Boolean Public -
OrderText UnicodeString Public -
QuickOrder Integer Public -
TheList TList Public -
TransferOrder UnicodeString Public -
VarLeading UnicodeString Public -
VarTrailing UnicodeString Public -

Constructors

Name Declaration Scope Comments
Create constructor Create; Public -

Destructors

Name Declaration Scope Comments
Destroy destructor Destroy; override; Public Frees all response objects before freeing list

Methods

Name Declaration Scope Comments
AppendChildren procedure AppendChildren(var ParentText: string; ChildPrompts: string; AnInstance: Integer); Private -
BuildOCItems procedure BuildOCItems(AList: TStringList; var AStartDtTm: string; const AFillerID: string); Private -
Clear procedure Clear(const APromptID: string; SaveInstance: Integer = 0); overload; Public -
Clear procedure Clear; overload; Public Clears all information in the response multiple
EValueFor function EValueFor(const APromptID: string; AnInstance: Integer): string; Public -
FindPromptByIEN function FindPromptByIEN(AnIEN: Integer): TPrompt; Private -
FindResponseByIEN function FindResponseByIEN(APromptIEN, AnInstance: Integer): TResponse; Private -
FindResponseByName function FindResponseByName(const APromptID: string; AnInstance: Integer): TResponse; Public -
FormatResponse procedure FormatResponse(var FormattedText: string; var ExcludeText: Boolean; APrompt: TPrompt; const x: string; AnInstance: Integer); Private -
GetIENForPrompt function GetIENForPrompt(const APromptID: string): Integer; Public -
GetOrderText function GetOrderText: string; Private Loop thru the response objects and build the order text
IENForPrompt function IENForPrompt(const APromptID: string): Integer; Private -
InstanceCount function InstanceCount(const APromptID: string): Integer; Public -
IValueFor function IValueFor(const APromptID: string; AnInstance: Integer): string; Public -
NextInstance function NextInstance(const APromptID: string; LastInstance: Integer): Integer; Public -
OrderCRC function OrderCRC: string; Public -
PromptExists function PromptExists(const APromptID: string):boolean; Public -
Remove procedure Remove(const APromptID: string; AnInstance: Integer); Public -
SaveOrder procedure SaveOrder(var AnOrder: TOrder; DlgIEN: Integer; IsIMOOrder: boolean = False); Public -
SaveQuickOrder procedure SaveQuickOrder(var ANewIEN: Integer; const ADisplayName: string); Public -
SetControl procedure SetControl(AControl: TControl; const APromptID: string; AnInstance: Integer); Public Sets the value of a control, uses ID string & instance to find the right response entry
SetCopyOrder procedure SetCopyOrder(const AnID: string); Private Sets responses to the values for an order that is created by copying
SetDialog procedure SetDialog(Value: string); Private Loads formatting information for a dialog
SetEditOrder procedure SetEditOrder(const AnID: string); Private Sets responses to the values for an order that is about to be edited
SetEventDelay procedure SetEventDelay(AnEvent: TOrderDelayEvent); Public -
SetPromptFormat procedure SetPromptFormat(const APromptID, NewFormat: string); Public -
SetQuickOrder procedure SetQuickOrder(AnIEN: Integer); Private Sets responses to a quick order value - this is used by the QuickOrder property
SetQuickOrderByID procedure SetQuickOrderByID(const AnID: string); Private Sets responses to a quick order value
Update procedure Update(const APromptID: string; AnInstance: Integer; const AnIValue, AnEValue: string); Public For a given Prompt,Instance update or create the associated response object

Referenced By (24)

Module (line) Referrer Type
fODBase (157) TfrmODBase Read
fODBase (212) TfrmODBase Read
fODBase (1435) - Read
fODBBank (165) DetermineCollectionDefaults Read
fODBBank (206) TLabTest Read
fODBBank (208) Create Read
fODBBank (1435) - Read
fODBBank (3046) - Read
fODConsult (111) GetProvDxandValidateCode Read
fODConsult (1407) - Read
fODDietLT (38) LateTrayCheck Read
fODDietLT (196) - Read
fODLab (117) DetermineCollectionDefaults Read
fODLab (154) TLabTest Read
fODLab (156) Create Read
fODLab (433) - Read
fODLab (2001) - Read
fODMedComplex (60) ExecuteComplexDose Read
fODMedComplex (88) - Read
fODProc (82) GetProvDxandValidateCode Read
fODProc (847) - Read
fOrderSaveQuick (43) SaveAsQuickOrder Read
fOrderSaveQuick (105) - Read
uSignItems (381) - Read