示例#1
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;
 }
 * $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
$smarty = new CSmartyDP();
$smarty->assign("motif", $motif);
$smarty->assign("motif_id", $motif_id);