// Chargement des 3 check lists de l'OMS
$check_lists = array();
$check_item_categories = array();
$check_list = new CDailyCheckList();
$cat = new CDailyCheckItemCategory();
$cat->target_class = $object->_class;
// Pre-anesth, pre-op, post-op
foreach ($check_list->_specs["type"]->_list as $_type) {
    if (CDailyCheckList::$types[$_type] != $type_group) {
        continue;
    }
    $list = CDailyCheckList::getList($object, null, $_type);
    $list->loadItemTypes();
    $list->loadRefsFwd();
    $list->loadBackRefs('items');
    $list->isReadonly();
    if ($list->_ref_object instanceof COperation) {
        $list->_ref_object->loadRefPraticien();
    }
    $check_lists[$_type] = $list;
    $cat->type = $_type;
    $check_item_categories[$_type] = $cat->loadMatchingList("title");
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("object", $object);
$smarty->assign("check_item_categories", $check_item_categories);
$smarty->assign("check_lists", $check_lists);
$smarty->assign("type_group", $type_group);
$smarty->assign("validateurs_list", $validateurs);
$smarty->display("inc_edit_object_check_lists.tpl");
예제 #2
0
    $validateurs = explode("|", $check_list->_ref_list_type->type_validateur);
    $type_personnel = array();
    foreach ($validateurs as $valid) {
        $type_personnel[] = $valid;
    }
}
$personnel = CPersonnel::loadListPers(array_unique(array_values($type_personnel)), true, true);
// Chargement des praticiens
$listChirs = new CMediusers();
$listChirs = $listChirs->loadPraticiens(PERM_DENY);
// Chargement des anesths
$listAnesths = new CMediusers();
$listAnesths = $listAnesths->loadAnesthesistes(PERM_DENY);
$check_item_category = new CDailyCheckItemCategory();
if ($check_list->_ref_list_type->type == "fermeture_salle") {
    $check_item_category->list_type_id = $check_list->list_type_id;
} else {
    $check_item_category->target_class = $check_list->object_class;
    $check_item_category->type = $check_list->type;
}
$check_item_categories = $check_item_category->loadMatchingList("title");
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("check_list", $check_list);
$smarty->assign("personnel", $personnel);
$smarty->assign("list_chirs", $listChirs);
$smarty->assign("list_anesths", $listAnesths);
$smarty->assign("anesth_id", $anesth_id);
$smarty->assign("anesth", $anesth);
$smarty->assign("check_item_categories", $check_item_categories);
$smarty->display("inc_edit_check_list.tpl");
 $selOp->_ref_plageop->loadRefsFwd();
 $selOp->_ref_consult_anesth->_ref_consultation->loadRefsBack();
 $selOp->_ref_consult_anesth->_ref_consultation->loadRefPraticien()->loadRefFunction();
 if (!$selOp->prat_visite_anesth_id && $selOp->_ref_anesth->_id) {
     $selOp->prat_visite_anesth_id = $selOp->_ref_anesth->_id;
 }
 $selOp->loadLiaisonLibelle();
 $listAnesthType = new CTypeAnesth();
 $listAnesthType = $listAnesthType->loadGroupList();
 // Vérification de la check list journalière
 $daily_check_list = CDailyCheckList::getList($selOp->_ref_salle, $date);
 $daily_check_list->loadItemTypes();
 $daily_check_list->loadBackRefs('items');
 $cat = new CDailyCheckItemCategory();
 $cat->target_class = "CSalle";
 $daily_check_item_categories = $cat->loadMatchingList();
 // Chargement des 3 check lists de l'OMS
 $operation_check_list = new CDailyCheckList();
 $cat = new CDailyCheckItemCategory();
 $where_cat = array();
 $where_cat["target_class"] = " = 'COperation'";
 $where_cat["list_type_id"] = "IS NULL";
 $lists = array();
 // Pre-anesth, pre-op, post-op
 foreach ($operation_check_list->_specs["type"]->_list as $type) {
     $list = CDailyCheckList::getList($selOp, null, $type);
     $list->loadItemTypes();
     $list->loadRefsFwd();
     $list->loadBackRefs('items');
     $list->isReadonly();
     $list->_ref_object->loadRefPraticien();