$operations = $sejour->loadRefsOperations($whereOperations);
// Chargement optimisée des prestations
CSejour::massCountPrestationSouhaitees(array($sejour));
foreach ($operations as $operation) {
    $operation->loadRefsActes();
    $dossier_anesth = $operation->loadRefsConsultAnesth();
    $consultation = $dossier_anesth->loadRefConsultation();
    $consultation->loadRefPlageConsult();
    $dossier_anesth->_date_consult = $consultation->_date;
}
if (CAppUI::conf("dPadmissions show_deficience")) {
    CDossierMedical::massCountAntecedentsByType(array($dossier_medical), "deficience");
}
$list_mode_entree = array();
if (CAppUI::conf("dPplanningOp CSejour use_custom_mode_entree")) {
    $mode_entree = new CModeEntreeSejour();
    $where = array("actif" => "= '1'");
    $list_mode_entree = $mode_entree->loadGroupList($where);
}
$smarty = new CSmartyDP();
$smarty->assign("_sejour", $sejour);
$smarty->assign("date_min", $date_min);
$smarty->assign("date_max", $date_max);
$smarty->assign("date_actuelle", $date_actuelle);
$smarty->assign("date_demain", $date_demain);
$smarty->assign("list_mode_entree", $list_mode_entree);
$smarty->assign("prestations", CPrestation::loadCurrentList());
$smarty->assign("canAdmissions", CModule::getCanDo("dPadmissions"));
$smarty->assign("canPatients", CModule::getCanDo("dPpatients"));
$smarty->assign("canPlanningOp", CModule::getCanDo("dPplanningOp"));
$smarty->assign("single_line", true);
예제 #2
0
<?php

/**
 * $Id$
 *  
 * @category dPplanningOp
 * @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::checkAdmin();
$cpi = new CChargePriceIndicator();
$list_cpi = $cpi->loadGroupList();
$mode_entree = new CModeEntreeSejour();
$list_modes_entree = $mode_entree->loadGroupList();
$mode_sortie = new CModeSortieSejour();
$list_modes_sortie = $mode_sortie->loadGroupList();
$smarty = new CSmartyDP();
$smarty->assign("list_cpi", $list_cpi);
$smarty->assign("list_modes_entree", $list_modes_entree);
$smarty->assign("list_modes_sortie", $list_modes_sortie);
$smarty->display("vw_parametrage.tpl");
 /**
  * Récupération du mode d'entrée
  *
  * @param DOMNode $node     PV1 Node
  * @param CSejour $newVenue Admit
  *
  * @return void
  */
 function getAdmitSource(DOMNode $node, CSejour $newVenue)
 {
     if (!($admit_source = $this->queryTextNode("PV1.14", $node))) {
         return;
     }
     $sender = $this->_ref_sender;
     // Mode d'entrée personnalisable
     if (CAppUI::conf("dPplanningOp CSejour use_custom_mode_entree")) {
         $mode_entree = new CModeEntreeSejour();
         $mode_entree->code = $admit_source;
         $mode_entree->group_id = $sender->group_id;
         $mode_entree->actif = 1;
         $mode_entree->loadMatchingObject();
         $newVenue->mode_entree_id = $mode_entree->_id;
     }
     // Admit source
     switch ($sender->_configs["handle_PV1_14"]) {
         // Combinaison du ZFM
         // ZFM.1 + ZFM.3
         case 'ZFM':
             $newVenue->mode_entree = $admit_source[0];
             if (strlen($admit_source) == 2) {
                 $newVenue->provenance = $admit_source[1];
             }
             break;
         default:
     }
 }
예제 #4
0
if (CModule::getActive("dPurgences")) {
    $sejour->loadRefRPU()->loadRefSejourMutation();
}
$patient = $sejour->loadRefPatient();
$patient->loadIPP();
// maternité
if (CModule::getActive("maternite") && $sejour->grossesse_id) {
    $sejour->loadRefsNaissances();
    foreach ($sejour->_ref_naissances as $_naissance) {
        /** @var CNaissance $_naissance */
        $_naissance->loadRefSejourEnfant()->loadRefPatient();
    }
    $sejour->_sejours_enfants_ids = CMbArray::pluck($sejour->_ref_naissances, "sejour_enfant_id");
}
// list mode entree
$mode_entree = new CModeEntreeSejour();
$mode_entree->actif = 1;
$mode_entree->group_id = CGroups::loadCurrent()->_id;
$modes_entree = $mode_entree->loadMatchingList("libelle");
$service = new CService();
$service->group_id = CGroups::loadCurrent()->_id;
$services = $service->loadMatchingList();
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("date_actuelle", $date_actuelle);
$smarty->assign("date_demain", $date_demain);
$smarty->assign("callback", stripslashes($callback));
$smarty->assign("modify_sortie_prevue", $modify_entree_prevue);
$smarty->assign("sejour", $sejour);
$smarty->assign("module", $module);
$smarty->assign("list_mode_entree", $modes_entree);