Inherited Variables
Inherited Methods
Class: Core
- Core::coreFieldNames()
- Returns the core field names of the core table in an array.
- Core::deleteDBCache()
- Deletes data from the database cache based on the id key.
- Core::FilesListArray()
- Returns a list of filename within a path in array.
- Core::getAllDataArray()
- Returns all records with the all items from the table.
- Core::getAllDataObject()
- Returns all records with all items from the table.
- Core::getAllItemsArray()
- Similar to getAllItemsObject() method but returns the records in an associative array.
- Core::getAllItemsObject()
- Returns all records with the needed items from the table.
- Core::getDBCache()
- Gets temporary data from the database cache.
- Core::getErrorMsg()
- Feturns the value of error_msg, the internal error message.
- Core::getLastQuery()
- Returns the the last sql query string
- Core::getResult()
- Feturns the value of result
- Core::insertDataFromArray()
- Inserts data from an array (passed by reference) into a table.
- Core::insertDataFromInternalArray()
- Inserts data from the internal array previously filled with data by the setDataArray() method.
- Core::isPreLoaded()
- Returns the value of is_preloaded that is set by methods that preload large number of data.
- Core::LastRecordCount()
- Returns the value of rec_count
- Core::saveDBCache()
- Saves temporary data to a cache in database.
- Core::setDataArray()
- Points the core data array to the external array that holds the data to be stored.
- Core::setRefArray()
- Points the reference variable $ref_array to the field names' array.
- Core::setSQL()
- Sets the internal sql query variable to the sql query.
- Core::setTable()
- Sets the coretable variable to the name of the database table.
- Core::setWhereCondition()
- Sets the "where" condition in an update query used with the updateDataFromInternalArray() method.
- Core::Transact()
- Transaction routine, ADODB transaction. It internally uses the ADODB transaction routine.
- Core::updateDataFromArray()
- Updates a record with the data from an array (passed by reference) based on the primary key.
- Core::updateDataFromInternalArray()
- Updates a table using data from an internal array previously filled with data by the setDataArray() method.
- Core::_prepSaveArray()
- Filters the data array intended for saving, removing the key-value pairs that do not correspond to the table's field names.
- Core::_RecordExists()
- Checks if a certain database record exists based onthe supplied query condition.
Class Details
Department methods.
Note this class should be instantiated only after a "$db" adodb connector object has been established by an adodb instance.
Tags:
- copyright - 2002,2003,2004 Elpidio Latorilla
- version - beta 1.0.08
- author - Elpidio Latorilla
[ Top ]
Class Variables
$dept_count =
[line 57]
Holder for departments count
Type: int
Overrides:
[ Top ]
$dept_nr =
[line 62]
Holder for current department number
Type: int
Overrides:
[ Top ]
$is_preloaded = FALSE
[line 52]
Preloaded flag
Type: boolean
Overrides: Array
[ Top ]
$preload_dept =
[line 47]
Holder for preloaded dept data
Tags:
- var - record object
Type: object adodb
Overrides:
[ Top ]
$result =
[line 42]
Holder for sql query results.
Tags:
- var - record object
Type: object adodb
Overrides: Array
[ Top ]
$tabfields = array('nr',
'id',
'type',
'name_formal',
'name_short',
'name_alternate',
'LD_var',
'description',
'admit_inpatient',
'admit_outpatient',
'has_oncall_doc',
'has_oncall_nurse',
'does_surgery',
'this_institution',
'is_sub_dept',
'parent_dept_nr',
'work_hours',
'consult_hours',
'is_inactive',
'sort_order',
'address',
'sig_line',
'sig_stamp',
'logo_mime_type',
'status',
'history',
'modify_id',
'modify_time',
'create_id',
'create_time')
[line 67]
Field names of care_department table
Type: array
Overrides:
[ Top ]
$tb = 'care_department'
[line 22]
Table name for department data
Type: string
Overrides:
[ Top ]
$tb_cphone = 'care_phone'
[line 32]
Table name for phone and contact data
Type: string
Overrides:
[ Top ]
$tb_room = 'care_room'
[line 37]
Table name for rooms
Type: string
Overrides:
[ Top ]
$tb_types = 'care_type_department'
[line 27]
Table name for department types data
Type: string
Overrides:
[ Top ]
Class Methods
Department
Department Department(
[int
$nr = 0])
[line 101]
Constructor
Parameters:
- int $nr - Department number
[ Top ]
Address
string Address(
[mixed
$nr = 0])
[line 399]
Returns the department address. Use preferably after the department was successfully preloaded by the preloadDept() method.
Parameters:
[ Top ]
FormalName
mixed FormalName(
[mixed
$nr = 0])
[line 377]
Returns the department formal name. Use preferably after the department was successfully preloaded by the preloadDept() method.
Tags:
- return - string or boolean
Parameters:
[ Top ]
getAll
mixed getAll(
)
[line 155]
Gets all departments without condition. The result is assoc array sorted by departments formal name
Tags:
- return - boolean or adodb record object or assoc array
- access - public
Parameters:
[ Top ]
getAllActive
mixed getAllActive(
)
[line 163]
Gets all ACTIVE departments. The result is assoc array sorted by departments formal name
Tags:
- return - boolean or adodb record object or assoc array
- access - public
Parameters:
[ Top ]
getAllActiveObject
mixed getAllActiveObject(
)
[line 171]
Gets all ACTIVE departments. The result is adodb record object sorted by departments formal name
Tags:
- return - boolean or adodb record object or assoc array
- access - public
Parameters:
[ Top ]
getAllActiveORNrs
void getAllActiveORNrs(
)
[line 482]
Gets all active OR Room numbers
return mixed adodb record object or boolean FALSE
Parameters:
[ Top ]
getAllActiveSort
mixed getAllActiveSort(
[mixed
$sort = ''])
[line 188]
Gets all ACTIVE departments. The result is assoc array sorted by param $sort
Tags:
- return - boolean or adodb record object or assoc array
- access - public
Parameters:
[ Top ]
getAllActiveWithDOC
assoc getAllActiveWithDOC(
)
[line 237]
Gets all ACTIVE medical departments with doctors-on-call assigned. The result is assoc array sorted by departments formal name
Tags:
- return - array sorted by departments formal name
- access - public
Parameters:
[ Top ]
getAllActiveWithNOC
mixed getAllActiveWithNOC(
)
[line 245]
Gets all ACTIVE medical departments with nurse-on-call assigned. The result is assoc array sorted by departments formal name
Tags:
- return - assoc array (sorted by department formal name) or boolean or adodb record object
- access - public
Parameters:
[ Top ]
getAllActiveWithSurgery
mixed getAllActiveWithSurgery(
)
[line 253]
Gets all ACTIVE medical departments that does surgery. The result is assoc array sorted by departments formal name
Tags:
- return - assoc array (sorted by department formal name) or boolean or adodb record object
- access - public
Parameters:
[ Top ]
getAllMedical
mixed getAllMedical(
)
[line 196]
Gets all ACTIVE medical departments. The result is assoc array sorted by departments formal name
Tags:
- return - assoc array (sorted by param $sort) or boolean or adodb record object
- access - public
Parameters:
[ Top ]
getAllMedicalObject
mixed getAllMedicalObject(
)
[line 205]
Gets all ACTIVE medical departments. The result is adodb record object sorted by departments formal name
Returns adodb record object sorted by departments formal name
Tags:
- return - assoc array (sorted by department formal name) or boolean or adodb record object
- access - public
Parameters:
[ Top ]
getAllMedicalWithOnCall
mixed getAllMedicalWithOnCall(
)
[line 213]
Gets all ACTIVE medical departments with doctors-on-call or nurse-on-call assigned. The result is assoc array sorted by departments formal name
Tags:
- return - assoc array (sorted by department formal name) or boolean or adodb record object
- access - public
Parameters:
[ Top ]
getAllNewsGroup
mixed getAllNewsGroup(
)
[line 229]
Gets all ACTIVE NEWS departments. The result is assoc array sorted by departments formal name
Tags:
- return - assoc array (sorted by department formal name) or boolean or adodb record object
- access - public
Parameters:
[ Top ]
getAllNoCondition
mixed getAllNoCondition(
[string
$sort = ''])
[line 136]
Gets all departments without condition
Tags:
- return - boolean or 2 dimensional array
- access - public
Parameters:
- string $sort - Sort condition which includes the field name and the sort direction e.g. "ORDER BY name_formal DESC"
[ Top ]
getAllSort
mixed getAllSort(
[string
$sort = ''])
[line 180]
Gets all departments without condition
Tags:
- return - boolean or adodb record object or assoc array
- access - public
Parameters:
- string $sort - Sort item e.g. "name_formal"
[ Top ]
getAllSupporting
mixed getAllSupporting(
)
[line 221]
Gets all ACTIVE NON-MEDICAL departments. The result is assoc array sorted by departments formal name
Tags:
- return - assoc array (sorted by department formal name) or boolean or adodb record object
- access - public
Parameters:
[ Top ]
getDeptAllInfo
mixed getDeptAllInfo(
int
$nr)
[line 301]
Gets all information of one department. The result is 2 dimensional associative array.
Tags:
- return - 1 dimensional associative array or boolean
- access - public
Parameters:
- int $nr - Department number
[ Top ]
getPhoneInfo
array getPhoneInfo(
int
$nr)
[line 457]
Gets the contact (phone, beeper, etc) of a department from the care_department table.
Tags:
- return - Associative array
- access - public
Parameters:
- int $nr - Department number
[ Top ]
getTypeInfo
mixed getTypeInfo(
mixed
$type_nr)
[line 281]
Gets a department type information. The result is 2 dimensional associative array.
Tags:
- return - 1 dimensional assoc array or boolean
- access - public
Parameters:
[ Top ]
getTypes
mixed getTypes(
)
[line 262]
Gets all department types information. The result is assoc array unsorted.
Tags:
- return - 2 dimensional array unsorted or boolean
- access - public
Parameters:
[ Top ]
ID
mixed ID(
)
[line 361]
Returns the department ID. Use preferably after the department was successfully preloaded by the preloadDept() method.
Tags:
- return - string or boolean
Parameters:
[ Top ]
isOR
boolean isOR(
[int
$room_nr = 0])
[line 517]
Checks if room number is an operating room (OR)
Tags:
- access - public
Parameters:
- int $room_nr - Room number
[ Top ]
isSurgery
boolean isSurgery(
[int
$dept_nr = 0])
[line 501]
Checks if department does surgery
Tags:
- access - public
Parameters:
- int $dept_nr - Department number
[ Top ]
LDvar
string LDvar(
[mixed
$nr = 0])
[line 421]
Returns the department's language dependent variable name. Use preferably after the department was successfully preloaded by the preloadDept() method.
Parameters:
[ Top ]
Nr
mixed Nr(
)
[line 353]
Returns the department number. Use preferably after the department was successfully preloaded by the preloadDept() method.
Tags:
- return - integer or boolean
Parameters:
[ Top ]
preloadDept
boolean preloadDept(
[int
$nr = 0])
[line 321]
Preloads all information of one department into the objects internal buffer $preload_dept and sets the internal flag $is_preloaded.
The information is returned individually through the appropriate methods
Tags:
- access - public
Parameters:
- int $nr - Department number
[ Top ]
setDeptNr
void setDeptNr(
int
$nr)
[line 475]
Sets the department number used by the object on run time
Parameters:
- int $nr - Department number
[ Top ]
ShortName
mixed ShortName(
)
[line 391]
Returns the department short name. Use preferably after the department was successfully preloaded by the preloadDept() method.
Tags:
- return - string or boolean
Parameters:
[ Top ]
SignatureStamp
string SignatureStamp(
[mixed
$nr = 0])
[line 410]
Returns the department signature stamp. Use preferably after the department was successfully preloaded by the preloadDept() method.
Parameters:
[ Top ]
Type
mixed Type(
)
[line 369]
Returns the department type. Use preferably after the department was successfully preloaded by the preloadDept() method.
Tags:
- return - integer or boolean
Parameters:
[ Top ]
unloadDept
boolean unloadDept(
)
[line 342]
Empties the internal buffer $preload_dept and resets the internal flag $is_preloaded
Tags:
- access - public
Parameters:
[ Top ]
_getalldata
mixed _getalldata(
[string
$cond = '1'], [string
$sort = ''], [string
$ret_type = ''])
[line 114]
Gets all data from the care_department table
Tags:
- return - boolean or adodb record object or assoc array, determined by param $ret_type
- access - private
Parameters:
- string $cond - WHERE condition of the sql query
- string $sort - Sort item
- string $ret_type - Determines the return type whether adodb object (_OBJECT) or assoc array (_ARRAY, '', empty)
[ Top ]
_getItem
mixed _getItem(
[string
$item = ''])
[line 435]
Gets the item information of a department from the care_department table.
Use only if the department number was previously set with the constructor or with the setDeptNr() method.
Tags:
- return - 1 dimensional array or FALSE
- access - private
Parameters:
- string $item - Item or field name
[ Top ]