/**
  * Chargement des motifs du chapitre
  * 
  * @return CMotif[]
  */
 function loadRefsMotifs()
 {
     $motif = new CMotif();
     $where = array("chapitre_id" => " = '{$this->_id}'");
     $order = "code_diag";
     return $this->_ref_motifs = $motif->loadList($where, $order);
 }
Example #2
0
 /**
  * Chargement du motif de l'urgence
  * 
  * @return CMotif
  */
 function loadRefMotif()
 {
     $motif = new CMotif();
     if ($this->code_diag) {
         $motif->code_diag = $this->code_diag;
         $motif->loadMatchingObject();
         $motif->loadRefChapitre();
     }
     return $this->_ref_motif = $motif;
 }
Example #3
0
    $nb_printers = $function->countBackRefs("printers");
}
$list_mode_entree = array();
if (CAppUI::conf("dPplanningOp CSejour use_custom_mode_entree")) {
    $mode_entree = new CModeEntreeSejour();
    $where = array("actif" => "= '1'");
    $list_mode_entree = $mode_entree->loadGroupList($where);
}
if (CAppUI::conf("ref_pays") == 2) {
    $rpu->loadRefEchelleTri();
    $rpu->loadRefMotif();
    $rpu->loadRefsReponses();
    $rpu->orderCtes();
    $chapitre = new CChapitreMotif();
    $chapitres = $chapitre->loadList();
    $motif = new CMotif();
    if ($rpu->code_diag) {
        $motif->chapitre_id = $rpu->_ref_motif->chapitre_id;
    }
    $motifs = $motif->loadMatchingList();
}
$is_praticien = CAppUI::$user->isPraticien();
// Création du template
$smarty = new CSmartyDP();
if (CAppUI::conf("ref_pays") == 2) {
    $smarty->assign("chapitre_id", 0);
    $smarty->assign("chapitres", $chapitres);
    $smarty->assign("motif_id", 0);
    $smarty->assign("motifs", $motifs);
}
$smarty->assign("group", $group);
<?php

/**
 * $Id: ajax_edit_chapitre_motif.php 27936 2015-04-13 12:53:35Z aurelie17 $
 *
 * @package    Mediboard
 * @subpackage Urgences
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 27936 $
 */
CCanDo::checkRead();
$motif_id = CValue::get("motif_id");
$chapitre_id = CValue::get("chapitre_id");
$readonly = CValue::get("readonly");
$motif = new CMotif();
if ($motif_id) {
    $motif->load($motif_id);
    $motif->loadRefChapitre();
    $motif->loadRefsQuestions();
    if ($readonly) {
        $motif->loadRefsQuestionsByDegre();
    }
}
$chapitre = new CChapitreMotif();
$chapitres = $chapitre->loadList(null, "nom");
if ($chapitre_id) {
    $chapitre->load($chapitre_id);
    $chapitre->loadRefsMotifs();
}
// Création du template
Example #5
0
$search = CValue::get("search");
$reload = CValue::get("reload", 0);
$see_hors_ccmu = CValue::getOrSession("see_hors_ccmu", 0);
$rpu = new CRPU();
$rpu->load($rpu_id);
$rpu->loadRefMotif();
$rpu->loadRefsReponses();
$rpu->orderCtes();
$where = array();
if ($chapitre_id) {
    $where["chapitre_id"] = " = '{$chapitre_id}'";
}
if ($search) {
    $where[] = "nom LIKE '%{$search}%' or code_diag LIKE '%{$search}%'";
}
$motif = new CMotif();
$motifs = $motif->loadList($where, "chapitre_id", null, "motif_id");
if (!$see_hors_ccmu) {
    foreach ($motifs as $_motif) {
        /* @var CMotif $_motif*/
        if (!($_motif->degre_min <= $rpu->_estimation_ccmu && $_motif->degre_max >= $rpu->_estimation_ccmu)) {
            unset($motifs[$_motif->_id]);
        }
    }
}
$chapitre = new CChapitreMotif();
/** @var CChapitreMotif[] $chapitres */
$chapitres = $chapitre->loadList(null, "nom");
$chapitres_search = $chapitres;
foreach ($motifs as $_motif) {
    /* @var CMotif $_motif*/
Example #6
0
<?php

/**
 * $Id: vw_motifs.php 27936 2015-04-13 12:53:35Z aurelie17 $
 *
 * @package    Mediboard
 * @subpackage Urgences
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 27936 $
 */
CCanDo::checkRead();
$motif_id = CValue::getOrSession("motif_id");
$chapitre_id = CValue::getOrSession("chapitre_id");
$liste = CValue::get("liste");
$motif = new CMotif();
$motifs = $motif->loadList(null, "chapitre_id");
$chapitre = new CChapitreMotif();
/** @var CChapitreMotif[] $chapitres */
$chapitres = $chapitre->loadList(null, "nom");
foreach ($chapitres as $chap) {
    $chap->loadRefsMotifs();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("motif_id", $motif_id);
$smarty->assign("chapitre_id", $chapitre_id);
$smarty->assign("chapitres", $chapitres);
if ($liste == "motif") {
    $smarty->display("vw_list_motifs.tpl");
} elseif ($liste == "chapitre") {