FreeMED. Authorizations

Handle all aspects of authorizations for patient visits.  This allows calculation and manipulation of visits by coverages and office visits.

Summary
Handle all aspects of authorizations for patient visits.
Find authorizations based on a coverage id
Gets the SQL record associated with an authorization.
Puts an authorization back to pre-appointment status.
“Use” an authorization.
Determine if an authorization is valid, based on the date given.
Find set of valid authorizations from a set of unvalidated authorization keys.

Functions

find_by_coverage

function find_by_coverage ($coverage)

Find authorizations based on a coverage id

Parameters

$coverageCoverage id key

Returns

Array of authorization keys, or false if it cannot find any.

get_authorization

function get_authorization ($auth)

Gets the SQL record associated with an authorization.

Parameters

$authAuthorization id key

Returns

Associative array of values.

replace

function replace_authorization ($auth)

Puts an authorization back to pre-appointment status.  This has the exact opposite effect as use_authorization, as it increases the number of visits remaining on an authorization.

Parameters

$authAuthorization key id

Returns

Boolean, successful

See Also

use_authorization

use_authorization

function use_authorization ($auth)

”Use” an authorization.  This computes remaining visits and other information for the authorization.  This has the exact opposite effect as <replace_authorization>.

Parameters

$authAuthorization key id

Returns

Boolean, successful

See Also

<replace_authorization>

valid

function valid ($auth,  
$date =  NULL)

Determine if an authorization is valid, based on the date given.

Parameters

$authAuthorization id key
$date(optional) Date for the comparison.  Defaults to the current date if none is provided.

Returns

Boolean, if authorization is currently valid.

valid_set

function valid_set ($set,  
$date =  NULL)

Find set of valid authorizations from a set of unvalidated authorization keys.

Parameters

$setArray of unvalidated authorization keys
$date(optional) Date to use for range comparison.  Defaults to the current date.

Returns

Array of valid authorization keys, or NULL array if none exist.

See Also

valid

function find_by_coverage ($coverage)
Find authorizations based on a coverage id
function get_authorization ($auth)
Gets the SQL record associated with an authorization.
function replace_authorization ($auth)
Puts an authorization back to pre-appointment status.
function use_authorization ($auth)
“Use” an authorization.
function valid ($auth,  
$date =  NULL)
Determine if an authorization is valid, based on the date given.
function valid_set ($set,  
$date =  NULL)
Find set of valid authorizations from a set of unvalidated authorization keys.