本文整理汇总了PHP中CMbDT::time方法的典型用法代码示例。如果您正苦于以下问题:PHP CMbDT::time方法的具体用法?PHP CMbDT::time怎么用?PHP CMbDT::time使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMbDT
的用法示例。
在下文中一共展示了CMbDT::time方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkProperty
/**
* @see parent::checkProperty()
*/
function checkProperty($object)
{
$propValue =& $object->{$this->fieldName};
$time_format = "/^\\d{1,2}:\\d{1,2}(:\\d{1,2})?\$/";
// Format
if (!preg_match($time_format, $propValue)) {
if ($propValue === 'current' || $propValue === 'now') {
$propValue = CMbDT::time();
return null;
}
return "Format d'heure invalide";
}
// min
if ($this->min) {
if (!preg_match($time_format, $this->min)) {
trigger_error("Spécification de minimum time invalide (min = {$this->min})", E_USER_WARNING);
return "Erreur système";
}
if ($propValue < $this->min) {
return "Doit avoir une valeur minimale de {$this->min}";
}
}
// max
if ($this->max) {
if (!preg_match($time_format, $this->max)) {
trigger_error("Spécification de maximum time invalide (max = {$this->max})", E_USER_WARNING);
return "Erreur système";
}
if ($propValue > $this->max) {
return "Doit avoir une valeur maximale de {$this->max}";
}
}
return null;
}
示例2: loadAffected
/**
* $Id: inc_personnel.php 20938 2013-11-13 11:02:47Z aurelie17 $
*
* @package Mediboard
* @subpackage bloodSalvage
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: 20938 $
*/
function loadAffected(&$blood_salvage_id, &$list_nurse_sspi, &$tabAffected, &$timingAffect)
{
$affectation = new CAffectationPersonnel();
$affectation->object_class = "CBloodSalvage";
$affectation->object_id = $blood_salvage_id;
$tabAffected = $affectation->loadMatchingList();
foreach ($tabAffected as $key => $affect) {
if (array_key_exists($affect->personnel_id, $list_nurse_sspi)) {
unset($list_nurse_sspi[$affect->personnel_id]);
}
$affect->_ref_personnel->loadRefUser();
}
// Initialisations des tableaux des timings
foreach ($tabAffected as $key => $affectation) {
$timingAffect[$affectation->_id]["_debut"] = array();
$timingAffect[$affectation->_id]["_fin"] = array();
}
// Remplissage des tableaux des timings
foreach ($tabAffected as $id => $affectation) {
foreach ($timingAffect[$affectation->_id] as $key => $value) {
for ($i = -10; $i < 10 && $affectation->{$key} !== null; $i++) {
$timingAffect[$affectation->_id][$key][] = CMbDT::time("{$i} minutes", $affectation->{$key});
}
}
}
}
示例3: __construct
/**
* Range constructor
*
* @param string $guid GUID
* @param string $date Date
* @param int $length Length
* @param string $title Title
* @param null $color Color
* @param null $css_class CSS class
*/
function __construct($guid, $date, $length = 0, $title = "", $color = null, $css_class = null)
{
$this->guid = $guid;
$this->internal_id = "CPlanningRange-" . uniqid();
$this->start = $date;
$this->length = $length;
$this->title = CMbString::htmlEntities($title);
$this->color = $color;
$this->css_class = is_array($css_class) ? implode(" ", $css_class) : $css_class;
if (preg_match("/[0-9]+ /", $this->start)) {
$parts = split(" ", $this->start);
$this->end = "{$parts[0]} " . CMbDT::time("+{$this->length} MINUTES", $parts[1]);
$this->day = $parts[0];
$this->hour = CMbDT::format($parts[1], "%H");
$this->minutes = CMbDT::format($parts[1], "%M");
} else {
$this->day = CMbDT::date($date);
$this->end = CMbDT::dateTime("+{$this->length} MINUTES", $date);
$this->hour = CMbDT::format($date, "%H");
$this->minutes = CMbDT::format($date, "%M");
}
}
示例4: CConsultation
/**
* $Id$
*
* @category Admissions
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
* @link http://www.mediboard.org
*/
CCanDo::checkRead();
//Initialisations des variables
$date = CValue::getOrSession("date", CMbDT::date());
$today = CMbDT::date();
$hour = CMbDT::time(null);
$board = CValue::get("board", 1);
$boardItem = CValue::get("boardItem", 1);
$consult = new CConsultation();
// Récupération des fonctions
$cabinets = CMediusers::loadFonctions();
// Récupération de la liste des anesthésistes
$mediuser = new CMediusers();
$anesthesistes = $mediuser->loadAnesthesistes(PERM_READ);
if ($consult->consultation_id) {
$date = $consult->_ref_plageconsult->date;
CValue::setSession("date", $date);
}
// Récupération des plages de consultation du jour et chargement des références
$listPlages = array();
foreach ($anesthesistes as $anesth) {
示例5: elseif
$modificateur->_checked = $modificateur->code;
} elseif ($modificateur->_double == "2") {
$modificateur->_checked = $modificateur->code . $modificateur->_double;
} else {
$modificateur->_checked = null;
}
} else {
$modificateur->_checked = null;
}
}
/* Vérification et précodage des modificateurs */
if (CAppUI::conf('dPccam CCodeCCAM use_new_association_rules')) {
CCodageCCAM::precodeModifiers($phase->_modificateurs, $acte, $acte->loadRefObject());
} elseif (!$acte->_id) {
foreach ($phase->_modificateurs as $modificateur) {
$modificateur->_checked = $acte->_ref_object->checkModificateur($modificateur->code, CMbDT::time($acte->execution));
}
}
$acte->getMontantModificateurs($phase->_modificateurs);
// Liste des dents CCAM
$liste_dents = reset(CDentCCAM::loadList());
// Chargement des listes de praticiens
$user = new CMediusers();
$listAnesths = $user->loadAnesthesistes(PERM_DENY);
$listChirs = $user->loadPraticiens(PERM_DENY);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("acte", $acte);
$smarty->assign("code", $code);
$smarty->assign("activite", $activite);
$smarty->assign("phase", $phase);
示例6: loadPossibleActes
//.........这里部分代码省略.........
$possible_acte->code_acte = $code_ccam->code;
$possible_acte->code_activite = $activite->numero;
$possible_acte->_anesth = $activite->numero == 4;
$possible_acte->code_phase = $phase->phase;
$possible_acte->execution = CAppUI::pref("use_acte_date_now") ? CMbDT::dateTime() : $this->_acte_execution;
// Affectation du dépassement au premier acte de chirugie
if (!$depassement_affecte and $possible_acte->code_activite == 1) {
$possible_acte->montant_depassement = $this->_acte_depassement;
$depassement_affecte = true;
}
// Affectation du dépassement au premier acte d'anesthésie
if (!$depassement_anesth_affecte and $possible_acte->code_activite == 4) {
$possible_acte->montant_depassement = $this->_acte_depassement_anesth;
$depassement_anesth_affecte = true;
}
if (!$praticien_id) {
$executant_id = CAppUI::pref("user_executant") ? CMediusers::get()->_id : $this->getExecutantId($possible_acte->code_activite);
}
$possible_acte->executant_id = $executant_id;
$possible_acte->object_class = $this->_class;
$possible_acte->object_id = $this->_id;
if ($possible_acte->code_activite == 4) {
$possible_acte->extension_documentaire = $this->getExtensionDocumentaire($possible_acte->executant_id);
}
/* Gestion du champ remboursé */
if ($code_ccam->remboursement == 1) {
/* Cas ou l'acte est remboursable */
$possible_acte->rembourse = '1';
} else {
/* Cas ou l'acte est non */
$possible_acte->rembourse = '0';
}
$possible_acte->updateFormFields();
$possible_acte->loadRefExecutant();
$possible_acte->loadRefCodeCCAM();
if (CAppUI::conf('dPccam CCodeCCAM use_new_association_rules')) {
$possible_acte->loadRefCodageCCAM();
}
$possible_acte->getAnesthAssocie();
// Affect a loaded acte if exists
foreach ($this->_ref_actes_ccam as $_acte) {
if ($_acte->code_acte == $possible_acte->code_acte && $_acte->code_activite == $possible_acte->code_activite && $_acte->code_phase == $possible_acte->code_phase) {
if (!isset($used_actes[$_acte->acte_id])) {
$possible_acte = $_acte;
$used_actes[$_acte->acte_id] = true;
break;
}
}
}
if ($possible_acte->_id) {
$possible_acte->getTarif();
} else {
$possible_acte->getTarifSansAssociationNiCharge();
}
// Keep references !
$phase->_connected_acte = $possible_acte;
$listModificateurs = $phase->_connected_acte->modificateurs;
if (!$possible_acte->_id) {
$possible_acte->facturable = '1';
$possible_acte->checkFacturable();
if (CAppUI::conf('dPccam CCodeCCAM use_new_association_rules')) {
CCodageCCAM::precodeModifiers($phase->_modificateurs, $possible_acte, $this);
$possible_acte->getMontantModificateurs($phase->_modificateurs);
} else {
$possible_acte->getMontantModificateurs($phase->_modificateurs);
foreach ($phase->_modificateurs as $modificateur) {
$modificateur->_checked = $this->checkModificateur($modificateur->code, CMbDT::time($phase->_connected_acte->execution));
}
}
} else {
// Récupération des modificateurs codés
foreach ($phase->_modificateurs as $modificateur) {
/* Dans le cas des modificateurs doubles, les 2 composantes peuvent être séparées (IJKO dans le cas de IO par exemple) */
if ($modificateur->_double == "2") {
$position = strpos($listModificateurs, $modificateur->code[0]) !== false && strpos($listModificateurs, $modificateur->code[1]) !== false;
} else {
$position = strpos($listModificateurs, $modificateur->code);
}
if ($position !== false) {
if ($modificateur->_double == "1") {
$modificateur->_checked = $modificateur->code;
} elseif ($modificateur->_double == "2") {
$modificateur->_checked = $modificateur->code . $modificateur->_double;
} else {
$modificateur->_checked = null;
}
} else {
$modificateur->_checked = null;
}
}
/* Vérification et précodage des modificateurs */
if (CAppUI::conf('dPccam CCodeCCAM use_new_association_rules')) {
CCodageCCAM::precodeModifiers($phase->_modificateurs, $possible_acte, $this);
}
$possible_acte->getMontantModificateurs($phase->_modificateurs);
}
}
}
}
}
示例7: CConsultation
* @category Cabinet
* @package Mediboard
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision: 28718 $
* @link http://www.mediboard.org
*/
CCanDo::checkEdit();
$user = CMediusers::get();
$date = CValue::getOrSession("date", CMbDT::date());
$vue = CValue::getOrSession("vue2", CAppUI::pref("AFFCONSULT", 0));
$prat_id = CValue::getOrSession("chirSel", $user->_id);
$selConsult = CValue::getOrSession("selConsult");
$dossier_anesth_id = CValue::getOrSession("dossier_anesth_id");
$today = CMbDT::date();
$hour = CMbDT::time();
$now = CMbDT::dateTime();
if (!isset($current_m)) {
global $m;
$current_m = CValue::get("current_m", $m);
}
if (isset($_GET["date"])) {
$selConsult = null;
CValue::setSession("selConsult", null);
}
// Test compliqué afin de savoir quelle consultation charger
$consult = new CConsultation();
$consult->load($selConsult);
if (isset($_GET["selConsult"])) {
if ($consult->_id && $consult->patient_id) {
$consult->loadRefPlageConsult();
示例8: precodeModifiers
/**
* Check the modifiers of the given act
*
* @param CObject &$modifiers The modifiers to check
* @param CActeCCAM &$act The dateTime of the execution of the act
* @param CCodable $codable The codable
*
* @return void
*/
public static function precodeModifiers(&$modifiers, &$act, $codable)
{
$date = CMbDT::date(null, $act->execution);
$time = CMbDT::time(null, $act->execution);
$act->loadRefExecutant();
$act->_ref_executant->loadRefDiscipline();
$discipline = $act->_ref_executant->_ref_discipline;
$patient = $codable->loadRefPatient();
$patient->evalAge();
$checked = 0;
$spe_gyneco = $spe_gyneco = array('GYNECOLOGIE MEDICALE, OBSTETRIQUE', 'GYNECOLOGIE-OBSTETRIQUE', 'MEDECINE DE LA REPRODUCTION ET GYNECOLOGIE MEDICAL');
$spe_gen_pediatre = array("MEDECINE GENERALE", "PEDIATRIE");
$count_exclusive_modifiers = self::countExclusiveModifiers($act);
$store_act = 0;
$modifiers_to_add = "";
$achieved = CMbDate::achievedDurations($patient->naissance, CMbDT::date(null, $act->execution));
$patient_age = $achieved["year"];
foreach ($modifiers as $_modifier) {
switch ($_modifier->code) {
case 'A':
$checked = $patient_age < 4 || $patient_age >= 80;
$_modifier->_state = $checked ? 'prechecked' : 'not_recommended';
break;
case 'E':
$checked = $patient->_annees < 5;
$_modifier->_state = $checked ? 'prechecked' : 'not_recommended';
break;
case 'F':
$checked = ($count_exclusive_modifiers == 1 && $_modifier->_checked || $count_exclusive_modifiers == 0) && (CMbDT::transform('', $act->execution, '%w') == 0 || CMbDate::isHoliday($date)) && ($time > '08:00:00' && $time < '20:00:00');
if ($checked) {
$_modifier->_state = 'prechecked';
} elseif ($count_exclusive_modifiers == 1 && $_modifier->_checked || $count_exclusive_modifiers > 0) {
$_modifier->_state = 'forbidden';
} else {
$_modifier->_state = 'not_recommended';
}
break;
case "J":
$checked = $codable->_class == 'COperation' && CAppUI::pref('precode_modificateur_J');
$_modifier->_state = $checked ? 'prechecked' : null;
break;
case 'K':
$checked = !$act->montant_depassement && ($act->_ref_executant->secteur == 1 || $act->_ref_executant->secteur == 2 && $patient->cmu || $act->_ref_executant->contrat_acces_soins || $act->_ref_executant->option_coordination);
if ($checked) {
$_modifier->_state = 'prechecked';
} elseif (!in_array($discipline, $spe_gyneco)) {
$_modifier->_state = 'not_recommended';
}
if (self::isModifierchecked('K', $act) && !$act->montant_depassement) {
$checked = true;
}
break;
case 'L':
if (self::isModifierchecked('L', $act)) {
$_modifier->_state = 'prechecked';
$checked = true;
}
break;
case 'M':
$checked = 0;
if (!in_array($discipline->text, $spe_gen_pediatre)) {
$_modifier->_state = 'not_recommended';
}
break;
case 'N':
$checked = $patient->_annees < 13;
$_modifier->_state = $checked ? 'prechecked' : 'not_recommended';
break;
case 'P':
$checked = ($count_exclusive_modifiers == 1 && $_modifier->_checked || $count_exclusive_modifiers == 0) && in_array($discipline->text, $spe_gen_pediatre) && ($time > "20:00:00" && $time < "23:59:59");
if ($checked) {
$_modifier->_state = 'prechecked';
} elseif ($count_exclusive_modifiers == 1 && $_modifier->_checked || $count_exclusive_modifiers > 0) {
$_modifier->_state = 'forbidden';
} else {
$_modifier->_state = 'not_recommended';
}
break;
case 'R':
if (self::isModifierchecked('R', $act)) {
$_modifier->_state = 'prechecked';
$checked = true;
}
break;
case 'S':
$checked = (in_array($discipline->text, $spe_gen_pediatre) || $codable->_class == "COperation" && $codable->_lu_type_anesth) && ($time >= "00:00:00" && $time < "08:00:00") && ($count_exclusive_modifiers == 1 && $_modifier->_checked || $count_exclusive_modifiers == 0);
if ($checked) {
$_modifier->_state = 'prechecked';
} elseif ($count_exclusive_modifiers == 1 && $_modifier->_checked || $count_exclusive_modifiers > 0) {
$_modifier->_state = 'forbidden';
} else {
//.........这里部分代码省略.........
示例9: otherOrder
}
}
otherOrder($mouvementsNP, "np", $order_col, $order_way);
$update_count = count($mouvements) . "/" . count($mouvementsNP);
/** @var CAffectation[] $mouvements_by_service */
/** @var CAffectation[] $mouvementsNP_by_service */
$mouvements_by_service = array();
$mouvementsNP_by_service = array();
foreach ($mouvements as $_mouvement) {
if (!isset($mouvements_by_service[$_mouvement->service_id])) {
$mouvements_by_service[$_mouvement->service_id] = array();
}
$mouvements_by_service[$_mouvement->service_id][] = $_mouvement;
}
$mouvements = $mouvements_by_service;
CSejour::massLoadCurrAffectation($mouvementsNP, $date . " " . CMbDT::time());
foreach ($mouvementsNP as $_mouvement) {
$_service_id = $_mouvement->service_id;
if ($_mouvement->_ref_curr_affectation->service_id && !$_mouvement->_ref_curr_affectation->lit_id) {
$_service_id = $_mouvement->_ref_curr_affectation->service_id;
}
if (!isset($mouvementsNP_by_service[$_service_id])) {
$mouvementsNP_by_service[$_service_id] = array();
}
$mouvementsNP_by_service[$_service_id][] = $_mouvement;
}
$mouvementsNP = $mouvementsNP_by_service;
} else {
// Patients placés
$where["affectation.sortie"] = "BETWEEN '{$limit1}' AND '{$limit2}'";
$where["sejour.sortie"] = "= affectation.sortie";
示例10: array_multisort
if (CValue::getOrSession("order_col_" . $type) == "_patient") {
$sorter = CMbArray::pluck($listOperations, "_ref_patient", "nom");
array_multisort($sorter, $order_way_final == "ASC" ? SORT_ASC : SORT_DESC, $listOperations);
$order_col = CValue::getOrSession("order_col_" . $type);
}
// Création du template
$smarty = new CSmartyDP();
// Daily check lists
$smarty->assign("date_close_checklist", $date_close_checklist);
$smarty->assign("date_open_checklist", $date_open_checklist);
$smarty->assign("require_check_list", $require_check_list);
$smarty->assign("require_check_list_close", $require_check_list_close);
$smarty->assign("daily_check_lists", $daily_check_lists);
$smarty->assign("daily_check_list_types", $daily_check_list_types);
$smarty->assign("listChirs", $listChirs);
$smarty->assign("listAnesths", $listAnesths);
$smarty->assign("type", $type);
$smarty->assign("bloc_id", $bloc_id);
$smarty->assign("personnels", $personnels);
$smarty->assign("order_way", $order_way);
$smarty->assign("order_col", $order_col);
$smarty->assign("listOperations", $listOperations);
$smarty->assign("plages", $plages);
$smarty->assign("date", $date);
$smarty->assign("isbloodSalvageInstalled", CModule::getActive("bloodSalvage"));
$smarty->assign("hour", CMbDT::time());
$smarty->assign("modif_operation", $modif_operation);
$smarty->assign("isImedsInstalled", CModule::getActive("dPImeds") && CImeds::getTagCIDC($group));
$smarty->assign("nb_sorties_non_realisees", $nb_sorties_non_realisees);
$smarty->assign("is_anesth", $curr_user->isAnesth());
$smarty->display("inc_reveil_{$type}.tpl");
示例11: foreach
}
}
// Ajout des plages, OK
foreach ($plages_by_salle as $salle_id => $_plages) {
$i = array_search($salle_id, $salles_ids);
CMbObject::massLoadRefsNotes($_plages);
CMbObject::massLoadFwdRef($_plages, "chir_id");
CMbObject::massLoadFwdRef($_plages, "anesth_id");
CMbObject::massLoadFwdRef($_plages, "spec_id");
foreach ($_plages as $_plage) {
$_plage->loadRefsNotes();
$_plage->loadRefChir()->loadRefFunction();
$_plage->loadRefSpec();
$_plage->loadRefAnesth()->loadRefFunction();
$debut = "{$i} " . CMbDT::time($_plage->debut);
$duree = CMbDT::minutesRelative(CMbDT::time($_plage->debut), CMbDT::time($_plage->fin));
//fetch
$smarty = new CSmartyDP("modules/reservation");
$smarty->assign("plageop", $_plage);
$smarty_plageop = $smarty->fetch("inc_planning/libelle_plageop.tpl");
$smarty_plageop = htmlspecialchars_decode(CMbString::htmlEntities($smarty_plageop, ENT_NOQUOTES), ENT_NOQUOTES);
$event = new CPlanningEvent($_plage->_guid, $debut, $duree, $smarty_plageop, "#efbf99", true, null, $_plage->_guid, false);
$event->below = true;
$event->type = "plage_planning";
$event->plage["id"] = $_plage->_id;
if ($can_edit) {
$event->addMenuItem("edit", CMbString::htmlEntities("Modifier cette plage"));
$event->addMenuItem("list", CMbString::htmlEntities("Gestion des interventions"));
}
$planning->addEvent($event);
}
示例12: COperation
* $Id$
*
* @package Mediboard
* @subpackage SalleOp
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
$evenement_guid = CValue::get("evenement_guid");
$operation_id = CValue::get("operation_id");
$datetime = CValue::get("datetime");
$interv = new COperation();
$interv->load($operation_id);
$interv->loadRefAnesth();
if (!$datetime) {
$datetime = CMbDT::date($interv->_datetime) . " " . CMbDT::time();
}
list($evenement_class, $evenement_id) = explode("-", $evenement_guid);
/** @var CAnesthPerop $evenement */
$evenement = new $evenement_class();
if ($evenement_id) {
$evenement->load($evenement_id);
$evenement->loadRefsNotes();
} else {
$evenement->datetime = $datetime;
}
$evenement->operation_id = $interv->_id;
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("evenement", $evenement);
$smarty->assign("datetime", $datetime);
示例13: loadRefConsult
/**
* Load ref consult
*
* @return CConsultation
*/
function loadRefConsult()
{
// Chargement de la consultation ATU
if (!$this->_ref_sejour) {
$this->loadRefSejour();
}
$sejour =& $this->_ref_sejour;
$sejour->loadRefsConsultations();
if (!CAppUI::conf("dPurgences create_sejour_hospit") && $this->mutation_sejour_id) {
$this->loadRefSejourMutation()->loadRefsConsultations();
$this->_ref_consult = $this->_ref_sejour_mutation->_ref_consult_atu;
} else {
$this->_ref_consult = $this->_ref_sejour->_ref_consult_atu;
}
// Calcul du l'attente
$this->_attente = $this->_presence;
if ($this->_ref_consult->_id) {
$entree = CMbDT::time($this->_ref_sejour->_entree);
$this->_attente = CMbDT::subTime(CMbDT::transform($entree, null, "%H:%M:00"), CMbDT::transform(CMbDT::time($this->_ref_consult->heure), null, "%H:%M:00"));
}
$this->_can_leave_level = $sejour->sortie_reelle ? "" : "ok";
if (!$sejour->sortie_reelle) {
if (!$this->_ref_consult->_id) {
$this->_can_leave_level = "warning";
}
// En consultation
if ($this->_ref_consult->chrono != 64) {
$this->_can_leave = -1;
$this->_can_leave_level = "warning";
} else {
if (CMbDT::time($sejour->sortie_prevue) > CMbDT::time()) {
$this->_can_leave_since = true;
$this->_can_leave = CMbDT::timeRelative(CMbDT::time(), CMbDT::time($sejour->sortie_prevue));
} else {
$this->_can_leave_about = true;
$this->_can_leave = CMbDT::timeRelative(CMbDT::time($sejour->sortie_prevue), CMbDT::time());
}
if (CAppUI::conf("dPurgences rpu_warning_time") < $this->_can_leave) {
$this->_can_leave_level = "warning";
}
if (CAppUI::conf("dPurgences rpu_warning_time") < $this->_can_leave) {
$this->_can_leave_level = "error";
}
}
}
return $this->_ref_consult;
}
示例14: updatePlainFields
/**
* @see parent::updatePlainFields()
*/
function updatePlainFields()
{
if ($this->object_class == "COperation" || $this->object_class == "CBloodSalvage") {
$this->loadRefObject();
$this->_ref_object->loadRefPlageOp();
if ($this->_debut == "current") {
$this->_debut = CMbDT::time();
}
if ($this->_fin == "current") {
$this->_fin = CMbDT::time();
}
if ($this->_debut !== null && $this->_debut != "") {
$this->_debut = CMbDT::time($this->_debut);
$this->debut = CMbDT::addDateTime($this->_debut, CMbDT::date($this->_ref_object->_datetime));
}
if ($this->_fin !== null && $this->_fin != "") {
$this->_fin = CMbDT::time($this->_fin);
$this->fin = CMbDT::addDateTime($this->_fin, CMbDT::date($this->_ref_object->_datetime));
}
if ($this->_debut_dt !== null && $this->_debut_dt != "") {
$this->debut = $this->_debut_dt;
}
if ($this->_fin_dt !== null && $this->_fin_dt != "") {
$this->fin = $this->_fin_dt;
}
// Suppression de la valeur
if ($this->_debut === "") {
$this->debut = "";
}
if ($this->_fin === "") {
$this->fin = "";
}
// Mise a jour du champ realise
if ($this->debut !== null && $this->fin !== null) {
$this->realise = 1;
}
if ($this->debut === "" || $this->fin === "") {
$this->realise = 0;
}
}
}
示例15: CSmartyDP
$lit = $_affectation->loadRefLit();
$lit->loadRefChambre()->loadRefService();
$sejour = $_affectation->loadRefSejour();
$sejour->loadRefPraticien();
$patient = $_affectation->_ref_sejour->loadRefPatient();
$patient->loadIPP();
$list_affectations[$key]["nom"] = $patient->nom;
$list_affectations[$key]["prenom"] = $patient->prenom;
$list_affectations[$key]["id"] = $IPP ? $patient->_IPP : $patient->_id;
$list_affectations[$key]["service"] = $lit->_ref_chambre->_ref_service->_id;
$list_affectations[$key]["chambre"] = $lit->_ref_chambre->_id;
$list_affectations[$key]["lit"] = $lit->_id;
$list_affectations[$key]["sexe"] = $patient->sexe;
$list_affectations[$key]["naissance"] = CMbDT::format($patient->naissance, "%Y%m%d");
$list_affectations[$key]["date_entree"] = CMbDT::format(CMbDT::date($sejour->entree), "%Y%m%d");
$list_affectations[$key]["heure_entree"] = CMbDT::format(CMbDT::time($sejour->entree), "%H%M");
$list_affectations[$key]["date_sortie"] = CMbDT::format(CMbDT::date($sejour->sortie), "%Y%m%d");
$list_affectations[$key]["heure_sortie"] = CMbDT::format(CMbDT::time($sejour->sortie), "%H%M");
$list_affectations[$key]["type"] = $sejour->type;
if ($detail_lit) {
$list_affectations[$key]["lit_nom"] = $lit->nom;
$list_affectations[$key]["chambre_nom"] = $lit->_ref_chambre->nom;
$list_affectations[$key]["nom_naissance"] = $patient->nom_jeune_fille;
}
}
header("Content-Type: text/plain;");
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("list_affectations", $list_affectations);
$smarty->assign("detail_lit", $detail_lit);
$smarty->display("get_etat_lits_txt.tpl");