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
Image 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
$def_root_path = 'fotos/encounter/'
[line 42]
Default root path for stored images
Type: string
Overrides:
[ Top ]
$fld_image = array('nr',
'encounter_nr',
'shot_date',
'shot_nr',
'mime_type',
'upload_date',
'notes',
'status',
'history',
'modify_id',
'modify_time',
'create_id',
'create_time')
[line 52]
Field names of care_encounter_image table
Type: array
Overrides:
[ Top ]
$fld_img_diag = array('nr',
'pid',
'encounter_nr',
'doc_ref_ids',
'img_type',
'max_nr',
'upload_date',
'cancel_date',
'cancel_by',
'notes',
'status',
'history',
'modify_id',
'modify_time',
'create_id',
'create_time')
[line 69]
Field names of care_img_diagnostic table
Type: array
Overrides:
[ Top ]
$mimefilter = 'jpg,gif,png,bmp'
[line 32]
Default filter string for allowed file extensions
Type: string
Overrides:
[ Top ]
$tb_image = 'care_encounter_image'
[line 22]
Table name for encounter's image data
Type: string
Overrides:
[ Top ]
$tb_img_diag = 'care_img_diagnostic'
[line 27]
Table name for diagnostics images data
Type: string
Overrides:
[ Top ]
$tb_person = 'care_person'
[line 47]
Table name for person's registration data
Type: string
Overrides:
[ Top ]
$ul_img_ext = ''
[line 37]
Holder for the uploaded file' extension/mime type
Type: string
Overrides:
[ Top ]
Class Methods
Image
Image Image(
)
[line 89]
Constructor
Parameters:
[ Top ]
DicomImages
mixed DicomImages(
[string
$key = ''])
[line 283]
Gets a list of dicom images.
The returned adodb record object contains rows of arrays. Each array contains the data with the following index keys:
- nr = primary key number of the image record entry
- encounter_nr = encounter number of the dicom image (if available)
- upload_date = date of image upload
- max_nr = number of images within the image group
- note_len = the length of notes (if available)
- pid = the patient's PID number
- name_last = patient's last or family name
- name_first = patient's first or given name
- date_birth = date of birth
Tags:
- return - adodb record object or boolean
- access - public
Parameters:
- string $key - Search keyword. If empty all dicom images will be returned as list.
[ Top ]
getAllImageData
mixed getAllImageData(
int
$enc_nr, [string
$shot_date = 0])
[line 211]
Gets all data from the care_encounter_image table which are pertinent to the encounter.
Tags:
- return - ADODB record object or boolean
- access - public
Parameters:
- int $enc_nr - Encounter number
- string $shot_date - Shot date of the image
[ Top ]
getDicomImage
mixed getDicomImage(
[int
$nr = ''])
[line 318]
Gets a dicom image based on its primary key number.
The returned array contains the data with the index keys as set in the $fld_img_diag array.
Tags:
- return - array or boolean
- access - public
Parameters:
- int $nr - Record number.
[ Top ]
getImageData
mixed getImageData(
array
&$data)
[line 147]
Gets the image' s data from the database table.
The query data is passed via an associative array containing the following index keys:
- encounter_nr = encounter number
- shot_date = date when image was taken
- shot_nr = number of the image
Tags:
- return - adodb record object or boolean
Parameters:
- array &$data - Data used for query constraint. By reference.
[ Top ]
getLastShotNr
mixed getLastShotNr(
array
&$data)
[line 171]
Gets the last shot number of an image data by encounter number and shot date.
The query data is passed via an associative array containing the following index keys:
- encounter_nr = encounter number
- shot_date = date when image was taken
- shot_nr = number of the image
Tags:
- return - adodb record object or boolean
Parameters:
- array &$data - Data used for query constraint. By reference.
[ Top ]
ImageNotesExists
mixed ImageNotesExists(
array
&$data)
[line 105]
Checks if the image notes record exists in the table.
The data is passed via an associative array containing the following index keys:
- encounter_nr = encounter number
- shot_date = date when image was taken
- shot_nr = number of the image
Tags:
- return - integer or boolean
Parameters:
- array &$data - Data
[ Top ]
ImgNotes
mixed ImgNotes(
[int
$nr = 0])
[line 383]
Returns the notes of an image.
Tags:
- return - string or boolean
- access - public
Parameters:
- int $nr - Primary key number of image record.
[ Top ]
isValidUploadedImage
boolean isValidUploadedImage(
array
&$img, [string
$mfilter = ''])
[line 233]
Checks whether the uploaded image file is valid or not.
File's extension/mime type will be extracted and saved in the internal $ul_img_ext buffer.
Tags:
- access - public
Parameters:
- array &$img - Image pointer, (pass by reference) usually $HTTP_POST_FILES
- string $mfilter - Optional filter string for mime types. If empty, default filter string $mimefilter will be used
[ Top ]
saveImageData
mixed saveImageData(
array
&$data)
[line 189]
Saves all data pertinent to the image.
If successful, the last insert ID will be returned.
Tags:
- return - integer or boolean
- access - public
Parameters:
- array &$data - Data to be saved.
[ Top ]
saveImgDiagnosticData
mixed saveImgDiagnosticData(
array
&$data)
[line 343]
Saves all data to care_img_diagnostic table.
If successful, the last insert ID will be returned, else FALSE.
Tags:
- return - string or boolean
- access - public
Parameters:
- array &$data - Image data for saving.
[ Top ]
saveUploadedImage
void saveUploadedImage(
array
&$img, [string
$fpath = ''], [string
$fname = ''])
[line 259]
Saves the uploaded image with the given filename into a given path.
Tags:
- access - public
Parameters:
- array &$img - Image file in array (pass by reference) (usually $HTTP_POST_FILES)
- string $fpath - Complete path for the stored image. If empty, the default $def_root_path will be used.
- string $fname - Filename of the stored image. If empty, the original file name will be used.
[ Top ]
setImgMaxNr
boolean setImgMaxNr(
[int
$nr = 0], int
$count)
[line 370]
Sets the value of max_nr of care_img_diagnostic table.
Tags:
- access - public
Parameters:
- int $nr - Primary key number of image record.
- int $count - Maximum number
[ Top ]
updateImageNotes
boolean updateImageNotes(
array
&$data)
[line 122]
Checks if the image notes record exists in the table.
Parameters:
- array &$data - Data for updating
[ Top ]
UploadedImageMimeType
string UploadedImageMimeType(
)
[line 248]
Returns the extension/mime type of the uploaded image file that was checked by the isValidUploadedImage() method.
Tags:
- access - public
Parameters:
[ Top ]
useImgDiagnostic
void useImgDiagnostic(
)
[line 331]
Sets the core table and fields to care_img_diagnostic table.
Parameters:
[ Top ]
__delete
boolean __delete(
int
$nr)
[line 358]
Deletes an image record based on its "nr" value.
Tags:
- access - private
Parameters:
- int $nr - Primary key number of image record.
[ Top ]