* @link http://www.mediboard.org */ CCanDo::checkAdmin(); $receiver_guid = CValue::get("receiver_guid"); $receiver = CMbObject::loadFromGuid($receiver_guid); $receiver->loadConfigValues(); if (!$receiver_guid || !$receiver->_id) { CAppUI::stepAjax("CInteropReceiver.none", UI_MSG_ERROR); } // On rejoue pour une liste de NDA if ($list_nda = CValue::get("list_nda")) { $ndas = explode("|", $list_nda); $sejours = array(); foreach ($ndas as $_nda) { $sejour = new CSejour(); $sejour->loadFromNDA($_nda); if ($sejour->_id) { $sejours[] = $sejour; } } } else { // Filtre sur les enregistrements $sejour = new CSejour(); $action = CValue::get("action", "start"); // Tous les départs possibles $idMins = array("start" => CValue::get("id_start", "000000"), "continue" => CValue::getOrSession("idContinue"), "retry" => CValue::getOrSession("idRetry")); $idMin = CValue::first(@$idMins[$action], "000000"); CValue::setSession("idRetry", $idMin); // Requêtes $where = array(); $where[$sejour->_spec->key] = "> '{$idMin}'";
$codePresc = $lines[$fl + 11]; //IPP if ($lines[$fl] != '') { $patient->_IPP = $ipp; $patient->loadFromIPP(); } //search if (!$patient->_id && $nom != '' && $prenom != "") { $where = array(); $where[] = "`nom` LIKE '{$nom}%' OR `nom_jeune_fille` LIKE '{$nom}%'"; $where["prenom"] = "LIKE '{$prenom}%' "; $where["naissance"] = "LIKE '{$naissance}' "; $patient->loadObject($where); } //NDA if ($patient->_id && $nda) { $dossier->loadFromNDA($nda); } // patient + date (et pas de nda) if ($patient->_id && !$dossier->_id && $date) { $where = array(); $where[] = " '{$date}' BETWEEN entree AND sortie "; $where["patient_id"] = " = '{$patient->_id}'"; $dossier->loadObject($where); } } $smarty = new CSmartyDP(); $smarty->assign("mail_id", $mail_id); $smarty->assign("patient", $patient); $smarty->assign("dossier_id", $dossier->_id); $smarty->display("inc_vw_attach_piece.tpl");
* $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(); $group = CGroups::loadCurrent(); $sejour = new CSejour(); $patient = new CPatient(); // Si on passe un numéro de dossier, // on charge le patient et le séjour correspondant if ($NDA = CValue::get("NDA")) { $sejour->loadFromNDA($NDA); if ($sejour->_id && $sejour->group_id == $group->_id) { $patient = $sejour->loadRefPatient(); CValue::setSession("sejour_id", $sejour->_id); CValue::setSession("patient_id", $patient->_id); } } // Si on n'a pas récupéré de patient via le numero de dossier, // on charge le dossier en session if (!$patient->_id) { $patient->load(CValue::getOrSession("patient_id")); $sejour->load(CValue::getOrSession("sejour_id")); // Si le séjour a un patient différent de celui selectionné, // on le déselectionne if ($patient->_id && $sejour->_id && $sejour->patient_id != $patient->_id) { CValue::setSession("sejour_id");