FreeMED Opensource EMR/PM Software |
FreeMED. MaintenanceModuleDatabase table maintenance module superclass. This is descended from BaseModule. Summary
$this->widget_hashSpecifies the format of the widget method. This is formatted by having SQL field names surrounded by ‘##’s. Example$this->widget_hash = ‘##phylname##, ##phyfname##’; $this->rpc_field_mapSpecifies the format of the XML-RPC structures returned by the FreeMED.DynamicModule.picklist method. These are passed as key => value, where key is the target name of the structure item and value is the name of the SQL field. “id” is passed as “id” by default. If this array is not defined, FreeMED.DynamicModule.picklist will fail for the target module. Example$this->rpc_field_map = array ( ‘last_name’ => ‘ptlname’ ); _add
Basic superclass addition routine. Parameters
ReturnsNothing if there are no parameters. If $_param is specified, _add will return the id number if successful or false if unsuccessful. See Also_mod
Basic superclass modification routine. Parameters
ReturnsNothing if there are no parameters. If $_param is specified, _mod will return boolean true or false depending on whether it is successful. See Alsogenerate_form
Returns an array of form elements to be passed to <html_form::form_table> which are to be used in an add or modify form. This should be overridden, and has no use if form is overridden. to_text
Convert id to text, based on $this->widget_hash Parameters
ReturnsTextual version of record widget
Generic widget code to allow a picklist-based widget for simple modules. Should be overridden for more complex tasks. This function uses $this->widget_hash, which contains field names surrounded by ‘##’s. Parameters
ReturnsXHTML-compliant picklist widget. _setup
Internal method called by the module superclass, which executes initial table creation from create_table and initial data import from freemed_import_stock_data. |
Generic widget code to allow a picklist-based widget for simple modules.
function widget ( $varname, $conditions = false, $field = 'id', $options = NULL )
Should be overridden by any module which needs different access checks.
function acl_access ( $type )
Basic superclass addition routine.
function _add ( $_param = NULL )
Wrapper for _add.
function add ()
Basic superclass deletion routine.
function _del ( $_id = -1 )
Wrapper for _del.
function del ()
Basic superclass modification routine.
function _mod ( $_param = NULL )
Wrapper for _mod.
function mod()
Superclass stub for basic add/modify form capabilities.
function form ()
Returns an array of form elements to be passed to html_form::form_table which are to be used in an add or modify form.
function generate_form ( )
Generic picklist for XML-RPC.
function picklist ( $criteria = NULL )
Provide a list of distinct values for a particular field.
function distinct ( $field )
Get single support data field.
function get_field ( $id, $field )
Convert id to text, based on $this->widget_hash
function to_text ( $id, $field = 'id' )
Internal method called by the module superclass, which executes initial table creation from create_table and initial data import from freemed_import_stock_data.
function _setup ()
Creates the initial table definition required by this module to function properly.
function create_table ()
Import an SQL table into FreeMED
function freemed_import_stock_data ( $table_name )