Ejemplo n.º 1
0
<?php

/**
 * $Id$
 *  
 * @category Maternité
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkRead();
$patient_id = CValue::getOrSession("patient_id");
$object_guid = CValue::get("object_guid");
$allaitement = new CAllaitement();
$allaitement->patient_id = $patient_id;
$allaitements = $allaitement->loadMatchingList("date_debut DESC, date_fin DESC");
$smarty = new CSmartyDP();
$smarty->assign("allaitements", $allaitements);
$smarty->assign("patient_id", $patient_id);
$smarty->assign("object_guid", $object_guid);
$smarty->display("inc_list_allaitements.tpl");
Ejemplo n.º 2
0
 function loadLastAllaitement()
 {
     if (!CModule::getActive("maternite")) {
         return;
     }
     $allaitement = new CAllaitement();
     $where = array();
     $where["patient_id"] = "= '{$this->_id}'";
     $where[] = "date_fin IS NULL OR date_fin >= '" . CMbDT::dateTime() . "'";
     $allaitement->loadObject($where, "date_fin DESC");
     return $this->_ref_last_allaitement = $allaitement;
 }
Ejemplo n.º 3
0
<?php

/**
 * $Id$
 *  
 * @category Maternité
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkRead();
$allaitement_id = CValue::get("allaitement_id");
$patient_id = CValue::getOrSession("patient_id");
$allaitement = new CAllaitement();
$allaitement->load($allaitement_id);
if (!$allaitement->_id) {
    $allaitement->patient_id = $patient_id;
}
$patient = new CPatient();
$patient->load($allaitement->patient_id);
$grossesses = $patient->loadRefsGrossesses();
$smarty = new CSmartyDP();
$smarty->assign("allaitement", $allaitement);
$smarty->assign("grossesses", $grossesses);
$smarty->display("inc_edit_allaitement.tpl");