Exemplo n.º 1
0
 function doBind()
 {
     parent::doBind();
     // recuperation du sejour_id
     $_sejour_id = CValue::post("_sejour_id", null);
     // si pas de sejour_id, redirection
     if (!$_sejour_id) {
         $this->doRedirect();
     }
     // Creation du nouvel antecedent
     unset($_POST["antecedent_id"]);
     $this->_obj = $this->_old;
     $this->_obj->_id = null;
     $this->_obj->antecedent_id = null;
     // Calcul de la valeur de l'id du dossier_medical du sejour
     $this->_obj->dossier_medical_id = CDossierMedical::dossierMedicalId($_sejour_id, "CSejour");
 }
Exemplo n.º 2
0
 /**
  * @see parent::doBind()
  */
 function doBind()
 {
     parent::doBind();
     if ($this->_obj->_edit_modificateurs) {
         $this->_obj->modificateurs = "";
         $dents = array();
         foreach ($_POST as $propName => $propValue) {
             $matches = null;
             if (preg_match("/modificateur_(.)(.)(.)?/", $propName, $matches)) {
                 $modificateur = $matches[1];
                 if (strpos($this->_obj->modificateurs, $matches[1]) === false) {
                     $this->_obj->modificateurs .= $modificateur;
                     if (isset($matches[3]) && $matches[3] == 2) {
                         $this->_obj->modificateurs .= $matches[2];
                     }
                 }
             }
         }
     }
     $this->_obj->loadRefObject();
     $this->_ref_object = $this->_obj->_ref_object;
 }
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Labo
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
$do = new CDoObjectAddEdit("CPrescriptionLaboExamen");
$pack = new CPackExamensLabo();
$pack->load($_POST["_pack_examens_labo_id"]);
$pack->loadRefs();
foreach ($pack->_ref_items_examen_labo as $item) {
    $_POST["examen_labo_id"] = $item->_ref_examen_labo->_id;
    $_POST["pack_examens_labo_id"] = $pack->_id;
    $do->doBind();
    $do->doStore();
}
$do->ajax = 1;
$do->doRedirect();