本文整理汇总了PHP中CSejour::canDo方法的典型用法代码示例。如果您正苦于以下问题:PHP CSejour::canDo方法的具体用法?PHP CSejour::canDo怎么用?PHP CSejour::canDo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSejour
的用法示例。
在下文中一共展示了CSejour::canDo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CSejour
* @subpackage soins
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
* @link http://www.mediboard.org
*/
$sejour_id = CValue::get('sejour_id');
$date = CValue::get('date', CMbDT::date());
$from = CValue::get('from');
$to = Cvalue::get('to');
$sejour = new CSejour();
$sejour->load($sejour_id);
$sejour->loadRefsFwd();
$sejour->countExchanges();
$sejour->isCoded();
$sejour->canDo();
$sejour->getAssociationCodesActes();
$sejour->loadPossibleActes();
/* Gestion des dates */
$date_entree = CMbDT::date(null, $sejour->entree);
$date_sortie = CMbDT::date(null, $sejour->sortie);
if (is_null($from) || is_null($to)) {
if (CMbDT::daysRelative($date, $date_sortie) < 0) {
$date = $date_sortie;
} elseif (CMbDT::daysRelative($date_entree, $date) < 0) {
$date = $date_entree;
}
if (CMbDT::daysRelative($date_entree, $date_sortie) < 6) {
$from = $date_entree;
$to = $date_sortie;
} elseif (CMbDT::daysRelative($date_entree, $date) < 2) {
示例2: CSejour
*
* @category dPadmissions
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
* @link http://www.mediboard.org
*/
$sejour_id = CValue::get("sejour_id");
$module = CValue::get("module");
$callback = CValue::get("callback");
$modify_sortie_prevue = CValue::get("modify_sortie_prevue", true);
$sejour = new CSejour();
$sejour->load($sejour_id);
$can_admission = CModule::getCanDo("dPadmissions");
if (!$sejour->canDo()->edit && !$can_admission->edit && !CModule::getCanDo("dPhospi")->edit && !CModule::getCanDo("dPurgences")->edit && !CModule::getCanDo("soins")->edit) {
$can_admission->redirect();
}
$sejour->loadRefServiceMutation();
$sejour->loadRefEtablissementTransfert();
//Cas des urgences
if (CModule::getActive("dPurgences")) {
$sejour->loadRefRPU()->loadRefSejourMutation();
}
$patient = $sejour->loadRefPatient();
if (CModule::getActive("maternite") && $sejour->grossesse_id) {
$sejour->loadRefsNaissances();
foreach ($sejour->_ref_naissances as $_naissance) {
/** @var CNaissance $_naissance */
$_naissance->loadRefSejourEnfant()->loadRefPatient();
}