* GNU General Public License * Copyright 2002,2003,2004,2005 Elpidio Latorilla * elpidio@care2x.org, * * See the file "copy_notice.txt" for the licence notice */ $lang_tables = array('date_time.php'); define('LANG_FILE', 'nursing.php'); $local_user = '******'; require_once $root_path . 'include/inc_front_chain_lang.php'; require_once $root_path . 'include/inc_config_color.php'; // load color preferences $thisfile = basename($_SERVER['PHP_SELF']); /* Create charts object */ require_once $root_path . 'include/care_api_classes/class_charts.php'; $charts_obj = new Charts(); switch ($winid) { case "diag_ther_dailyreport": $title = $LDDailyDiagTher; $element = diag_ther_dailyreport; $notes_type_nr = 7; break; case "kg_atg_etc": $title = $LDPtAtgEtcTxt; $element = "kg_atg_etc"; $notes_type_nr = 8; break; case "diet": $title = $LDDiet; $element = "diet"; $sformat = 1;
public function actionCreateChartingWidget() { if (!isset($_POST['widgetLayoutName']) || !isset($_POST['chartId'])) { throw new CHttpException(400, 'Bad Request'); } $chartId = $_POST['chartId']; $widgetSettings = array(); $chart = Charts::findByPk($chartId); if (preg_match('/::/', $widgetClass)) { // Custom module summary widget. extract model name $widgetSettings['modelType'] = preg_replace('/::.*$/', '', $widgetClass); $widgetSettings['label'] = $widgetSettings['modelType'] . ' Summary'; $widgetClass = preg_replace('/^.*::/', '', $widgetClass); if (!class_exists($widgetSettings['modelType'])) { echo 'false'; } } $widgetLayoutName = $_POST['widgetLayoutName']; list($success, $uid) = SortableWidget::createSortableWidget(Yii::app()->params->profile, $widgetClass, $widgetLayoutName, $widgetSettings); if ($success) { echo $widgetClass::getWidgetContents($this, Yii::app()->params->profile, $widgetLayoutName, $uid); } else { echo 'false'; } }
return true; } } return false; } private function add_chart($chart_id, $target_id, $target_type, $log_name) { $sql = "insert into knowing_charts set chart_id=?, target_id=?, target_type=?, log_name=?, lasttime=?"; $sth = $this->link->prepare($sql); $sth->execute(array($chart_id, $target_id, $target_type, $log_name, date('Y-m-d H:i:s'))); return $this->link->lastInsertId(); } private function delete_chart($chart_id) { $sql = "delete from knowing_charts where chart_id={$chart_id}"; $sth = $this->link->prepare($sql); $sth->execute(array()); } } echo "=========" . date('Y-m-d H:i:s') . "=====" . $argv[1] . "===\n"; $o = new Charts($link, $link_log, $link_chart_log); switch ($argv[1]) { case 'add': $o->add(); break; case 'delete': $o->delete(); break; default: $o->select(); }
/* switch ($enc_obj->EncounterClass()) { case '1': $full_en = ($pn + $GLOBAL_CONFIG['patient_inpatient_nr_adder']); break; case '2': $full_en = ($pn + $GLOBAL_CONFIG['patient_outpatient_nr_adder']); break; default: $full_en = ($pn + $GLOBAL_CONFIG['patient_inpatient_nr_adder']); } */ $full_en = $pn; if ($enc_obj->is_loaded) { $result =& $enc_obj->encounter; $rows = $enc_obj->record_count; /* Create charts object */ include_once $root_path . 'include/care_api_classes/class_charts.php'; $charts_obj = new Charts(); // get Allergy notes type = 22 $allergy =& $charts_obj->getChartNotes($pn, 22); // get Diagnosis notes type = 12 $diagnosis =& $charts_obj->getChartNotes($pn, 12); // get extra diagnosis notes type = 14 $x_diagnosis =& $charts_obj->getChartNotes($pn, 14); // get anticoag notes type = 10 $anticoag_notes =& $charts_obj->getChartNotes($pn, 10); // get additional notes type = 11 $lot_mat =& $charts_obj->getChartNotes($pn, 11); // get daily Diet plans $diet =& $charts_obj->getChartDailyDietPlans($pn, $date_start, $date_end); // get daily main notes (diag/therapy) $main_notes = $charts_obj->getChartDailyMainNotes($pn, $date_start, $date_end); // get daily etc notes (pt-atg-etc)
/** * CARE2X Integrated Hospital Information System Deployment 2.1 - 2004-10-02 * GNU General Public License * Copyright 2002,2003,2004,2005 Elpidio Latorilla * elpidio@care2x.org, * * See the file "copy_notice.txt" for the licence notice */ define('LANG_FILE', 'nursing.php'); $local_user = '******'; require_once $root_path . 'include/inc_front_chain_lang.php'; //$db->debug=true; $thisfile = basename($_SERVER['PHP_SELF']); /* Create charts object */ require_once $root_path . 'include/care_api_classes/class_charts.php'; $charts_obj = new Charts(); $title = "{$LDMedication}/{$LDDosage}"; /* Establish db connection */ if (!isset($db) || !$db) { include $root_path . 'include/inc_db_makelink.php'; } if ($dblink_ok) { /* Load date formatter */ include_once $root_path . 'include/inc_date_format_functions.php'; if ($mode == 'save') { $saved = false; $data_array = array(); for ($i = 0; $i < $maxelement; $i++) { $notes = 'r' . $i; $prev = 'prev' . $i; $notes_nr = 'notes_nr' . $i;
function screen_charts($id, $source) { include dirname(__FILE__) . '/models/charts.php'; $chart = new Charts($this->url()); if ($source == 'hole') { $hole = DH_Hole::get($id); $type = 'percent'; if (isset($_GET['type'])) { $type = $_GET['type']; } if ($type == 'percent') { $display = 'pie'; if (isset($_GET['display'])) { $display = $_GET['display']; } if (!in_array($display, array('pie', 'bar'))) { $display = 'pie'; } $chart->set_source($this->url() . '/charts/hole.php?type=percent&display=' . $display . '&hole=' . $hole->id); } else { if ($type == 'time') { $display = 'monthly'; if (isset($_GET['display'])) { $display = $_GET['display']; } if (!in_array($display, array('hourly', 'daily', 'monthly'))) { $display = 'daily'; } $chart->set_source($this->url() . '/charts/hole.php?type=time&display=' . $display . '&hole=' . $hole->id . $chart->time_to_query($chart->get_time($hole))); } } $base = $this->base() . '?page=drain-hole.php&chart=' . $hole->id . '&source=hole'; $this->render_admin('chart_holes', array('hole' => $hole, 'chart' => $chart, 'type' => $type, 'display' => $display, 'base' => $base)); } else { $file = DH_File::get($id); $type = 'access'; $display = 'daily'; if (isset($_GET['type']) && in_array($_GET['type'], array('access', 'version'))) { $type = $_GET['type']; } if (isset($_GET['display']) && in_array($_GET['display'], array('hourly', 'daily', 'monthly'))) { $display = $_GET['display']; } $chart->set_source($this->url() . '/charts/file.php?type=' . $type . '&display=' . $display . '&file=' . $file->id . $chart->time_to_query($chart->get_time($file))); $base = $this->base() . '?page=drain-hole.php&chart=' . $file->id; $this->render_admin('chart_files', array('file' => $file, 'chart' => $chart, 'type' => $type, 'display' => $display, 'base' => $base)); } }
* CARE2X Integrated Hospital Information System Deployment 2.1 - 2004-10-02 * GNU General Public License * Copyright 2002,2003,2004,2005 Elpidio Latorilla * elpidio@care2x.org, * * See the file "copy_notice.txt" for the licence notice */ $lang_tables = array('date_time.php'); define('LANG_FILE', 'nursing.php'); $local_user = '******'; require_once $root_path . 'include/inc_front_chain_lang.php'; //$db->debug=true; $thisfile = basename($_SERVER['PHP_SELF']); /* Create charts object */ require_once $root_path . 'include/care_api_classes/class_charts.php'; $charts_obj = new Charts(); $title = $LDBpTemp; $maxelement = 10; /* Load date formatter */ include_once $root_path . 'include/inc_date_format_functions.php'; // get orig data if ($mode == 'save') { $saved = 0; $data_array = array(); $data_array['encounter_nr'] = $pn; $data_array['measured_by'] = $_SESSION['sess_user_name']; $data_array['unit_nr'] = 14; // 14 = mmHg unit of measurement , must be set to local standards $data_array['msr_date'] = date('Y-m-d', mktime(0, 0, 0, $mo, $dy, $yr)); // Save the blood pressure data for ($i = 0; $i < $maxelement; $i++) {
function set_colors($array) { self::$colors = $array; }
<?php require_once 'ed.php'; $oChart = new Charts(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Enterprise Dashboard</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script src="../../FusionCharts/FusionCharts.js" type="text/javascript"></script> <style type="text/css"> body { background-color: #FFFF99; } #charts { display: block; width: 400px; background-color: #ffaaaa; margin: 10px auto; } #charts div { display: inline-block; }
function uninstall() { $query = new DB_Table_Delete(Charts::getTables()); }
* See the file "copy_notice.txt" for the licence notice */ define('LANG_FILE', 'nursing.php'); $local_user = '******'; require_once $root_path . 'include/inc_front_chain_lang.php'; $thisfile = basename($_SERVER['PHP_SELF']); //$db->debug=true; if (!isset($prescriber) || empty($prescriber)) { $prescriber = $_COOKIE[$local_user . $sid]; } $title = "{$LDMedication}/{$LDDosage}"; $maxelement = 5; // set to default maximum nr of elements for entry /* Create charts object */ require_once $root_path . 'include/care_api_classes/class_charts.php'; $charts_obj = new Charts(); if ($mode == 'save') { /* Reset colorbar flags */ $mark_antibiotic = 0; $mark_diuretic = 0; $mark_anticoag = 0; $mark_iv = 0; /* Load visual signalling functions */ include_once $root_path . 'include/inc_visual_signalling_fx.php'; $saved = false; for ($i = 0; $i < $maxelement; $i++) { $tdx = 'm' . $i; $ddx = 'd' . $i; $cdx = 'c' . $i; if (!(empty(${$tdx}) || empty(${$ddx}))) { $data_array['encounter_nr'] = $pn;
* CARE2X Integrated Hospital Information System Deployment 2.1 - 2004-10-02 * GNU General Public License * Copyright 2002,2003,2004,2005 Elpidio Latorilla * elpidio@care2x.org, * * See the file "copy_notice.txt" for the licence notice */ $lang_tables = array('date_time.php'); define('LANG_FILE', 'nursing.php'); $local_user = '******'; require_once $root_path . 'include/inc_front_chain_lang.php'; //$db->debug=true; $thisfile = basename($_SERVER['PHP_SELF']); /* Create charts object */ require_once $root_path . 'include/care_api_classes/class_charts.php'; $charts_obj = new Charts(); switch ($winid) { case 'diag_ther': $title = $LDDiagnosisTherapy; //$element='diag_ther'; $notes_type_nr = 12; break; case "lot_mat_etc": $title = $LDExtraNotes; //$element="lot_mat_etc"; $notes_type_nr = 11; break; case "anticoag": $title = $LDAntiCoag; $element = "anticoag"; $notes_type_nr = 10;