FreeMED. BaseModule

Basic FreeMED module class.  All modules in FreeMED inheirit methods from this class.  It extends the phpwebtools module class.

Summary
Basic FreeMED module class.
Sets the print template to be used for this EMR segment.
Callback to allow custom fax controls (for addressbook, et cetera).
Basic printing functionality
Provides basic printing interface
Callback to provide a macro mapping for TeX templating.
Callback to provide information to the TeX renderer about formatting.
Overrides the internal phpwebtools setup method.
Initializes the module table in the database.
Use this to replace the default printing behavior of the system.
Get a list of associations for the current module.
Creates an association with another module.
Attaches the current module to the specified system handler.

Variables

print_template

var $print_template

Sets the print template to be used for this EMR segment.  Templates are given as files in lib/tex without the .tex extension.  If this is not definied, FreeMED will default to using the internal renderer.

Example

$this->print_template = ‘_template’;

Functions

BaseModule constructor

BaseModule->check_vars

BaseModule->_header

BaseModule->_footer

fax_widget

function fax_widget ($varname,
$id)

Callback to allow custom fax controls (for addressbook, et cetera).  By default, this is disabled, and a standard text entry is used.

Parameters

$varnameName of the variable
$idRecord id that is being printed

Returns

XHTML widget.

printaction

function printaction ( )

Basic printing functionality

_print

function _print ( )

Provides basic printing interface

_print_mapping

function _print_mapping ($TeX,
$id)

Callback to provide a macro mapping for TeX templating.

Parameters

$TeXTeX rendering object of type FreeMED.TeX
$idRecord id of the target record.

Returns

Associative array containing mapping information.

_TeX_Information

function _TeX_Information ( )

Callback to provide information to the TeX renderer about formatting.  (Should be depreciated)

Returns

Array ( title, heading, physician )

BaseModule->setup

Overrides the internal phpwebtools setup method.  This causes FreeMED to run either _setup() on first run, or _update() if the module has an older version installed.

BaseModule->init

Initializes the module table in the database.  This should only be called by the setup routines in FreeMED, otherwise it poses a major system risk.

print_override

function print_override ($id)

Use this to replace the default printing behavior of the system.

Parameters

$idRecord ID to be “printed” as a PDF.

Returns

Filename of PDF file containing render.

BaseModule->_GetAssociations

Get a list of associations for the current module.

Returns

Array of associations made to this module.

BaseModule->_SetAssociation

Creates an association with another module.

Parameters

$withModule name (class name) of module to associate with.

BaseModule->_SetHandler

Attaches the current module to the specified system handler.

Parameters

$handlerName of the system handler.  Please note that this is case sensitive.
$methodMethod that will be called by the specified handler.  This is ‘handler’ by default.
var $print_template
Sets the print template to be used for this EMR segment.
function fax_widget ($varname,
$id)
Callback to allow custom fax controls (for addressbook, et cetera).
function printaction ( )
Basic printing functionality
function _print ( )
Provides basic printing interface
function _print_mapping ($TeX,
$id)
Callback to provide a macro mapping for TeX templating.
function _TeX_Information ( )
Callback to provide information to the TeX renderer about formatting.
function print_override ($id)
Use this to replace the default printing behavior of the system.
LaTeX rendering class.