コード例 #1
0
<?php

/**
 * $Id: ajax_edit_supervision_timed_picture.php 20428 2013-09-20 12:14:48Z phenxdesign $
 *
 * @package    Mediboard
 * @subpackage Patients
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 20428 $
 */
CCanDo::checkAdmin();
$supervision_timed_picture_id = CValue::getOrSession("supervision_timed_picture_id");
$picture = new CSupervisionTimedPicture();
$picture->load($supervision_timed_picture_id);
$picture->loadRefsNotes();
$picture->loadRefsFiles();
$tree = CMbPath::getTree("modules/dPpatients/images/supervision");
$smarty = new CSmartyDP();
$smarty->assign("picture", $picture);
$smarty->assign("tree", $tree);
$smarty->display("inc_edit_supervision_timed_picture.tpl");
コード例 #2
0
/**
 * $Id: ajax_edit_observation_timed_picture.php 20370 2013-09-16 09:56:03Z phenxdesign $
 *
 * @package    Mediboard
 * @subpackage SalleOp
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 20370 $
 */
CCanDo::checkRead();
$object_guid = CValue::get("object_guid");
$timed_picture_id = CValue::get("timed_picture_id");
/** @var COperation|CSejour $object */
$object = CStoredObject::loadFromGuid($object_guid);
$timed_picture = new CSupervisionTimedPicture();
$timed_picture->load($timed_picture_id);
$timed_picture->loadRefsFiles();
$result = new CObservationResult();
$result->value_type_id = $timed_picture->value_type_id;
$result->loadRefValueType();
$result->value = "FILE";
$result_set = new CObservationResultSet();
$result_set->context_class = $object->_class;
$result_set->context_id = $object->_id;
$result_set->datetime = CMbDT::dateTime();
$result_set->patient_id = $object->loadRelPatient()->_id;
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("result", $result);
$smarty->assign("result_set", $result_set);
コード例 #3
0
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Patients
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkAdmin();
$group = CGroups::loadCurrent();
$graphs = CSupervisionGraph::getAllFor($group);
$timed_data = CSupervisionTimedData::getAllFor($group);
$timed_pictures = CSupervisionTimedPicture::getAllFor($group);
$instant_data = CSupervisionInstantData::getAllFor($group);
$packs = CSupervisionGraphPack::getAllFor($group, true);
foreach ($graphs as $_graph) {
    $_axes = $_graph->loadRefsAxes();
    foreach ($_axes as $_axis) {
        $_axis->loadBackRefs("series");
    }
}
$smarty = new CSmartyDP();
$smarty->assign("graphs", $graphs);
$smarty->assign("packs", $packs);
$smarty->assign("timed_data", $timed_data);
$smarty->assign("timed_pictures", $timed_pictures);
$smarty->assign("instant_data", $instant_data);
$smarty->display("inc_list_supervision_graph.tpl");
コード例 #4
0
/**
 * $Id: do_select_supervision_picture.php 26555 2014-12-23 12:48:14Z flaviencrochard $
 *  
 * @category Patients
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision: 26555 $
 * @link     http://www.mediboard.org
 */
CCanDo::checkAdmin();
$path = str_replace("..", "", CValue::post("path"));
$timed_picture_id = CValue::post("timed_picture_id");
if (is_file($path) && strpos(CSupervisionTimedPicture::PICTURES_ROOT, $path) !== 0) {
    $timed_picture = new CSupervisionTimedPicture();
    $timed_picture->load($timed_picture_id);
    $file = new CFile();
    $file->setObject($timed_picture);
    $file->fillFields();
    $file->file_name = basename($path);
    $file->doc_size = filesize($path);
    $file->file_type = CMbPath::guessMimeType($path);
    $file->moveFile($path, false, true);
    if ($msg = $file->store()) {
        CAppUI::setMsg($msg, UI_MSG_WARNING);
    } else {
        CAppUI::setMsg("Image enregistrée");
    }
}
echo CAppUI::getMsg();