Ejemplo n.º 1
0
$smarty->assign("sejours_collision", $patient->getSejoursCollisions());
$smarty->assign("isPrescriptionInstalled", CModule::getActive("dPprescription"));
$smarty->assign("canSante400", CModule::getCanDo("dPsante400"));
$smarty->assign("urgInstalled", CModule::getInstalled("dPurgences"));
$smarty->assign("heure_sortie_ambu", $heure_sortie_ambu);
$smarty->assign("heure_sortie_autre", $heure_sortie_autre);
$smarty->assign("heure_entree_veille", $heure_entree_veille);
$smarty->assign("heure_entree_jour", $heure_entree_jour);
$smarty->assign("op", $op);
$smarty->assign("plage", $op->plageop_id ? $op->_ref_plageop : new CPlageOp());
$smarty->assign("sejour", $sejour);
$smarty->assign("chir", $chir);
$smarty->assign("praticien", $prat);
$smarty->assign("patient", $patient);
$smarty->assign("sejours", $sejours);
$smarty->assign("ufs", CUniteFonctionnelle::getUFs());
$smarty->assign("_functions", $_functions);
$smarty->assign("modurgence", 1);
$smarty->assign("date_min", CMbDT::date());
$smarty->assign("date_max", CMbDT::date("+" . CAppUI::conf("dPplanningOp COperation nb_jours_urgence") . " days", CMbDT::date()));
$smarty->assign("listAnesthType", $listAnesthType);
$smarty->assign("anesthesistes", $anesthesistes);
$smarty->assign("listServices", $services);
$smarty->assign("etablissements", $etablissements);
$smarty->assign("hours", $hours);
$smarty->assign("mins", $mins);
$smarty->assign("hours_duree", $hours_duree);
$smarty->assign("hours_urgence", $hours_urgence);
$smarty->assign("mins_duree", $mins_duree);
$smarty->assign("prestations", $prestations);
$smarty->assign("blocages_lit", $blocages_lit);
/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Hospi
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkEdit();
// Récupération des paramètres
$object_guid = CValue::get("object_guid");
$object = CMbObject::loadFromGuid($object_guid);
/** @var CAffectationUniteFonctionnelle[] $affectations_uf */
$affectations_uf = $object->loadBackRefs("ufs");
CMbObject::massLoadFwdRef($affectations_uf, "uf_id");
$ufs_selected = array("medicale" => false, "hebergement" => false, "soins" => false);
foreach ($affectations_uf as $key => $_affectation_uf) {
    $_affectation_uf->loadRefUniteFonctionnelle();
    //Utilisation d'un seul type d'uf par service/chambre/lit?
    $ufs_selected[$_affectation_uf->_ref_uf->_id] = true;
    $ufs_selected[$_affectation_uf->_ref_uf->type] = true;
}
$ufs = CUniteFonctionnelle::getUFs($object->_class);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("object", $object);
$smarty->assign("ufs", $ufs);
$smarty->assign("affectations_uf", $affectations_uf);
$smarty->assign("ufs_selected", $ufs_selected);
$smarty->display("inc_affectation_uf.tpl");