Ejemplo n.º 1
0
    }
}
// Chargement de la liste des cabinets auquel le user a droit
$function = new CFunctions();
$listFunctions = $function->loadSpecialites(PERM_EDIT);
// Creation d'une categorie
$categorie = new CConsultationCategorie();
$categorie_id = CValue::getOrSession("categorie_id");
// Chargement des categories pour le cabinet selectionné ou pour le cabinet auquel appartient le user
if ($selCabinet) {
    $whereCategorie["function_id"] = " = '{$selCabinet}'";
} else {
    $whereCategorie["function_id"] = " = '{$user->function_id}'";
}
$orderCategorie = "nom_categorie ASC";
$categories = $categorie->loadList($whereCategorie, $orderCategorie);
// Chargement de la categorie selectionnee
if ($categorie_id) {
    $categorie = new CConsultationCategorie();
    $categorie->load($categorie_id);
} else {
    $categorie->valueDefaults();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("droit", $droit);
$smarty->assign("listFunctions", $listFunctions);
$smarty->assign("selCabinet", $selCabinet);
$smarty->assign("categories", $categories);
$smarty->assign("categorie", $categorie);
$smarty->display("vw_categories.tpl");
Ejemplo n.º 2
0
 $_cancel = CValue::post("cancel_{$a}", 0);
 $_precription_id = CValue::post("element_prescription_id_{$a}");
 $_category_id = CValue::post("category_id_{$a}");
 if ($_heure && $_plage_id && $_chir_id) {
     $consult = new CConsultation();
     if ($_consult_id) {
         $consult->load($_consult_id);
     }
     if (!$pause) {
         $consult->patient_id = $patient_id;
     } else {
         $consult->patient_id = null;
     }
     if ($_category_id) {
         $cat = new CConsultationCategorie();
         $cat->load($_category_id);
         if ($cat->_id) {
             $consult->duree = $duree = $cat->duree;
             $consult->categorie_id = $cat->_id;
         }
     }
     $consult->plageconsult_id = $_plage_id;
     $consult->heure = $_heure;
     if ($keep_motif) {
         $consult->motif = $motif;
     }
     $consult->rques = $_rques ? "{$rques}\n{$_rques}" : $rques;
     $consult->chrono = $chrono;
     $consult->premiere = $premiere;
     $consult->annule = $_cancel;
     $consult->element_prescription_id = $_precription_id;