Class

TfrmEncounterFrame

Module

fEncounterFrame

Last Modified

7/15/2014 3:26:36 PM

Scope

Interfaced

Inherits from

TfrmBase508Form

Declaration


TfrmEncounterFrame = class(TfrmBase508Form)
  StatusBar1: TStatusBar;
  pnlPage: TPanel;
  Bevel1: TBevel;
  TabControl: TTabControl;

  procedure tabPageChange(Sender: TObject; NewTab: Integer;
    var AllowChange: Boolean);
  procedure FormResize(Sender: TObject);
  procedure SectionClick(Sender: TObject);
  procedure FormDestroy(Sender: TObject);
  procedure FormCreate(Sender: TObject);
  procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
  procedure TabControlChange(Sender: TObject);
  procedure TabControlChanging(Sender: TObject;
    var AllowChange: Boolean);
  procedure FormKeyDown(Sender: TObject; var Key: Word;
    Shift: TShiftState);
  procedure FormClose(Sender: TObject; var Action: TCloseAction);
  procedure FormCanResize(Sender: TObject; var NewWidth,
    NewHeight: Integer; var Resize: Boolean);
  procedure FormShow(Sender: TObject);
  procedure TabControlEnter(Sender: TObject);

private
  FAutoSave: boolean;
  FSaveNeeded: boolean;
  FChangeSource: Integer;
  FCancel:  Boolean; //Indicates the cancel button has been pressed;
  FAbort: boolean; // indicates that neither OK or Cancel has been pressed
  FormList: TStringList;  //Holds the types of any forms that will be used
                          //in the frame.  They must be available at compile time
  FLastPage: TfrmPCEBase;
  FGiveMultiTabMessage: boolean;
  procedure CreateChildForms(Sender: TObject; Location: integer);
  procedure SynchPCEData;
  procedure SwitchToPage(NewForm: TfrmPCEBase);   //was tfrmPage
  function PageIDToForm(PageID: Integer): TfrmPCEBase;
  function PageIDToTab(PageID: Integer): string;
  procedure LoadFormList(Location: integer);
  procedure CreateForms;
  procedure AddTabs;
  function FormListContains(item: string): Boolean;
  procedure SendData;
  procedure UpdateEncounter(PCE: TPCEData);
  procedure SetFormFonts;

public
  procedure SelectTab(NewTabName: string);
  property ChangeSource:    Integer read FChangeSource;
  property Forms:           tstringlist read FormList;
  property Cancel:          Boolean read FCancel write FCancel;
  property Abort:          Boolean read FAbort write FAbort;
end;

DFM Objects


frmEncounterFrame : TfrmEncounterFrame
 ├Bevel1 : TBevel
 ├StatusBar1 : TStatusBar
 ├pnlPage : TPanel
 ├TabControl : TTabControl
 └amgrMain : TVA508AccessibilityManager

Class Hierarchy


Class Fields

Name Type Scope Comments
Bevel1 Simple (unknown) Public/Published -
FAbort Boolean Private Indicates that neither OK or Cancel has been pressed
FAutoSave Boolean Private -
FCancel Boolean Private Indicates the cancel button has been pressed;
FChangeSource Integer Private -
FGiveMultiTabMessage Boolean Private -
FLastPage TfrmPCEBase Private In the frame. They must be available at compile time
FormList TStringList Private Holds the types of any forms that will be used
FSaveNeeded Boolean Private -
pnlPage TPanel Public/Published -
StatusBar1 Simple (unknown) Public/Published -
TabControl Simple (unknown) Public/Published -

Properties

Name Type Scope Comments
Abort Boolean Public -
Cancel Boolean Public -
ChangeSource Integer Public -
Forms TStringList Public -

Methods

Name Declaration Scope Comments
AddTabs procedure AddTabs; Private
//Name: procedure TfrmEncounterFrame.AddTabs;
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: adds a tab for each page that will be displayed
///////////////////////////////////////////////////////////////////////////////
CreateChildForms procedure CreateChildForms(Sender: TObject; Location: integer); Private
//Name: procedure TfrmEncounterFrame.CreatChildForms(Sender: TObject);
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: Finds out what pages to display, has the pages and tabs created.
///////////////////////////////////////////////////////////////////////////////
CreateForms procedure CreateForms; Private
//Name: procedure TfrmEncounterFrame.CreateForms;
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description:  Creates all of the forms in the list.
///////////////////////////////////////////////////////////////////////////////
FormCanResize procedure FormCanResize(Sender: TObject; var NewWidth, NewHeight: Integer; var Resize: Boolean); Public/Published -
FormClose procedure FormClose(Sender: TObject; var Action: TCloseAction); Public/Published -
FormCloseQuery procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); Public/Published
//Name: procedure TfrmEncounterFrame.FormCloseQuery(Sender: TObject;
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: Check to see if the Cancel button was pressed, if not, call
// procedure to send the data to the server.
///////////////////////////////////////////////////////////////////////////////
FormCreate procedure FormCreate(Sender: TObject); Public/Published
//Name: procedure TfrmEncounterFrame.FormCreate(Sender: TObject);
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: Create instances of the objects needed.
///////////////////////////////////////////////////////////////////////////////
FormDestroy procedure FormDestroy(Sender: TObject); Public/Published
//Name: procedure TfrmEncounterFrame.FormDestroy(Sender: TObject);
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: Free up objects in memory when destroying form.
///////////////////////////////////////////////////////////////////////////////
FormKeyDown procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); Public/Published -
FormListContains function FormListContains(item: string): Boolean; Private
//Name: function TfrmEncounterFrame.FormListContains(item: string): Boolean;
//Created: 12/06/98
//By: Robert Bott
//Location: ISL
//Description: Returns a boolean value indicating if a given string exists in
// the formlist.
///////////////////////////////////////////////////////////////////////////////
FormResize procedure FormResize(Sender: TObject); Public/Published
//Name: procedure TfrmEncounterFrame.FormResize(Sender: TObject);
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: Resizes all windows when parent changes.
///////////////////////////////////////////////////////////////////////////////
FormShow procedure FormShow(Sender: TObject); Public/Published -
LoadFormList procedure LoadFormList(Location: integer); Private
//Name: TfrmEncounterFrame.LoadFormList;
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: Loads Formlist with the forms to create, will be replaced by RPC call.
///////////////////////////////////////////////////////////////////////////////
PageIDToForm function PageIDToForm(PageID: Integer): TfrmPCEBase; Private
//Name: function TfrmEncounterFrame.PageIDToForm(PageID: Integer): TfrmPCEBase;
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: return the form name based on the PageID
}
PageIDToTab function PageIDToTab(PageID: Integer): string; Private
//Name: function TfrmEncounterFrame.PageIDToTab(PageID: Integer): String;
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: returns the tab index that corresponds to a given PageID .
///////////////////////////////////////////////////////////////////////////////
SectionClick procedure SectionClick(Sender: TObject); Public/Published
//Name: TfrmEncounterFrame.SectionClick(Sender: TObject);
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: Call the procedure apropriate for the selected tab
///////////////////////////////////////////////////////////////////////////////
SelectTab procedure SelectTab(NewTabName: string); Public -
SendData procedure SendData; Private
//Name: procedure TfrmEncounterFrame.SendData;
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: Send Data back to the M side sor storing.
///////////////////////////////////////////////////////////////////////////////

send PCE data to the RPC
SetFormFonts procedure SetFormFonts; Private -
SwitchToPage procedure SwitchToPage(NewForm: TfrmPCEBase); Private
Was tfrmPage
//Name: TfrmEncounterFrame.SwitchToPage(NewForm: tfrmPCEBase);
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: Brings the selected page to the front for display.
///////////////////////////////////////////////////////////////////////////////

 was TfrmPage);
 unmerge/merge menus, bring page to top of z-order, call form-specific OnDisplay code
SynchPCEData procedure SynchPCEData; Private
//Name: procedure TfrmEncounterFrame.SynchPCEData;
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: Synchronize any existing PCE data with what is displayed in the form.
///////////////////////////////////////////////////////////////////////////////
TabControlChange procedure TabControlChange(Sender: TObject); Public/Published -
TabControlChanging procedure TabControlChanging(Sender: TObject; var AllowChange: Boolean); Public/Published -
TabControlEnter procedure TabControlEnter(Sender: TObject); Public/Published -
tabPageChange procedure tabPageChange(Sender: TObject; NewTab: Integer; var AllowChange: Boolean); Public/Published
//Name: procedure TfrmEncounterFrame.tabPageChange(Sender: TObject; NewTab: Integer; var AllowChange: Boolean);
//Created: Jan 1999
//By: Robert Bott
//Location: ISL
//Description: Finds the page, and calls SwithToPage to display it.
///////////////////////////////////////////////////////////////////////////////

 switches to form linked to NewTab
UpdateEncounter procedure UpdateEncounter(PCE: TPCEData); Private -

Referenced By (2)

Module (line) Referrer Type
fEncounterFrame (115) frmEncounterFrame Read
fEncounterFrame (383) - Read