} } } foreach ($features as $_prefix => $values) { addConfigConfigCategory($module, $_prefix, null, false); addConfigConfigCategory($module, $_prefix, $values); } } if ($categories = @CAppUI::conf($module)) { foreach ($categories as $category => $values) { addConfigConfigCategory($module, $category, $values); } } if ($module == "system") { foreach (CAppUI::conf() as $chapter => $values) { if (!CModule::exists($chapter) && $chapter != "db") { addConfigConfigCategory(null, $chapter, $values); } } } if ($module != "common") { $files = CAppUI::readFiles("modules/{$module}", '\\.php$'); addLocale("Module", "Name", "module-{$module}-court"); addLocale("Module", "Name", "module-{$module}-long"); foreach ($files as $_file) { $_tab = substr($_file, 0, -4); if (in_array($_tab, array("setup", "index", "config", "preferences", "configuration"))) { continue; } addLocale("Module", "Tabs", "mod-{$module}-tab-{$_tab}"); }
$where = array(); $where["cancelled"] = "= '0'"; $service = new CService(); $services = $service->loadGroupList($where); // Contraintes sur le mode de sortie / destination $contrainteDestination["mutation"] = array("", 1, 2, 3, 4); $contrainteDestination["transfert"] = array("", 1, 2, 3, 4); $contrainteDestination["normal"] = array("", 6, 7); // Contraintes sur le mode de sortie / orientation $contrainteOrientation["transfert"] = array("", "HDT", "HO", "SC", "SI", "REA", "UHCD", "MED", "CHIR", "OBST"); $contrainteOrientation["normal"] = array("", "FUGUE", "SCAM", "PSA", "REO"); // Praticiens urgentistes $listPrats = $user->loadPraticiens(PERM_READ, $group->service_urgences_id); // Si accès au module PMSI : peut modifier le diagnostic principal $access_pmsi = 0; if (CModule::exists("dPpmsi")) { $module = new CModule(); $module->mod_name = "dPpmsi"; $module->loadMatchingObject(); $access_pmsi = $module->getPerm(PERM_EDIT); } // Si praticien : peut modifier le CCMU, GEMSA et diagnostic principal $is_praticien = CAppUI::$user->isPraticien(); // Création du template $smarty = new CSmartyDP(); $smarty->assign("contrainteDestination", $contrainteDestination); $smarty->assign("contrainteOrientation", $contrainteOrientation); $smarty->assign("services", $services); $smarty->assign("listPrats", $listPrats); $smarty->assign("sejour", $sejour); $smarty->assign("access_pmsi", $access_pmsi);
//view list // PATTERN : MODULE , AJAX, TYPE $mods_available = array("patient" => array("dPpatients", "ajax_vw_patient_complete", "patient"), "soins" => array("soins", "vw_dossier_sejour", "sejour"), "labo" => array("dPImeds", "httpreq_vw_sejour_results", "sejour")); //----------------------------------------------------------------- // VIEWS // view = none if ($view == "none") { CAppUI::stepAjax("context-view_required", UI_MSG_ERROR); } //view not registered if (!array_key_exists($view, $mods_available)) { CAppUI::stepAjax("context-view_not-registered", UI_MSG_ERROR, $view); } //check for module (with hack) $this_module = $mods_available[$view][0]; if (!CModule::exists($this_module) && !CModule::exists("dP{$this_module}")) { CAppUI::stepAjax("context-module%s-not-activated", UI_MSG_ERROR, $this_module); } //PATIENT //find a patient $patient = new CPatient(); //IPP Case if ($ipp) { $patient->_IPP = $ipp; $patient->loadFromIPP(); if ($patient->_id) { $nbpatients = 1; } } //global case if (!$nbpatients) {