Class: Charts

Source Location: /class_charts.php

Class Overview [line 20]

Core
   |
   --Notes
      |
      --NursingNotes
         |
         --Charts

Charts methods.

Author(s):

  • Elpidio Latorilla

Version:

  • beta 1.0.08

Copyright:

  • 2002,2003 Elpidio Latorilla

Variables

Methods


Inherited Methods

Class: NursingNotes

NursingNotes::NursingNotes()
Constructor
NursingNotes::DailyWardNotesExists()
Checks if daily ward notes record exists in the database.
NursingNotes::EffectivityExists()
Checks if nursing effectivity report record exists in the database.
NursingNotes::Exists()
Checks if nursing report record exists in the database.
NursingNotes::getDailyWardNotes()
Gets all daily notes data of an encounter number.
NursingNotes::getEffectivityReport()
Gets a nursing effectivity report based on the encounter_nr key.
NursingNotes::getNursingAndEffectivityReport()
Gets both nursing report and effectivity report based on the encounter_nr key.
NursingNotes::getNursingReport()
Gets a nursing report based on the encounter_nr key.
NursingNotes::getNursingReportDateRange()
Gets the date range of a nursing report.
NursingNotes::saveDailyWardNotes()
Saves a ward notes of a day.
NursingNotes::saveEffectivityReport()
Saves a nursing effectivity report.
NursingNotes::saveNursingReport()
Saves a nursing report.

Class: Notes

Notes::Notes()
Constructor
Notes::getAllTypes()
Gets all types of notes record. Unsorted result.
Notes::getAllTypesSort()
Gets all types of notes record. Sorted result.
Notes::getEncounterNotes()
Gets all notes of a given record number.
Notes::getType()
Gets notes type information based on the type number (nr key).
Notes::_Exists()
Checks if a certain notes record of a certain type exists in the database.
Notes::_getNotes()
Gets a notes record data based on a passed condition.
Notes::_getNotesDateRange()
Gets the date range of a certain notes type that fits to a given condition.
Notes::_insertNotesFromInternalArray()
Save a notes data of a given type number.
Notes::_updateNotesFromInternalArray()
Updates a notes data record based on the primary record key "nr".

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

Charts methods.

Note this class should be instantiated only after a "$db" adodb connector object has been established by an adodb instance.

Tags:

[ Top ]


Class Variables

$fld_measure = array(
                        'nr',
                        'msr_date',
                        'msr_time',
                        'encounter_nr',
                        'msr_type_nr',
                        'value',
                        'unit_nr',
                        'unit_type_nr',
                        'notes',
                        'measured_by',
                        'status',
                        'history',
                        'modify_id',
                        'modify_time',
                        'create_id',
                        'create_time')

[line 40]

Field names of care_encounter_measurement table

Type: array

Overrides:

[ Top ]

$fld_prescription = array(
                        'nr',
                        'encounter_nr',
                        'prescription_type_nr',
                        'article',
                        'drug_class',
                        'order_nr',
                        'dosage',
                        'application_type_nr',
                        'notes',
                        'prescribe_date',
                        'prescriber',
                        'color_marker',
                        'is_current',
                        'status',
                        'history',
                        'modify_id',
                        'modify_time',
                        'create_id',
                        'create_time')

[line 61]

Field names of care_encounter_prescription table

Type: array

Overrides:

[ Top ]

$fld_presc_notes = array(
                        'nr',
                        'date',
                        'prescription_nr',
                        'notes',
                        'short_notes',
                        'status',
                        'history',
                        'modify_id',
                        'modify_time',
                        'create_id',
                        'create_time')

[line 85]

Field names of care_encounter_prescription_notes table

Type: array

Overrides:

[ Top ]

$tb_measure = 'care_encounter_measurement'

[line 25]

Table name for encounter measurement data

Type: string

Overrides:

[ Top ]

$tb_prescription = 'care_encounter_prescription'

[line 30]

Table name for encounter prescription data

Type: string

Overrides:

[ Top ]

$tb_presc_notes = 'care_encounter_prescription_notes'

[line 35]

Table name for prescription notes data

Type: string

Overrides:

[ Top ]


Class Methods

Charts

Charts Charts( )

[line 100]

Constructor

Parameters:

[ Top ]

EndPrescription

boolean EndPrescription( int $nr)

[line 303]

Stops or marks the end of prescription data based on the nr key.

Parameters:

  • int $nr - Record number key

[ Top ]

getAllCurrentPrescription

mixed getAllCurrentPrescription( int $enr)

[line 320]

Gets all current prescription data based on the encounter_nr key.

Tags:

  • return - adodb record object or boolean

Parameters:

  • int $enr - Encounter number

[ Top ]

getChartDailyAnticoagNotes

mixed getChartDailyAnticoagNotes( int $enr, string $start, string $end)

[line 447]

Gets anticoaguants data of a given date range.

Tags:

  • return - adodb record object or boolean

Parameters:

  • int $enr - Encounter number
  • string $start - Starting date in yyyy-mm-dd format
  • string $end - Ending date in yyyy-mm-dd format

[ Top ]

getChartDailyDietPlans

mixed getChartDailyDietPlans( int $enr, string $start, string $end)

[line 411]

Gets diet plan of a given date range.

Tags:

  • return - adodb record object or boolean

Parameters:

  • int $enr - Encounter number
  • string $start - Starting date in yyyy-mm-dd format
  • string $end - Ending date in yyyy-mm-dd format

[ Top ]

getChartDailyEtcNotes

mixed getChartDailyEtcNotes( int $enr, string $start, string $end)

[line 435]

Gets supplementary notes data of a given date range.

Tags:

  • return - adodb record object or boolean

Parameters:

  • int $enr - Encounter number
  • string $start - Starting date in yyyy-mm-dd format
  • string $end - Ending date in yyyy-mm-dd format

[ Top ]

getChartDailyIVNotes

mixed getChartDailyIVNotes( int $enr, string $start, string $end)

[line 459]

Gets IV notes data of a given date range.

Tags:

  • return - adodb record object or boolean

Parameters:

  • int $enr - Encounter number
  • string $start - Starting date in yyyy-mm-dd format
  • string $end - Ending date in yyyy-mm-dd format

[ Top ]

getChartDailyMainNotes

mixed getChartDailyMainNotes( int $enr, string $start, string $end)

[line 423]

Gets main notes data of a given date range.

Tags:

  • return - adodb record object or boolean

Parameters:

  • int $enr - Encounter number
  • string $start - Starting date in yyyy-mm-dd format
  • string $end - Ending date in yyyy-mm-dd format

[ Top ]

getChartDailyPrescriptionNotes

mixed getChartDailyPrescriptionNotes( int $enr, string $start, string $end)

[line 471]

Gets prescription notes data of a given date range.

Tags:

  • return - adodb record object or boolean

Parameters:

  • int $enr - Encounter number
  • string $start - Starting date in yyyy-mm-dd format
  • string $end - Ending date in yyyy-mm-dd format

[ Top ]

getChartNotes

mixed getChartNotes( int $enr, int $type_nr)

[line 148]

Gets chart notes data based on the type_nr key.

The result is sorting ascending by data and time.

Tags:

  • return - adodb record object or boolean
  • access - public

Parameters:

  • int $enr - Encounter number
  • int $type_nr - Type number of notes

[ Top ]

getDayBP

boolean getDayBP( int $enr, string $date)

[line 240]

Gets a blood pressure data based on encounter_nr and date keys.

Tags:

  • access - public

Parameters:

  • int $enr - Encounter number
  • string $date - Date of measurement

[ Top ]

getDayChartNotes

mixed getDayChartNotes( int $enr, int $type_nr, string $date)

[line 180]

Gets chart notes data based on the type_nr key and date key.

The result is sorting ascending by data and time.

Tags:

  • return - adodb record object or boolean
  • access - public

Parameters:

  • int $enr - Encounter number
  • int $type_nr - Type number of notes
  • string $date - Date in yyyy-mm-dd format

[ Top ]

getDayPrescriptionNotes

mixed getDayPrescriptionNotes( int $enr, string $date)

[line 335]

Gets prescription data of a day based on the encounter_nr and date keys.

Tags:

  • return - adodb record object or boolean

Parameters:

  • int $enr - Encounter number
  • string $date - Prescription date

[ Top ]

getDayTemperature

boolean getDayTemperature( int $enr, string $date)

[line 254]

Gets a temperature data based on encounter_nr and date keys.

Tags:

  • access - public

Parameters:

  • int $enr - Encounter number
  • string $date - Date of measurement

[ Top ]

getDiagnosis

mixed getDiagnosis( int $enr)

[line 118]

Gets the diagnosis text based on the encounter_nr key.

The result is sorted ascending by date and time.

Tags:

  • return - adodb record object or boolean
  • access - public

Parameters:

  • int $enr - Encounter number

[ Top ]

saveBPFromArray

boolean saveBPFromArray( array &$data)

[line 207]

Saves a blood pressure data.

Data must be contained in an associative array and passed by reference.

Tags:

  • access - public

Parameters:

  • array &$data - Data contained in an associative array. Reference pass.

[ Top ]

saveChartNotesFromArray

boolean saveChartNotesFromArray( array &$data_array, int $type_nr)

[line 161]

Saves chart notes data of the type_nr type key into the database.

The data to be stored are contained in an associative array and passed by reference.

Tags:

  • access - public

Parameters:

  • array &$data_array - Chart notes data in associative array
  • int $type_nr - Notes type number

[ Top ]

saveDiagnosisFromArray

boolean saveDiagnosisFromArray( int &$data_array)

[line 130]

Saves a diagnosis text data into the database.

The data to be stored are contained in an associative array and passed by reference.

Tags:

  • access - public

Parameters:

  • int &$data_array - Encounter number

[ Top ]

savePrescriptionFromArray

boolean savePrescriptionFromArray( array &$data)

[line 267]

Saves prescription data.

Data must be contained in an associative array and passed by reference.

Parameters:

  • array &$data - Data contained in an associative array. Reference pass.

[ Top ]

savePrescriptionNotesFromArray

boolean savePrescriptionNotesFromArray( array &$data)

[line 353]

Saves prescription notes.

Data must be contained in an associative array and passed by reference.

Parameters:

  • array &$data - Data contained in an associative array. Reference pass.

[ Top ]

saveTemperatureFromArray

boolean saveTemperatureFromArray( array &$data)

[line 224]

Saves a temperature data.

Data must be contained in an associative array and passed by reference.

Tags:

  • access - public

Parameters:

  • array &$data - Data contained in an associative array. Reference pass.

[ Top ]

updatePrescriptionFromArray

boolean updatePrescriptionFromArray( int $nr, array &$data)

[line 287]

Updates prescription data based on the nr key.

Data must be contained in an associative array and passed by reference.

Parameters:

  • int $nr - Record number key
  • array &$data - Data contained in an associative array. Reference pass.

[ Top ]

updatePrescriptionNotesFromArray

boolean updatePrescriptionNotesFromArray( int $nr, array &$data)

[line 373]

Saves prescription notes based on the primary record key "nr".

Data must be contained in an associative array and passed by reference.

Parameters:

  • int $nr - Record number
  • array &$data - Data contained in an associative array. Reference pass.

[ Top ]

_getChartDailyData

boolean _getChartDailyData( int $enr, int $notes_id, int $type_nr, string $start, string $end)

[line 394]

Gets table field's data of a given date range.

The resulting data is buffered in the $result variable.

Parameters:

  • int $enr - Encounter number
  • int $notes_id - Field name of the table to be fetched
  • int $type_nr - Type number of the notes
  • string $start - Starting date in yyyy-mm-dd format
  • string $end - Ending date in yyyy-mm-dd format

[ Top ]

_prepareSaveMeasurement

void _prepareSaveMeasurement( )

[line 191]

Prepares the measurement data for storing into the database.

The data are transferred to an associative array, the core table is set to measurement table and the reference array is set to the measurementtable's field names.

Tags:

  • access - private

Parameters:

[ Top ]

_usePrescriptionTable

void _usePrescriptionTable( )

[line 107]

Sets the core table to the prescription table

Tags:

  • access - private

Parameters:

[ Top ]


Documentation generated on Sun, 16 Nov 2003 01:02:32 +0100 by phpDocumentor 1.2.3