FreeMED.User

Class container for FreeMED user information.

Summary
Class container for FreeMED user information.
Retrieve description of current user.
Get the provider associated with the current user object.
Get list of faxes in queue to check
Gives stored description of fax in queue by id number.
Set a fax to be in the queue to check.
Create Javascript alerts for finished faxes.
Retrieves the user name.
Determines if the user is classified as a physician/provider.
Set password for specified user id
Retrieve a user configuration variable by key.
Set a user configuration variable by key to a particular value.
Determines how many new unread messages exist in the system for this user.
Creates user database table and populates it with required data.

Functions

User constructor

Parameters

$param(optional) Specify user identification number.  If not specified, the system will default to using cookie session data to supply it.

getDescription

function getDescription ($no_parameters =  "")

Retrieve description of current user.  (Usually their name)

Returns

Description of the current user object.

getPhysician

function getPhysician ($no_parameters =  "")

Get the provider associated with the current user object.

Returns

Record id of provider record, if one exists, otherwise zero.

getFaxesInQueue

function getFaxesInQueue ( )

Get list of faxes in queue to check

Returns

Array of fax ids, or NULL if there are none

getFaxDescription

function getFaxDescription ($fid)

Gives stored description of fax in queue by id number.

Parameters

$fidFax ID

Returns

String containing description

getFaxDetails

function getFaxDetails ($fid)

Parameters

$fidFax ID

Returns

Associative array

setFaxInQueue

function setFaxInQueue ($fid,  
$patient,  
$number,  
$module = NULL,
$record = NULL,
$info =  NULL)

Set a fax to be in the queue to check.

Parameters

$fidFax id
$patientPatient id
$numberDestination number
$moduleModule id
$recordRecord id
$info(optional) Textual description of fax to be stored in queue.

removeFaxFromQueue

function removeFaxFromQueue ($id)

Parameters

$idFax id (fid), not record id

faxNotify

function faxNotify ( )

Create Javascript alerts for finished faxes.

Returns

Javascript code (in SCRIPT tags) or NULL if nothing.

getName

function getName ($no_parameters =  "")

Retrieves the user name.  This is their login name.

Returns

User name for user.

isPhysician

function isPhysician ($no_parameters =  "")

Determines if the user is classified as a physician/provider.

Returns

Boolean, true if they are a physician/provider.

setPassword

function setPassword ($password,
$user_id)

Set password for specified user id

Parameters

$passwordNew password
$user_idId of user record

getManageConfig

function getManageConfig ($key)

Retrieve a user configuration variable by key.

Parameters

$keyConfiguration key to retrieve.

Returns

Value of the specified key.

getManageConfig

Set a user configuration variable by key to a particular value.

Parameters

$keyConfiguration key to set.
$valConfiguration value to set.

newMessages

function newMessages ()

Determines how many new unread messages exist in the system for this user.

Returns

Number of unread messages in the system for this user.

init

function init($adminpassword)

Creates user database table and populates it with required data.  This is not “default” or “useful starting” data, it is the data that is required to run FreeMED.

Parameters

$adminpasswordNew administrative password.
function getDescription ($no_parameters =  "")
Retrieve description of current user.
function getPhysician ($no_parameters =  "")
Get the provider associated with the current user object.
function getFaxesInQueue ( )
Get list of faxes in queue to check
function getFaxDescription ($fid)
Gives stored description of fax in queue by id number.
function getFaxDetails ($fid)
function setFaxInQueue ($fid,  
$patient,  
$number,  
$module = NULL,
$record = NULL,
$info =  NULL)
Set a fax to be in the queue to check.
function removeFaxFromQueue ($id)
function faxNotify ( )
Create Javascript alerts for finished faxes.
function getName ($no_parameters =  "")
Retrieves the user name.
function isPhysician ($no_parameters =  "")
Determines if the user is classified as a physician/provider.
function setPassword ($password,
$user_id)
Set password for specified user id
function getManageConfig ($key)
Retrieve a user configuration variable by key.
function newMessages ()
Determines how many new unread messages exist in the system for this user.
function init($adminpassword)
Creates user database table and populates it with required data.