* @link http://www.mediboard.org */ CCanDo::checkEdit(); //get $document_guid = CValue::get("document_guid"); $patient_id = CValue::get("patient_id"); /** @var CDocumentExterne $document */ $document = CMbObject::loadFromGuid($document_guid); if (!$document->_id) { CAppUI::stepAjax("PB"); } $account = $document->loadRefAccount(); //$praticien = $account->loadRefMediuser(); $file = $document->loadRefFile(true); $cat = new CFilesCategory(); $cats = $cat->loadListWithPerms(); if (!$file->_id) { CAppUI::stepAjax("CBioServeurAccount-msg-no_file_id_spectified_for_moving", UI_MSG_ERROR); } $file->loadTargetObject(); //finding patient $patient = $document->findPatient(); //smarty $smarty = new CSmartyDP("modules/messagerie"); $smarty->assign("file", $file); $smarty->assign("file_categories", $cats); //$smarty->assign("praticien", $praticien); $smarty->assign("document", $document); $smarty->assign("guessing_date", $document->document_date); $smarty->assign("patient", $patient); $smarty->display("inc_move_file.tpl");
} $operations = $_sejour->loadRefsOperations(); CMbObject::filterByPerm($operations); foreach ($operations as $_op) { $_op->loadRefsFiles(); foreach ($_op->_ref_files as $_key => $_file) { $right = $_file->canDo(); if (!$_file->isImage() || !$_file->_can->read || $_file->annule) { unset($_op->_ref_files[$_key]); continue; } } } } // file categories $category = new CFilesCategory(); $categories = $category->loadListWithPerms(PERM_EDIT); $matrices = array(); $matrices["1x2"] = array("line" => 2, "col" => 1); $matrices["2x1"] = array("line" => 1, "col" => 2); $matrices["2x2"] = array("line" => 2, "col" => 2); $matrices["2x3"] = array("line" => 3, "col" => 2); $matrices["3x2"] = array("line" => 2, "col" => 3); $matrices["3x3"] = array("line" => 3, "col" => 3); $smarty = new CSmartyDP(); $smarty->assign("patient", $patient); $smarty->assign("context", $context); $smarty->assign("matrices", $matrices); $smarty->assign("categories", $categories); $smarty->assign("default_disposition", $default_disposition); $smarty->display("inc_img_to_document.tpl");
/** * Get the list of categories for a specific class * * @param string $class Class name * * @return self[] */ static function listCatClass($class = null) { $instance = new CFilesCategory(); $where = array($instance->_spec->ds->prepare("`class` IS NULL OR `class` = %", $class)); return $instance->loadListWithPerms(PERM_READ, $where, "nom"); }