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
Personnel 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
$assign_fields = array('nr',
'personell_nr',
'role_nr',
'location_type_nr',
'location_nr',
'date_start',
'date_end',
'is_temporary',
'list_frequency',
'status',
'history',
'modify_id',
'modify_time',
'create_id',
'create_time')
[line 104]
Field names of care_personell_assignment
Type: array
Overrides:
[ Top ]
$depts =
[line 70]
Depatments data buffer
Tags:
- var - record object
Type: adodb
Overrides:
[ Top ]
$dpoc_fields = array('nr',
'dept_nr',
'role_nr',
'year',
'month',
'duty_1_txt',
'duty_2_txt',
'duty_1_pnr',
'duty_2_pnr',
'status',
'history',
'modify_id',
'modify_time',
'create_id',
'create_time')
[line 85]
Field names of care_dutyplan_oncall
Type: array
Overrides:
[ Top ]
$is_loaded = 'FALSE'
[line 60]
Loaded data flag
Type: boolean
Overrides:
[ Top ]
$personell_data =
[line 80]
Personnel data buffer
Tags:
- var - record object
Type: adodb
Overrides:
[ Top ]
$personell_fields = array('nr',
'short_id',
'pid',
'job_type_nr',
'job_function_title',
'date_join',
'date_exit',
'contract_class',
'contract_start',
'contract_end',
'pay_class',
'pay_class_sub',
'local_premium_id',
'tax_account_nr',
'ir_code',
'nr_workday',
'nr_weekhour',
'nr_vacation_day',
'multiple_employer',
'nr_dependent',
'status',
'history',
'modify_id',
'modify_time',
'create_id',
'create_time')
[line 123]
Field names of care_personell
Type: array
Overrides:
[ Top ]
$record_count =
[line 75]
Resulting rows count buffer
Type: int
Overrides:
[ Top ]
$result =
[line 55]
SQL query result buffer
Tags:
- var - record object
Type: adodb
Overrides: Array
[ Top ]
$row =
[line 65]
Resulting row buffer
Type: array
Overrides:
[ Top ]
$tb = 'care_personell'
[line 24]
Table name for personnel data
Tags:
- access - private
Type: string
Overrides:
[ Top ]
$tb_assign = 'care_personell_assignment'
[line 29]
Table name for personnel assignments
Tags:
- access - private
Type: string
Overrides:
[ Top ]
$tb_citytown = 'care_address_citytown'
[line 49]
Table name for city-town names
Tags:
- access - private
Type: string
Overrides:
[ Top ]
$tb_cphone = 'care_phone'
[line 44]
Table name for phone and contact information
Tags:
- access - private
Type: string
Overrides:
[ Top ]
$tb_dpoc = 'care_dutyplan_oncall'
[line 39]
Table name for on-call duty plans
Tags:
- access - private
Type: string
Overrides:
[ Top ]
$tb_person = 'care_person'
[line 34]
Table name for person registration data.
Tags:
- access - private
Type: string
Overrides:
[ Top ]
Class Methods
Personell
Personell Personell(
)
[line 152]
Constructor
Parameters:
[ Top ]
Beeper1
void Beeper1(
)
[line 679]
Returns first pager number
Use this methode only after the personnell data was successfully loaded with the loadPersonellData() method.
Tags:
- access - public
Parameters:
[ Top ]
Beeper2
void Beeper2(
)
[line 686]
Returns second pager number
Use this methode only after the personnell data was successfully loaded with the loadPersonellData() method.
Tags:
- access - public
Parameters:
[ Top ]
BirthDate
void BirthDate(
)
[line 651]
Returns date of birth
Use this methode only after the personnell data was successfully loaded with the loadPersonellData() method.
Tags:
- access - public
Parameters:
[ Top ]
DOCDutyplanExists
void DOCDutyplanExists(
int
$dept_nr, int
$year, int
$month)
[line 304]
Checks if the doctors' on-call duty plan of a given department number, year and month exists in the databank.
If the on-call duty plan exists, its record primary key number will be returned, else FALSE
If the on-call duty plan exists, its record primary key number will be returned, else FALSE
Tags:
- access - public
Parameters:
- int $dept_nr - Department number
- int $year - Year
- int $month - Month
[ Top ]
Exists
mixed Exists(
[int
$pid = 0])
[line 560]
Checks if the PID number (the person) exists as employee in the database.
If person exists as employee, its record primary number key will be returned, else FALSE.
Tags:
- return - integer or boolean
- access - public
Parameters:
- int $pid - PID number
[ Top ]
FirstName
void FirstName(
)
[line 644]
Returns the employee's first/given name
Use this methode only after the personnell data was successfully loaded with the loadPersonellData() method.
Tags:
- access - public
Parameters:
[ Top ]
formattedAddress_DE
void formattedAddress_DE(
)
[line 693]
Returns full address in german format
Use this methode only after the personnell data was successfully loaded with the loadPersonellData() method.
Tags:
- access - public
Parameters:
[ Top ]
getDOCDutyplan
void getDOCDutyplan(
int
$dept_nr, int
$year, int
$month, [string
$elems = '*'])
[line 360]
Gets the doctors' on-call duty plan of a department number, year and month.
The returned items are based on the field names passed as string to the method. To see the allowed field names to be passed, see the $fld_dpoc array.
Tags:
- access - public
Parameters:
- int $dept_nr - Department number
- int $year - Year
- int $month - Month
- string $elems - Field names of items to be fetched
[ Top ]
getDOCQuicklist
mixed getDOCQuicklist(
array
&$depts, int
$year, int
$month)
[line 467]
Gets a list of departments with doctors' on-call duty plan of a given year and month.
An array to hold the department numbers must be passed as reference.
Tags:
- return - array or boolean
- access - public
Parameters:
- array &$depts - Department numbers. Associative, reference.
- int $year - Year
- int $month - Month
[ Top ]
getDoctorsOfDept
void getDoctorsOfDept(
[int
$dept_nr = 0])
[line 214]
Returns information of all nurses of a department.
The returned adodb record object contains rows of arrays. Each array contains the personnel data with the following index keys:
- nr = record's primary key number
- personell_nr = personnel or employee number
- job_function_title = job function title or name
- name_last = employee's last or family name
- name_first = employee's first or given name
- date_birth = date of birth
- sex = sex
Tags:
- access - public
Parameters:
- int $dept_nr - Department number
[ Top ]
getNOCDutyplan
void getNOCDutyplan(
int
$dept_nr, int
$year, int
$month, [string
$elems = '*'])
[line 372]
Gets the Nurses' on-call duty plan of a department number, year and month.
The returned items are based on the field names passed as string to the method. To see the allowed field names to be passed, see the $fld_dpoc array.
Tags:
- access - public
Parameters:
- int $dept_nr - Department number
- int $year - Year
- int $month - Month
- string $elems - Field names of items to be fetched
[ Top ]
getNOCQuicklist
mixed getNOCQuicklist(
array
&$depts, int
$year, int
$month)
[line 481]
Gets a list of departments with Nurses' on-call duty plan of a given year and month.
An array to hold the department numbers must be passed as reference.
Tags:
- return - array or boolean
- access - public
Parameters:
- array &$depts - Department numbers. Associative, reference.
- int $year - Year
- int $month - Month
[ Top ]
getNursesOfDept
void getNursesOfDept(
[int
$dept_nr = 0])
[line 224]
Returns information of all nurses of a department.
The returned adodb record object contains rows of arrays. Each array contains the personnel data with the following index keys:
- nr = record's primary key number
- personell_nr = personnel or employee number
- job_function_title = job function title or name
- name_last = employee's last or family name
- name_first = employee's first or given name
- date_birth = date of birth
- sex = sex
Tags:
- access - public
Parameters:
- int $dept_nr - Department number
[ Top ]
getPersonellInfo
mixed getPersonellInfo(
int
$nr)
[line 391]
Gets the personnel information based on its personnel number key.
The returned array contains the personnel data with the following index keys:
- all index keys as outlined in the $personell_fields array
- all index keys as outlined in the Person::$elems_array array
- funk1 = first pager number
- inphone1 = first internal phone number
- inphone2 = second internal phone number
- inphone3 = third internal phone number
Tags:
- return - adodb record object or boolean
- access - public
Parameters:
- int $nr - Personnel number
[ Top ]
InitPersonellNrExists
boolean InitPersonellNrExists(
int
$init_nr)
[line 186]
Checks if the personnel (employee) number exists in the database.
Tags:
- access - public
Parameters:
- int $init_nr - Personnel number
[ Top ]
InPhone1
void InPhone1(
)
[line 658]
Returns first internal phone number
Use this methode only after the personnell data was successfully loaded with the loadPersonellData() method.
Tags:
- access - public
Parameters:
[ Top ]
InPhone2
void InPhone2(
)
[line 665]
Returns second internal phone number
Use this methode only after the personnell data was successfully loaded with the loadPersonellData() method.
Tags:
- access - public
Parameters:
[ Top ]
InPhone3
void InPhone3(
)
[line 672]
Returns third internal phone number
Use this methode only after the personnell data was successfully loaded with the loadPersonellData() method.
Tags:
- access - public
Parameters:
[ Top ]
LastName
void LastName(
)
[line 637]
Returns the employee's last/family name
Use this methode only after the personnell data was successfully loaded with the loadPersonellData() method.
Tags:
- access - public
Parameters:
[ Top ]
loadPersonellData
boolean loadPersonellData(
[int
$nr = 0])
[line 587]
Loads the personnel data in the internal buffer $personell_data. based on its personnel number key.
The data is stored in the internal buffer array $personell_data . This method returns only TRUE or FALSE. The load success status is also stored in the $is_loaded variable.
Tags:
- access - public
Parameters:
- int $nr - Personnel number
[ Top ]
NOCDutyplanExists
void NOCDutyplanExists(
int
$dept_nr, int
$year, int
$month)
[line 316]
Checks if the nurses' on-call duty plan of a given department number, year and month exists in the databank.
If the on-call duty plan exists, its record primary key number will be returned, else FALSE
If the on-call duty plan exists, its record primary key number will be returned, else FALSE
Tags:
- access - public
Parameters:
- int $dept_nr - Department number
- int $year - Year
- int $month - Month
[ Top ]
PID
string PID(
)
[line 705]
Returns person's PID number.
Use this methode only after the personnell data was successfully loaded with the loadPersonellData() method.
Tags:
- access - public
Parameters:
[ Top ]
searchLimitPersonellBasicInfo
mixed searchLimitPersonellBasicInfo(
string
$key, int
$len, int
$so, string
$oitem, string
$odir)
[line 549]
Search similar to searchPersonellBasicInfo but returns a limited number of rows.
For detailed structure of returned data, see searchPersonellBasicInfo() method.
Tags:
- return - adodb record object or boolean
- access - public
Parameters:
- string $key - Search key word
- int $len - Maximum number of rows returned, default 30 rows
- int $so - Index of the first returned row, default 0 = start
- string $oitem - Field name to sort, default = 'name_last'
- string $odir - Sort direction, default = ASC
[ Top ]
searchPersonellBasicInfo
mixed searchPersonellBasicInfo(
string
$key, [string
$oitem = 'name_last'], [string
$odir = 'ASC'], [boolean
$limit = FALSE], [int
$len = 30], [int
$so = 0])
[line 504]
Searches and returns basic personnel information.
The returned adodb record object contains rows of arrays. Each array contains the personnel data with the following index keys:
- nr = record's primary key number
- job_function_title = job function title or name
- name_last = employee's last or family name
- name_first = employee's first or given name
- date_birth = date of birth
- sex = sex
Tags:
- return - adodb record object or boolean
Parameters:
- string $key - Search key words
- string $oitem - Field name to sort, default = 'name_last'
- string $odir - Sort direction, default = ASC
- boolean $limit - Flags whether the return is limited or not, default FALSE
- int $len - Maximum number of rows returned, default 30 rows
- int $so - Index of the first returned row default 0 = start
[ Top ]
Title
void Title(
)
[line 630]
Returns the title
Use this methode only after the personnell data was successfully loaded with the loadPersonellData() method.
Tags:
- access - public
Parameters:
[ Top ]
useAssignmentTable
void useAssignmentTable(
)
[line 168]
Sets the core object to point to the care_personell_assignment table and field names.
Tags:
- access - public
Parameters:
[ Top ]
useDutyplanTable
void useDutyplanTable(
)
[line 160]
Sets the core object to point to the care_dutyplan_oncall table and field names.
Tags:
- access - public
Parameters:
[ Top ]
usePersonellTable
void usePersonellTable(
)
[line 176]
Sets the core object to point to the care_personell table and field names.
Tags:
- access - public
Parameters:
[ Top ]
_getAllPersonell
void _getAllPersonell(
int
$loc_type_nr, [int
$role_nr = 0], int
$dept_nr)
[line 236]
Returns information of all personnel (employee) based on location type, role number and department number keys
The returned adodb record object contains rows of arrays. Each array contains the personnel data with the following index keys:
- nr = record's primary key number
- personell_nr = personnel or employee number
- job_function_title = job function title or name
- name_last = employee's last or family name
- name_first = employee's first or given name
- date_birth = date of birth
- sex = sex
Tags:
- access - private
Parameters:
- int $loc_type_nr - Location type number
- int $role_nr - Role number
- int $dept_nr - Department number
[ Top ]
_getOCDutyplan
void _getOCDutyplan(
int
$role_nr, [int
$dept_nr = 0], [int
$year = 0], [int
$month = 0], [string
$elems = '*'])
[line 337]
Gets the on-call duty plan of a given role number, department number, year and month.
The returned items are based on the field names passed as string to the method. To see the allowed field names to be passed, see the $fld_dpoc array.
Tags:
- access - private
Parameters:
- int $role_nr - Role number
- int $dept_nr - Department number
- int $year - Year
- int $month - Month
- string $elems - Field names of items to be fetched
[ Top ]
_getOCQuicklist
mixed _getOCQuicklist(
int
$role_nr, [int
$year = 0], [int
$month = 0])
[line 425]
Gets a list of departments with on-call duty plan of a given role number, year and month.
The returned array contains the department numbers with availabe on-call plan.
Tags:
- return - array or boolean
- access - private
Parameters:
- int $role_nr - Role number
- int $year - Year
- int $month - Month
[ Top ]
_OCDutyplanExists
void _OCDutyplanExists(
int
$role_nr, [int
$dept_nr = 0], [int
$year = 0], [int
$month = 0])
[line 276]
Checks if the on-call duty plan of a given role number, department number, year and month exists in the databank.
If the on-call duty plan exists, its record primary key number will be returned, else FALSE
Tags:
- access - private
Parameters:
- int $role_nr - Role number
- int $dept_nr - Department number
- int $year - Year
- int $month - Month
[ Top ]