Exemplo n.º 1
0
/**
 * Returns the CMbObject with given GET or SESSION params keys,
 * if it doesn't exist, a redirect is made
 *
 * @param string $class_key The class name of the object
 * @param string $id_key    The object ID
 * @param string $guid_key  The object GUID (classname-id)
 *
 * @return CMbObject The object loaded or nothing
 **/
function mbGetObjectFromGetOrSession($class_key, $id_key, $guid_key = null)
{
    $object_class = CValue::getOrSession($class_key);
    $object_id = CValue::getOrSession($id_key);
    $object_guid = "{$object_class}-{$object_id}";
    if ($guid_key) {
        $object_guid = CValue::getOrSession($guid_key, $object_guid);
    }
    $object = CMbObject::loadFromGuid($object_guid);
    // Redirection
    if (!$object || !$object->_id) {
        global $ajax;
        CAppUI::redirect("ajax={$ajax}" . "&suppressHeaders=1" . "&m=system" . "&a=object_not_found" . "&object_guid={$object_guid}");
    }
    return $object;
}
Exemplo n.º 2
0
<?php

/**
 * $Id: vw_edit_patients.php 28472 2015-06-02 10:11:29Z rhum1 $
 *
 * @package    Mediboard
 * @subpackage Patients
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 28472 $
 */
CCanDo::checkEdit();
$patient_id = CValue::getOrSession("patient_id");
$name = CValue::get("name");
$firstName = CValue::get("firstName");
$naissance_day = CValue::get("naissance_day");
$naissance_month = CValue::get("naissance_month");
$naissance_year = CValue::get("naissance_year");
$useVitale = CValue::get("useVitale");
$covercard = CValue::get("covercard");
$callback = CValue::get("callback");
$modal = CValue::get("modal", 0);
$patient = new CPatient();
$patient->load($patient_id);
$patient->loadRefPhotoIdentite();
$patient->countDocItems();
$patient->loadRefsCorrespondantsPatient();
$patient->countINS();
// Chargement de l'ipp
$patient->loadIPP();
if (CModule::getActive("fse")) {
Exemplo n.º 3
0
<?php

/**
 * $Id: inc_edit_planning.php 22873 2014-04-22 07:51:07Z mytto $
 *
 * @package    Mediboard
 * @subpackage dPbloc
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 22873 $
 */
$plageop_id = CValue::getOrSession("plageop_id");
$date = CValue::getOrSession("date", CMbDT::date());
$bloc_id = CValue::get("bloc_id");
// Informations sur la plage demandée
$plagesel = new CPlageOp();
$plagesel->load($plageop_id);
$plagesel->loadRefSalle();
$listBlocs = CGroups::loadCurrent()->loadBlocs(PERM_READ, null, "nom");
//curent bloc if $bloc_id
$bloc = new CBlocOperatoire();
$bloc->load($bloc_id);
$listSalles = $bloc->loadRefsSalles();
$arrKeySalle = array_keys($listSalles);
// cleanup listBlocs
foreach ($listBlocs as $key => $curr_bloc) {
    $salles = $curr_bloc->loadRefsSalles();
    foreach ($salles as $id => $_salle) {
        if (count($arrKeySalle) && !in_array($id, $arrKeySalle)) {
            unset($salles[$id]);
            continue;
Exemplo n.º 4
0
$group = CGroups::loadCurrent();
$filter = new CSejour();
$today = CMbDT::date();
$filter->_date_min = CValue::getOrSession("_date_min", "{$today} 06:00:00");
$filter->_date_max = CValue::getOrSession("_date_max", "{$today} 21:00:00");
$filter->_horodatage = CValue::getOrSession("_horodatage", "entree_prevue");
$filter->_admission = CValue::getOrSession("_admission");
$filter->_service = CValue::getOrSession("_service");
$filter->praticien_id = CValue::getOrSession("praticien_id");
$filter->convalescence = CValue::getOrSession("convalescence");
$filter->_specialite = CValue::getOrSession("_specialite");
$filter->_filter_type = CValue::getOrSession("_filter_type");
$filter->_ccam_libelle = CValue::getOrSession("_ccam_libelle", "1");
$filter->_coordonnees = CValue::getOrSession("_coordonnees");
$filter->_notes = CValue::getOrSession("_notes");
$filter->_by_date = CValue::getOrSession("_by_date");
$listPrat = new CMediusers();
$listPrat = $listPrat->loadPraticiens(PERM_READ);
$listSpec = new CFunctions();
$listSpec = $listSpec->loadSpecialites(PERM_READ);
// Récupération de la liste des services
$where = array();
$where["externe"] = "= '0'";
$where["cancelled"] = "= '0'";
$service = new CService();
$services = $service->loadGroupList($where);
$yesterday = CMbDT::date("-1 day", $today);
$tomorrow = CMbDT::date("+1 day", $today);
$j2 = CMbDT::date("+2 day", $today);
$j3 = CMbDT::date("+3 day", $today);
$week_deb = CMbDT::date("last sunday", $today);
<?php

/**
 * $Id$
 *
 * @category Admin
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
CCanDo::checkRead();
$do_import = CValue::get("do_import");
$start = CValue::getOrSession("start", 0);
$count = CValue::get("count", 5);
$group_id = CGroups::loadCurrent()->_id;
$user = new CUser();
// Requêtes
$ljoin["id_sante400"] = "`id_sante400`.`object_id` = `users`.`user_id`";
$ljoin["users_mediboard"] = "`users`.`user_id` = `users_mediboard`.`user_id`";
$ljoin["functions_mediboard"] = "`functions_mediboard`.`function_id` = `users_mediboard`.`function_id`";
$where = array();
$where["id_sante400.object_class"] = "= 'CUser'";
$where["id_sante400.tag"] = "= '" . CAppUI::conf("admin LDAP ldap_tag") . "'";
$where["id_sante400.id400"] = "IS NOT NULL";
$where["users.template"] = "= '0'";
$where["users_mediboard.actif"] = "= '1'";
$where["functions_mediboard.group_id"] = "= '{$group_id}'";
if (!$do_import) {
    $count_users_ldap = $user->countList($where, null, $ljoin);
Exemplo n.º 6
0
<?php

/**
 * $Id: object_merger.php 22331 2014-03-06 11:13:46Z charlyecho $
 *
 * @package    Mediboard
 * @subpackage System
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 22331 $
 */
$objects_class = CValue::getOrSession('objects_class');
$readonly_class = CValue::get('readonly_class');
$objects_id = CValue::get('objects_id');
$mode = CValue::get('mode');
if (!is_array($objects_id)) {
    $objects_id = explode("-", $objects_id);
}
$user = CMediusers::get();
CMbArray::removeValue("", $objects_id);
$objects = array();
$result = null;
$checkMerge = null;
$statuses = array();
$merge_type = null;
if (class_exists($objects_class) && count($objects_id)) {
    foreach ($objects_id as $object_id) {
        /** @var CMbObject $object */
        $object = new $objects_class();
        $merge_type = $object->_spec->merge_type;
        if ($merge_type == 'none') {
Exemplo n.º 7
0
<?php

/**
 * $Id$
 *
 * @category Password Keeper
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @link     http://www.mediboard.org */
CPasswordKeeper::checkHTTPS();
CCanDo::checkAdmin();
$password_id = CValue::getOrSession("password_id");
$password = new CPasswordEntry();
$password->load($password_id);
// Déchiffrement
$revealed = $password->getPassword();
$smarty = new CSmartyDP();
$smarty->assign("revealed", $revealed);
$smarty->display("inc_revealed.tpl");
Exemplo n.º 8
0
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage System
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkAdmin();
$http_redirection_id = CValue::getOrSession("http_redirection_id");
// Récupération de la redirection à ajouter/éditer
$http_redirection = new CHttpRedirection();
$http_redirection->load($http_redirection_id);
// Récupération de la liste des redirections
$http_redirections = $http_redirection->loadList(null, "priority DESC");
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("http_redirection", $http_redirection);
$smarty->assign("http_redirections", $http_redirections);
$smarty->display("vw_idx_redirections.tpl");
/**
 * $Id$
 *  
 * @category DPpatients
 * @package  Mediboard
 * @author   SARL OpenXtrem <*****@*****.**>
 * @license  GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version  $Revision$
 * @link     http://www.mediboard.org
 */
if (!CAppUI::pref("allowed_modify_identity_status")) {
    CAppUI::redirect("m=system&a=access_denied");
}
$number_day = CValue::getOrSession("_number_day", 8);
$number_day = $number_day ?: 8;
$now = CValue::getOrSession("_date_end", CMbDT::date());
$before = CMbDT::date("-{$number_day} DAY", $now);
$csv = new CCSVFile();
$line = array("Date", CAppUI::tr("CPatient.status.PROV"), CAppUI::tr("CPatient.status.DPOT"), CAppUI::tr("CPatient.status.ANOM"), CAppUI::tr("CPatient.status.CACH"), CAppUI::tr("CPatient.status.VALI"));
$csv->writeLine($line);
$results = CPatientStateTools::getPatientStateByDate($before, $now);
$values = array();
for ($i = $number_day; $i >= 0; $i--) {
    $values[CMbDT::date("-{$i} DAY", $now)] = array("PROV" => 0, "DPOT" => 0, "ANOM" => 0, "CACH" => 0, "VALI" => 0);
}
foreach ($results as $_result) {
    $values[$_result["date"]][$_result["state"]] = $_result["total"];
}
foreach ($values as $_date => $_value) {
    $line = array($_date);
    $line = array_merge($line, array_values($_value));
Exemplo n.º 10
0
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage PMSI
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkEdit();
$object_guid = CValue::getOrSession("object_guid");
/** @var CCodable $objet */
$objet = CMbObject::loadFromGuid($object_guid);
$objet->loadRefsActes();
foreach ($objet->_ref_actes_ccam as &$acte) {
    $acte->loadRefsFwd();
}
if (CAppUI::conf('dPccam CCodeCCAM use_new_association_rules')) {
    $objet->guessActesAssociation();
} else {
    foreach ($objet->_ref_actes_ccam as &$acte) {
        $acte->guessAssociation();
    }
}
$sejour = new CSejour();
if ($objet->_class == "CSejour") {
    $sejour = $objet;
} else {
    $sejour->_id = $objet->sejour_id;
<?php

/**
 * $Id: ajax_edit_supervision_timed_picture.php 20428 2013-09-20 12:14:48Z phenxdesign $
 *
 * @package    Mediboard
 * @subpackage Patients
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 20428 $
 */
CCanDo::checkAdmin();
$supervision_timed_picture_id = CValue::getOrSession("supervision_timed_picture_id");
$picture = new CSupervisionTimedPicture();
$picture->load($supervision_timed_picture_id);
$picture->loadRefsNotes();
$picture->loadRefsFiles();
$tree = CMbPath::getTree("modules/dPpatients/images/supervision");
$smarty = new CSmartyDP();
$smarty->assign("picture", $picture);
$smarty->assign("tree", $tree);
$smarty->display("inc_edit_supervision_timed_picture.tpl");
Exemplo n.º 12
0
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage system
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkRead();
$date = CValue::getOrSession("date", CMbDT::date());
$user_id = CValue::getOrSession("user_id");
$interval = CValue::getOrSession("interval", "one-day");
CView::enforceSlave();
CAppUI::requireModuleFile("dPstats", "graph_userlog");
$to = CMbDT::date("+1 DAY", $date);
switch ($interval) {
    case "one-day":
        $from = CMbDT::date("-1 DAY", $to);
        break;
    case "one-week":
        $from = CMbDT::date("-1 WEEK", $to);
        break;
    case "height-weeks":
        $from = CMbDT::date("-8 WEEK", $to);
        break;
    case "one-year":
        $from = CMbDT::date("-1 YEAR", $to);
        break;
Exemplo n.º 13
0
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage SSR
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCando::checkEdit();
$date = CValue::get("date", CMbDT::date());
$kine_id = CValue::getOrSession("kine_id", CAppUI::$instance->user_id);
// Chargement de la liste des utilisateurs
$user = new CMediusers();
$kines = CModule::getActive("dPprescription") ? CFunctionCategoryPrescription::getAllExecutants() : $user->loadKines();
$kine = new CMediusers();
$kine->load($kine_id);
$kine->loadRefIntervenantCdARR();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("kine", $kine);
$smarty->assign("kines", $kines);
$smarty->assign("kine_id", $kine_id);
$smarty->display("vw_kine_board.tpl");
Exemplo n.º 14
0
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Stock
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkEdit();
$societe_id = CValue::getOrSession('societe_id');
$suppliers = CValue::getOrSession('suppliers', 1);
$manufacturers = CValue::getOrSession('manufacturers', 1);
$inactive = CValue::getOrSession('inactive', 1);
// Loads the expected Societe
$societe = new CSociete();
$societe->load($societe_id);
// Smarty template
$smarty = new CSmartyDP();
$smarty->assign('societe', $societe);
$smarty->assign('suppliers', $suppliers);
$smarty->assign('manufacturers', $manufacturers);
$smarty->assign('inactive', $inactive);
$smarty->display('vw_idx_societe.tpl');
Exemplo n.º 15
0
CCanDo::checkRead();
$hors_plage = new CIntervHorsPlage();
if (!$hors_plage->canRead()) {
    $can->redirect();
}
// Toutes les salles des blocs
$listBlocs = CGroups::loadCurrent()->loadBlocs(PERM_READ);
// Les salles autorisées
$salle = new CSalle();
$listSalles = $salle->loadListWithPerms(PERM_READ);
// Liste des Etablissements selon Permissions
$etablissements = CMediusers::loadEtablissements(PERM_READ);
// Chargement des prestations
$prestations = CPrestation::loadCurrentList();
$operation_id = CValue::getOrSession("operation_id");
$chir_id = CAppUI::conf("dPplanningOp COperation use_session_praticien") ? CValue::getOrSession("chir_id") : CValue::get("chir_id");
$sejour_id = CValue::get("sejour_id");
$hour_urgence = CValue::get("hour_urgence");
$min_urgence = CValue::get("min_urgence");
$date_urgence = CValue::get("date_urgence");
$salle_id = CValue::get("salle_id");
$patient_id = CValue::get("pat_id");
$grossesse_id = CValue::get("grossesse_id");
$consult_related_id = CValue::get("consult_related_id");
// L'utilisateur est-il un praticien
$user = $chir = CMediusers::get();
if ($chir->isPraticien() and !$chir_id) {
    $chir_id = $chir->user_id;
}
// Chargement du praticien
$chir = new CMediusers();
<?php

/**
 * $Id: httpreq_vw_protocole_anesth.php 19840 2013-07-09 19:36:14Z phenxdesign $
 *
 * @package    Mediboard
 * @subpackage PlanningOp
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 19840 $
 */
CCanDo::checkEdit();
$prescription_id = CValue::getOrSession("prescription_id");
$prescription = new CPrescription();
$prescription->load($prescription_id);
$smarty = new CSmartyDP();
$smarty->assign("prescription", $prescription);
$smarty->assign("nodebug", true);
$smarty->display("inc_vw_protocole_anesth.tpl");
Exemplo n.º 17
0
 * @version    $Revision: 24664 $
 */
global $dialog;
if ($dialog) {
    CCanDo::checkRead();
} else {
    CCanDo::checkEdit();
}
// L'utilisateur est-il chirurgien?
$chir_id = CValue::getOrSession("chir_id");
$mediuser = CMediusers::get($chir_id);
if (!$mediuser->isPraticien()) {
    $mediuser = new CMediusers();
}
$function_id = CValue::getOrSession("function_id");
$type = CValue::getOrSession("type", "interv");
$page = CValue::get("page");
$sejour_type = CValue::get("sejour_type");
$step = 30;
$protocole = new CProtocole();
$where = array();
$chir = new CMediusers();
$chir->load($chir_id);
if ($chir->_id) {
    $chir->loadRefFunction();
    $functions = array($chir->function_id);
    $chir->loadBackRefs("secondary_functions");
    foreach ($chir->_back["secondary_functions"] as $curr_sec_func) {
        $functions[] = $curr_sec_func->function_id;
    }
    $list_functions = implode(",", $functions);
Exemplo n.º 18
0
<?php

/**
 * $Id: vw_idx_stock_service.php 19286 2013-05-26 16:59:04Z phenxdesign $
 *
 * @package    Mediboard
 * @subpackage Stock
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 19286 $
 */
CCanDo::checkEdit();
$stock_service_id = CValue::getOrSession('stock_service_id');
$category_id = CValue::getOrSession('category_id');
$service_id = CValue::getOrSession('service_id');
$product_id = CValue::get('product_id');
// Loads the stock
$stock = new CProductStockService();
// If stock_id has been provided, we load the associated product
if ($stock_service_id) {
    $stock->load($stock_service_id);
    $stock->loadRefsFwd();
    $stock->_ref_product->loadRefsFwd();
} else {
    if ($product_id) {
        $product = new CProduct();
        $product->load($product_id);
        $stock->product_id = $product_id;
        $stock->_ref_product = $product;
        $stock->updateFormFields();
    } else {
<?php

/**
 * $Id:$
 *
 * @package    Mediboard
 * @subpackage SSR
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision:$
 */
CCanDo::checkRead();
$token_evts = CValue::getOrSession("token_evts");
$_evenements = array();
if ($token_evts) {
    $_evenements = explode("|", $token_evts);
}
$count_actes = $actes = array("cdarr" => array(), "csarr" => array());
$evenements = array();
foreach ($_evenements as $_evenement_id) {
    $evenement = new CEvenementSSR();
    $evenement->load($_evenement_id);
    if ($evenement->seance_collective_id) {
        // Recuperation des informations de la seance collective
        $evenement->loadRefSeanceCollective();
        $evenement->debut = $evenement->_ref_seance_collective->debut;
        $evenement->duree = $evenement->_ref_seance_collective->duree;
    }
    $evenement->loadRefSejour()->loadRefPatient();
    // Chargement et comptage des codes de tous les actes
    foreach ($evenement->loadRefsActes() as $_type => $_actes) {
Exemplo n.º 20
0
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Hospi
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
$services_ids = CValue::getOrSession("services_ids");
$readonly = CValue::getOrSession("readonly");
$services_ids = CService::getServicesIdsPref($services_ids);
$smarty = new CSmartyDP();
$smarty->assign("readonly", $readonly);
$smarty->display("vw_placements.tpl");
Exemplo n.º 21
0
<?php

/* $Id $ */
/**
 * @package Mediboard
 * @subpackage hl7
 * @version $Revision: 14661 $
 * @author SARL OpenXtrem
 * @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 */
CCanDo::checkRead();
$message = CValue::getOrSession("message");
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("message", $message);
$smarty->display("vw_display_hl7v2_message.tpl");
Exemplo n.º 22
0
$forum_message = new CForumMessage();
$forum_message->load(CValue::getOrSession('forum_message_id'));
if ($forum_message->_id) {
    $forum_message->loadRefs();
} else {
    // sinon on en crée un nouveau
    $forum_message->user_id = $user->_id;
    $forum_message->date = CMbDT::dateTime();
}
/** Chargement du thread demandé  **/
// on récupère le thread auquel appartient le message
if ($forum_message->forum_thread_id) {
    $forum_thread = $forum_message->_ref_forum_thread;
} else {
    $forum_thread = new CForumThread();
    $forum_thread->load(CValue::getOrSession('forum_thread_id'));
    if ($forum_thread->_id) {
        $forum_thread->loadRefs();
    }
}
/** Chargement du theme demandé en fonction du thread **/
$forum_theme = $forum_thread->_ref_forum_theme;
if ($forum_theme) {
    $forum_theme->loadRefs();
}
/** Récupération de la liste des messages du thread **/
$listMessages = $forum_thread->_ref_forum_messages;
foreach ($listMessages as &$currMessage) {
    $currMessage->loadRefs();
}
// Création du template
Exemplo n.º 23
0
/**
 * $Id: vw_procedures.php 19316 2013-05-28 09:33:17Z rhum1 $
 *
 * @package    Mediboard
 * @subpackage Qualite
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 19316 $
 */
CCanDo::checkRead();
$doc_ged_id = CValue::getOrSession("doc_ged_id");
$theme_id = CValue::getOrSession("theme_id");
$chapitre_id = CValue::getOrSession("chapitre_id");
$sort_by = CValue::getOrSession("sort_by", "date");
$sort_way = CValue::getOrSession("sort_way", "DESC");
$docGed = new CDocGed();
if (!$docGed->load($doc_ged_id)) {
    // Ce document n'est pas valide
    $doc_ged_id = null;
    CValue::setSession("doc_ged_id");
    $docGed = new CDocGed();
} else {
    $docGed->loadLastActif();
    if (!$docGed->_lastactif->doc_ged_suivi_id || $docGed->annule) {
        // Ce document n'est pas Terminé ou est suspendu
        $doc_ged_id = null;
        CValue::setSession("doc_ged_id");
        $docGed = new CDocGed();
    } else {
        $docGed->_lastactif->loadFile();
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage Labo
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkRead();
$user = CMediusers::get();
$pack_examens_labo_id = CValue::getOrSession("pack_examens_labo_id");
// Chargement du pack demandé
$pack = new CPackExamensLabo();
$pack->load($pack_examens_labo_id);
$pack->loadRefs();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("pack", $pack);
$smarty->display("inc_vw_examens_packs.tpl");
<?php

/**
 * $Id: ajax_edit_supervision_instant_data.php 26001 2014-11-24 15:22:57Z phenxdesign $
 *
 * @package    Mediboard
 * @subpackage Patients
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 26001 $
 */
CCanDo::checkAdmin();
$supervision_instant_data_id = CValue::getOrSession("supervision_instant_data_id");
$instant_data = new CSupervisionInstantData();
$instant_data->load($supervision_instant_data_id);
$instant_data->loadRefsNotes();
if (!$instant_data->_id) {
    $instant_data->size = 11;
}
$smarty = new CSmartyDP();
$smarty->assign("instant_data", $instant_data);
$smarty->display("inc_edit_supervision_instant_data.tpl");
Exemplo n.º 26
0
<?php

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage SalleOp
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
// @todo bloc n'est pas forcément actif
global $can;
$can->read |= CModule::getActive("dPbloc")->_can->read;
$can->needsRead();
$operation_id = CValue::getOrSession("operation_id", null);
$operation = new COperation();
$operation->load($operation_id);
$operation->loadRefsAnesthPerops();
$operation->loadRefsFwd();
$operation->loadRefsActesCCAM();
foreach ($operation->_ref_actes_ccam as $acte) {
    $acte->loadRefsFwd();
}
$operation->loadAffectationsPersonnel();
if (CAppUI::conf('dPccam CCodeCCAM use_new_association_rules')) {
    $operation->guessActesAssociation();
} else {
    foreach ($operation->_ref_actes_ccam as $acte) {
        $acte->guessAssociation();
    }
Exemplo n.º 27
0
<?php

/**
 * $Id: vw_rapport.php 20186 2013-08-19 07:47:12Z phenxdesign $
 *
 * @package    Mediboard
 * @subpackage Hospi
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 20186 $
 */
$date = CValue::getOrSession("date");
// Chargement des praticiens
$med = new CMediusers();
$listPrat = $med->loadPraticiens(PERM_READ);
$dateEntree = CMbDT::dateTime("23:59:00", $date);
$dateSortie = CMbDT::dateTime("00:01:00", $date);
$hierEntree = CMbDT::date("- 1 day", $dateEntree);
$hierEntree = CMbDT::dateTime("23:59:00", $hierEntree);
// Chargement des services
$service = new CService();
$whereServices = array();
$whereServices["group_id"] = "= '" . CGroups::loadCurrent()->_id . "'";
$whereServices["cancelled"] = "= '0'";
$services = $service->loadListWithPerms(PERM_READ, $whereServices, "nom");
// Initialisations
$totalHospi = 0;
$totalAmbulatoire = 0;
$totalMedecin = 0;
$total_prat = array();
foreach ($listPrat as $key => $prat) {
Exemplo n.º 28
0
<?php

/**
 * $Id: ajax_edit_source_mediuser.php 27587 2015-03-18 09:31:32Z aurelie17 $
 *
 * @package    Mediboard
 * @subpackage mediusers
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 27587 $
 */
CCanDo::checkRead();
$user_id = CValue::getOrSession("user_id");
$mediuser = CMediusers::get($user_id);
// Source File system d'envoi
$fs_source_envoi = CExchangeSource::get("envoi-tarmed-{$mediuser->_guid}", "file_system", true, null, false);
// Source File system d'envoi
$fs_source_reception = CExchangeSource::get("reception-tarmed-{$mediuser->_guid}", "file_system", true, null, false);
$fs_sources_tarmed = array("fs_source_envoi" => array($fs_source_envoi), "fs_source_reception" => array($fs_source_reception));
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("fs_sources_tarmed", $fs_sources_tarmed);
$smarty->display("sources_archive.tpl");
<?php

/**
 * $Id: httpreq_vw_list_techniques_comp.php 24480 2014-08-20 10:51:06Z flaviencrochard $
 *
 * @package    Mediboard
 * @subpackage Cabinet
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision: 24480 $
 */
CCanDo::checkEdit();
$selConsult = CValue::getOrSession("selConsult", 0);
$dossier_anesth_id = CValue::getOrSession("dossier_anesth_id", 0);
$consult = new CConsultation();
$consult->load($selConsult);
$consult->loadRefConsultAnesth($dossier_anesth_id);
$consult->_ref_consult_anesth->loadRefsBack();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("consult_anesth", $consult->_ref_consult_anesth);
$smarty->display("inc_consult_anesth/techniques_comp.tpl");
Exemplo n.º 30
0
<?php

/**
 * $Id:$
 *
 * @package    Mediboard
 * @subpackage dPfacturation
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision:$
 */
CCanDo::checkEdit();
$date_min = CValue::getOrSession("_date_min", CMbDT::date());
$date_max = CValue::getOrSession("_date_max", CMbDT::date());
$type_journal = CValue::get("type_journal");
$date_min = CMbDT::dateTime($date_min);
$date_max = CMbDT::dateTime(CMbDT::date("+1 day", $date_max));
$ljoin = array();
$ljoin["facture_journal"] = "facture_journal.journal_id = files_mediboard.object_id";
$where = array();
$where["object_class"] = " = 'CJournalBill'";
$where["file_date"] = "BETWEEN '{$date_min}' AND '{$date_max}'";
$where["facture_journal.type"] = "= '{$type_journal}'";
$file = new CFile();
$files = $file->loadList($where, null, null, null, $ljoin);
foreach ($files as $_file) {
    $_file->canDo();
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("files", $files);