function loadRefBrancardage()
 {
     if (!CModule::getActive("brancardage")) {
         return null;
     }
     $this->loadRefPlageConsult();
     $ljoin = array();
     $ljoin["brancardage_item"] = "brancardage_item.brancardage_id = brancardage.brancardage_id";
     $where = array();
     $where["brancardage.sejour_id"] = " = '{$this->sejour_id}'";
     $where["brancardage.date"] = " = '{$this->_date}'";
     $where["brancardage_item.destination_class"] = " = 'CService'";
     $brancardage = new CBrancardage();
     $brancardage->loadObject($where, "brancardage_id DESC", null, $ljoin);
     $brancardage->loadRefItems();
     return $this->_ref_brancardage = $brancardage;
 }
 function loadBrancardage()
 {
     if (!CModule::getActive("brancardage")) {
         return null;
     }
     $this->updateSalle();
     $ljoin = array();
     $ljoin["brancardage_item"] = "brancardage_item.brancardage_id = brancardage.brancardage_id";
     $where = array();
     $where["brancardage.sejour_id"] = " = '{$this->sejour_id}'";
     $where["brancardage.date"] = " = '{$this->date}'";
     if ($this->_ref_salle) {
         $where["brancardage_item.destination_id"] = " = '" . $this->_ref_salle->bloc_id . "'";
         $where["brancardage_item.destination_class"] = " = 'CBlocOperatoire'";
     }
     $brancardage = new CBrancardage();
     $brancardage->loadObject($where, "brancardage_id DESC", null, $ljoin);
     $brancardage->loadRefItems();
     return $this->_ref_brancardage = $brancardage;
 }